Added missing final modifiers.
This commit is contained in:
@ -39,7 +39,7 @@ public class Area implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
if ((target == null) || (((target == activeChar) || target.isAlikeDead()) && (skill.getCastRange() >= 0)) || (!(target.isAttackable() || target.isPlayable())))
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.THAT_IS_AN_INCORRECT_TARGET);
|
||||
@ -72,7 +72,7 @@ public class Area implements ITargetTypeHandler
|
||||
origin = activeChar;
|
||||
}
|
||||
|
||||
int maxTargets = skill.getAffectLimit();
|
||||
final int maxTargets = skill.getAffectLimit();
|
||||
final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharacters();
|
||||
for (L2Character obj : objs)
|
||||
{
|
||||
|
@ -43,8 +43,8 @@ public class AreaFriendly implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
L2PcInstance player = activeChar.getActingPlayer();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
final L2PcInstance player = activeChar.getActingPlayer();
|
||||
|
||||
if ((target == null) || (!checkTarget(player, target) && (skill.getCastRange() >= 0)))
|
||||
{
|
||||
@ -69,7 +69,7 @@ public class AreaFriendly implements ITargetTypeHandler
|
||||
}
|
||||
targetList.add(target); // Add target to target list
|
||||
|
||||
int maxTargets = skill.getAffectLimit();
|
||||
final int maxTargets = skill.getAffectLimit();
|
||||
final Collection<L2Character> objs = target.getKnownList().getKnownCharactersInRadius(skill.getAffectRange());
|
||||
|
||||
// TODO: Chain Heal - The recovery amount decreases starting from the most injured person.
|
||||
@ -111,7 +111,7 @@ public class AreaFriendly implements ITargetTypeHandler
|
||||
|
||||
if (target.isPlayable())
|
||||
{
|
||||
L2PcInstance targetPlayer = target.getActingPlayer();
|
||||
final L2PcInstance targetPlayer = target.getActingPlayer();
|
||||
|
||||
if (activeChar == targetPlayer)
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ public class AreaSummon implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
if ((target == null) || !target.isServitor() || target.isDead())
|
||||
{
|
||||
return EMPTY_TARGET_LIST;
|
||||
@ -57,7 +57,7 @@ public class AreaSummon implements ITargetTypeHandler
|
||||
|
||||
final boolean srcInArena = (activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE));
|
||||
final Collection<L2Character> objs = target.getKnownList().getKnownCharacters();
|
||||
int maxTargets = skill.getAffectLimit();
|
||||
final int maxTargets = skill.getAffectLimit();
|
||||
|
||||
for (L2Character obj : objs)
|
||||
{
|
||||
|
@ -36,10 +36,10 @@ public class AuraCorpseMob implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
// Go through the L2Character _knownList
|
||||
final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharactersInRadius(skill.getAffectRange());
|
||||
int maxTargets = skill.getAffectLimit();
|
||||
final int maxTargets = skill.getAffectLimit();
|
||||
for (L2Character obj : objs)
|
||||
{
|
||||
if (obj.isAttackable() && obj.isDead())
|
||||
|
@ -39,9 +39,9 @@ public class AuraFriendly implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
L2PcInstance player = activeChar.getActingPlayer();
|
||||
int maxTargets = skill.getAffectLimit();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
final L2PcInstance player = activeChar.getActingPlayer();
|
||||
final int maxTargets = skill.getAffectLimit();
|
||||
for (L2Character obj : player.getKnownList().getKnownCharactersInRadius(skill.getAffectRange()))
|
||||
{
|
||||
if ((obj == activeChar) || !checkTarget(player, obj))
|
||||
@ -79,7 +79,7 @@ public class AuraFriendly implements ITargetTypeHandler
|
||||
|
||||
if (target.isPlayable())
|
||||
{
|
||||
L2PcInstance targetPlayer = target.getActingPlayer();
|
||||
final L2PcInstance targetPlayer = target.getActingPlayer();
|
||||
|
||||
if (activeChar.isInDuelWith(target))
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ public class BehindArea implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
if ((target == null) || (((target == activeChar) || target.isAlikeDead()) && (skill.getCastRange() >= 0)) || (!(target.isAttackable() || target.isPlayable())))
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.THAT_IS_AN_INCORRECT_TARGET);
|
||||
@ -73,7 +73,7 @@ public class BehindArea implements ITargetTypeHandler
|
||||
}
|
||||
|
||||
final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharacters();
|
||||
int maxTargets = skill.getAffectLimit();
|
||||
final int maxTargets = skill.getAffectLimit();
|
||||
for (L2Character obj : objs)
|
||||
{
|
||||
if (!(obj.isAttackable() || obj.isPlayable()))
|
||||
|
@ -37,10 +37,10 @@ public class BehindAura implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
final boolean srcInArena = (activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE));
|
||||
final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharactersInRadius(skill.getAffectRange());
|
||||
int maxTargets = skill.getAffectLimit();
|
||||
final int maxTargets = skill.getAffectLimit();
|
||||
for (L2Character obj : objs)
|
||||
{
|
||||
if (obj.isAttackable() || obj.isPlayable())
|
||||
|
@ -42,7 +42,7 @@ public class Clan implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
|
||||
if (activeChar.isPlayable())
|
||||
{
|
||||
@ -167,7 +167,7 @@ public class Clan implements ITargetTypeHandler
|
||||
targetList.add(activeChar);
|
||||
|
||||
final Collection<L2Object> objs = activeChar.getKnownList().getKnownObjects().values();
|
||||
int maxTargets = skill.getAffectLimit();
|
||||
final int maxTargets = skill.getAffectLimit();
|
||||
for (L2Object newTarget : objs)
|
||||
{
|
||||
if (newTarget.isNpc() && npc.isInMyClan((L2Npc) newTarget))
|
||||
|
@ -38,7 +38,7 @@ public class ClanMember implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
if (activeChar.isNpc())
|
||||
{
|
||||
// for buff purposes, returns friendly mobs nearby and mob itself
|
||||
|
@ -70,7 +70,7 @@ public class CommandChannel implements ITargetTypeHandler
|
||||
}
|
||||
|
||||
// Get all visible objects in a spherical area near the L2Character
|
||||
int maxTargets = skill.getAffectLimit();
|
||||
final int maxTargets = skill.getAffectLimit();
|
||||
final List<L2PcInstance> members = hasChannel ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||
|
||||
for (L2PcInstance member : members)
|
||||
|
@ -43,7 +43,7 @@ public class CorpseClan implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Object> targetList = new ArrayList<>();
|
||||
final List<L2Object> targetList = new ArrayList<>();
|
||||
if (activeChar.isPlayable())
|
||||
{
|
||||
final L2PcInstance player = activeChar.getActingPlayer();
|
||||
@ -139,7 +139,7 @@ public class CorpseClan implements ITargetTypeHandler
|
||||
targetList.add(activeChar);
|
||||
|
||||
final Collection<L2Object> objs = activeChar.getKnownList().getKnownObjects().values();
|
||||
int maxTargets = skill.getAffectLimit();
|
||||
final int maxTargets = skill.getAffectLimit();
|
||||
for (L2Object newTarget : objs)
|
||||
{
|
||||
if (newTarget.isNpc() && npc.isInMyClan((L2Npc) newTarget))
|
||||
|
@ -36,7 +36,7 @@ public class EnemySummon implements ITargetTypeHandler
|
||||
{
|
||||
if (target.isSummon())
|
||||
{
|
||||
L2Summon targetSummon = (L2Summon) target;
|
||||
final L2Summon targetSummon = (L2Summon) target;
|
||||
if ((activeChar.isPlayer() && (activeChar.getPet() != targetSummon) && activeChar.hasServitor(targetSummon.getObjectId()) && !targetSummon.isDead() && ((targetSummon.getOwner().getPvpFlag() != 0) || (targetSummon.getOwner().getReputation() < 0))) || (targetSummon.getOwner().isInsideZone(ZoneId.PVP) && activeChar.getActingPlayer().isInsideZone(ZoneId.PVP)) || (targetSummon.getOwner().isInDuel() && activeChar.getActingPlayer().isInDuel() && (targetSummon.getOwner().getDuelId() == activeChar.getActingPlayer().getDuelId())))
|
||||
{
|
||||
return new L2Character[]
|
||||
|
@ -39,7 +39,7 @@ public class FrontArea implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
if ((target == null) || (((target == activeChar) || target.isAlikeDead()) && (skill.getCastRange() >= 0)) || (!(target.isAttackable() || target.isPlayable())))
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.THAT_IS_AN_INCORRECT_TARGET);
|
||||
@ -73,7 +73,7 @@ public class FrontArea implements ITargetTypeHandler
|
||||
}
|
||||
|
||||
final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharacters();
|
||||
int maxTargets = skill.getAffectLimit();
|
||||
final int maxTargets = skill.getAffectLimit();
|
||||
for (L2Character obj : objs)
|
||||
{
|
||||
if (!(obj.isAttackable() || obj.isPlayable()))
|
||||
|
@ -37,10 +37,10 @@ public class FrontAura implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
final boolean srcInArena = (activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE));
|
||||
final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharactersInRadius(skill.getAffectRange());
|
||||
int maxTargets = skill.getAffectLimit();
|
||||
final int maxTargets = skill.getAffectLimit();
|
||||
for (L2Character obj : objs)
|
||||
{
|
||||
if (obj.isAttackable() || obj.isPlayable())
|
||||
|
@ -36,7 +36,7 @@ public class Party implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
if (onlyFirst)
|
||||
{
|
||||
return new L2Character[]
|
||||
@ -48,7 +48,7 @@ public class Party implements ITargetTypeHandler
|
||||
targetList.add(activeChar);
|
||||
|
||||
final int radius = skill.getAffectRange();
|
||||
L2PcInstance player = activeChar.getActingPlayer();
|
||||
final L2PcInstance player = activeChar.getActingPlayer();
|
||||
if (activeChar.isSummon())
|
||||
{
|
||||
if (Skill.addCharacter(activeChar, player, radius, false))
|
||||
|
@ -38,7 +38,7 @@ public class PartyClan implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
if (onlyFirst)
|
||||
{
|
||||
return new L2Character[]
|
||||
@ -81,7 +81,7 @@ public class PartyClan implements ITargetTypeHandler
|
||||
|
||||
// Get all visible objects in a spherical area near the L2Character
|
||||
final Collection<L2PcInstance> objs = activeChar.getKnownList().getKnownPlayersInRadius(radius);
|
||||
int maxTargets = skill.getAffectLimit();
|
||||
final int maxTargets = skill.getAffectLimit();
|
||||
for (L2PcInstance obj : objs)
|
||||
{
|
||||
if (obj == null)
|
||||
|
@ -40,7 +40,7 @@ public class PcBody implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
if ((target != null) && target.isDead())
|
||||
{
|
||||
final L2PcInstance player;
|
||||
|
@ -37,7 +37,7 @@ public class TargetParty implements ITargetTypeHandler
|
||||
@Override
|
||||
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
|
||||
{
|
||||
List<L2Character> targetList = new ArrayList<>();
|
||||
final List<L2Character> targetList = new ArrayList<>();
|
||||
|
||||
// Check for null target or any other invalid target
|
||||
if ((target == null) || target.isDead() || (target == activeChar))
|
||||
|
Reference in New Issue
Block a user