diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index e03bbda657..6c015419c6 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index e03bbda657..6c015419c6 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index e03bbda657..6c015419c6 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index e03bbda657..6c015419c6 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index f9119a509b..e99e1ca447 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index f9119a509b..e99e1ca447 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index f9119a509b..e99e1ca447 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index f9119a509b..e99e1ca447 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index 9bcc3eeda3..ba840a9e72 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index 9bcc3eeda3..ba840a9e72 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index e03bbda657..6c015419c6 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index e03bbda657..6c015419c6 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index f9119a509b..e99e1ca447 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index f9119a509b..e99e1ca447 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index f9119a509b..e99e1ca447 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index f9119a509b..e99e1ca447 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor) diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java index e03bbda657..6c015419c6 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingItemType.java @@ -45,11 +45,16 @@ public class ConditionUsingItemType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, Item item) { - if ((effector == null) || !effector.isPlayer()) + if (effector == null) { return false; } + if (!effector.isPlayer()) + { + return _armor ? false : (_mask & effector.getAttackType().mask()) != 0; + } + final Inventory inv = effector.getInventory(); // If ConditionUsingItemType is one between Light, Heavy or Magic if (_armor)