diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index f20da50ad0..7983e3935d 100644 --- a/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -35,6 +36,17 @@ public class ConditionUsingSlotType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, ItemTemplate item) { - return (effector != null) && effector.isPlayer() && ((effector.getActiveWeaponItem().getBodyPart() & _mask) != 0); + if ((effector == null) || !effector.isPlayer()) + { + return false; + } + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index f20da50ad0..7983e3935d 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -35,6 +36,17 @@ public class ConditionUsingSlotType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, ItemTemplate item) { - return (effector != null) && effector.isPlayer() && ((effector.getActiveWeaponItem().getBodyPart() & _mask) != 0); + if ((effector == null) || !effector.isPlayer()) + { + return false; + } + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index f20da50ad0..7983e3935d 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -35,6 +36,17 @@ public class ConditionUsingSlotType extends Condition @Override public boolean testImpl(Creature effector, Creature effected, Skill skill, ItemTemplate item) { - return (effector != null) && effector.isPlayer() && ((effector.getActiveWeaponItem().getBodyPart() & _mask) != 0); + if ((effector == null) || !effector.isPlayer()) + { + return false; + } + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } } diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java index 69fc0099d9..7983e3935d 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.model.conditions; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.item.ItemTemplate; +import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.skill.Skill; /** @@ -39,6 +40,13 @@ public class ConditionUsingSlotType extends Condition { return false; } - return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0; + + final Weapon activeWeapon = effector.getActiveWeaponItem(); + if (activeWeapon == null) + { + return false; + } + + return (activeWeapon.getBodyPart() & _mask) != 0; } }