From 1289641a5e78b8a0da735b6afd376a77e2c72cc7 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 28 Apr 2017 21:59:50 +0000 Subject: [PATCH] Fix for clanHelpRange. Contributed by 574905252@qq.com --- .../java/com/l2jmobius/gameserver/ai/L2AttackableAI.java | 2 +- .../java/com/l2jmobius/gameserver/ai/L2AttackableAI.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index a46385c10b..9a55a1c89d 100644 --- a/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -599,7 +599,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable // Check if the L2Object is inside the Faction Range of the actor if (called.hasAI()) { - if ((Math.abs(finalTarget.getZ() - called.getZ()) < 600) && npc.getAttackByList().contains(finalTarget) && ((called.getAI()._intention == CtrlIntention.AI_INTENTION_IDLE) || (called.getAI()._intention == CtrlIntention.AI_INTENTION_ACTIVE))) + if ((Math.abs(finalTarget.getZ() - called.getZ()) < 600) && npc.getAttackByList().stream().anyMatch(o -> o.get() == finalTarget) && ((called.getAI()._intention == CtrlIntention.AI_INTENTION_IDLE) || (called.getAI()._intention == CtrlIntention.AI_INTENTION_ACTIVE))) { if (finalTarget.isPlayable()) { diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index a46385c10b..9a55a1c89d 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -599,7 +599,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable // Check if the L2Object is inside the Faction Range of the actor if (called.hasAI()) { - if ((Math.abs(finalTarget.getZ() - called.getZ()) < 600) && npc.getAttackByList().contains(finalTarget) && ((called.getAI()._intention == CtrlIntention.AI_INTENTION_IDLE) || (called.getAI()._intention == CtrlIntention.AI_INTENTION_ACTIVE))) + if ((Math.abs(finalTarget.getZ() - called.getZ()) < 600) && npc.getAttackByList().stream().anyMatch(o -> o.get() == finalTarget) && ((called.getAI()._intention == CtrlIntention.AI_INTENTION_IDLE) || (called.getAI()._intention == CtrlIntention.AI_INTENTION_ACTIVE))) { if (finalTarget.isPlayable()) {