Fix for clanHelpRange.

Contributed by 574905252@qq.com
This commit is contained in:
MobiusDev 2017-04-28 21:59:50 +00:00
parent 27229752ae
commit 1289641a5e
2 changed files with 2 additions and 2 deletions

View File

@ -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())
{

View File

@ -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())
{