Added missing final modifiers.
This commit is contained in:
@@ -118,7 +118,7 @@ public abstract class Condition implements ConditionListener
|
||||
|
||||
public final boolean test(L2Character caster, L2Character target, Skill skill, L2Item item)
|
||||
{
|
||||
boolean res = testImpl(caster, target, skill, item);
|
||||
final boolean res = testImpl(caster, target, skill, item);
|
||||
if ((_listener != null) && (res != _result))
|
||||
{
|
||||
_result = res;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ConditionPlayerCanTakeCastle extends Condition
|
||||
return false;
|
||||
}
|
||||
|
||||
Castle castle = CastleManager.getInstance().getCastle(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastle(player);
|
||||
SystemMessage sm;
|
||||
if ((castle == null) || (castle.getResidenceId() <= 0) || !castle.getSiege().isInProgress() || (castle.getSiege().getAttackerClan(player.getClan()) == null))
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ConditionPlayerWeight extends Condition
|
||||
final L2PcInstance player = effector.getActingPlayer();
|
||||
if ((player != null) && (player.getMaxLoad() > 0))
|
||||
{
|
||||
int weightproc = (((player.getCurrentLoad() - player.getBonusWeightPenalty()) * 100) / player.getMaxLoad());
|
||||
final int weightproc = (((player.getCurrentLoad() - player.getBonusWeightPenalty()) * 100) / player.getMaxLoad());
|
||||
return (weightproc < _weight) || player.getDietMode();
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -59,9 +59,9 @@ public final class ConditionSiegeZone extends Condition
|
||||
@Override
|
||||
public boolean testImpl(L2Character effector, L2Character effected, Skill skill, L2Item item)
|
||||
{
|
||||
L2Character target = _self ? effector : effected;
|
||||
Castle castle = CastleManager.getInstance().getCastle(target);
|
||||
Fort fort = FortManager.getInstance().getFort(target);
|
||||
final L2Character target = _self ? effector : effected;
|
||||
final Castle castle = CastleManager.getInstance().getCastle(target);
|
||||
final Fort fort = FortManager.getInstance().getFort(target);
|
||||
|
||||
if ((castle == null) && (fort == null))
|
||||
{
|
||||
@@ -88,7 +88,7 @@ public final class ConditionSiegeZone extends Condition
|
||||
return false;
|
||||
}
|
||||
|
||||
L2PcInstance player = (L2PcInstance) activeChar;
|
||||
final L2PcInstance player = (L2PcInstance) activeChar;
|
||||
|
||||
if (((castle == null) || (castle.getResidenceId() <= 0)))
|
||||
{
|
||||
@@ -134,7 +134,7 @@ public final class ConditionSiegeZone extends Condition
|
||||
return false;
|
||||
}
|
||||
|
||||
L2PcInstance player = (L2PcInstance) activeChar;
|
||||
final L2PcInstance player = (L2PcInstance) activeChar;
|
||||
|
||||
if (((fort == null) || (fort.getResidenceId() <= 0)))
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@ public class ConditionTargetUsesWeaponKind extends Condition
|
||||
return false;
|
||||
}
|
||||
|
||||
L2Weapon weapon = effected.getActiveWeaponItem();
|
||||
final L2Weapon weapon = effected.getActiveWeaponItem();
|
||||
if (weapon == null)
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class ConditionTargetWeight extends Condition
|
||||
final L2PcInstance target = effected.getActingPlayer();
|
||||
if (!target.getDietMode() && (target.getMaxLoad() > 0))
|
||||
{
|
||||
int weightproc = (((target.getCurrentLoad() - target.getBonusWeightPenalty()) * 100) / target.getMaxLoad());
|
||||
final int weightproc = (((target.getCurrentLoad() - target.getBonusWeightPenalty()) * 100) / target.getMaxLoad());
|
||||
return (weightproc < _weight);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,12 +57,12 @@ public final class ConditionUsingItemType extends Condition
|
||||
if (_armor)
|
||||
{
|
||||
// Get the itemMask of the weared chest (if exists)
|
||||
L2ItemInstance chest = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST);
|
||||
final L2ItemInstance chest = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST);
|
||||
if (chest == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int chestMask = chest.getItem().getItemMask();
|
||||
final int chestMask = chest.getItem().getItemMask();
|
||||
|
||||
// If chest armor is different from the condition one return false
|
||||
if ((_mask & chestMask) == 0)
|
||||
@@ -72,19 +72,19 @@ public final class ConditionUsingItemType extends Condition
|
||||
|
||||
// So from here, chest armor matches conditions
|
||||
|
||||
int chestBodyPart = chest.getItem().getBodyPart();
|
||||
final int chestBodyPart = chest.getItem().getBodyPart();
|
||||
// return True if chest armor is a Full Armor
|
||||
if (chestBodyPart == L2Item.SLOT_FULL_ARMOR)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// check legs armor
|
||||
L2ItemInstance legs = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS);
|
||||
final L2ItemInstance legs = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS);
|
||||
if (legs == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int legMask = legs.getItem().getItemMask();
|
||||
final int legMask = legs.getItem().getItemMask();
|
||||
// return true if legs armor matches too
|
||||
return (_mask & legMask) != 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user