diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 57c95bd40e..78995bb2b1 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -575,7 +575,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable { final L2Attackable npc = getActiveChar(); - if (npc.isCastingNow()) + if ((npc == null) || npc.isCastingNow()) { return; } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 57c95bd40e..78995bb2b1 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -575,7 +575,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable { final L2Attackable npc = getActiveChar(); - if (npc.isCastingNow()) + if ((npc == null) || npc.isCastingNow()) { return; } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 57c95bd40e..78995bb2b1 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -575,7 +575,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable { final L2Attackable npc = getActiveChar(); - if (npc.isCastingNow()) + if ((npc == null) || npc.isCastingNow()) { return; } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index d03b48e301..e121f2b667 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -695,7 +695,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable protected void thinkAttack() { final L2Attackable npc = getActiveChar(); - if (npc.isCastingNow()) + if ((npc == null) || npc.isCastingNow()) { return; } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 57c95bd40e..78995bb2b1 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -575,7 +575,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable { final L2Attackable npc = getActiveChar(); - if (npc.isCastingNow()) + if ((npc == null) || npc.isCastingNow()) { return; }