Zealot of Shilen AI improvement.
This commit is contained in:
parent
31d71ff5ac
commit
b8b144c2ef
@ -19,7 +19,6 @@ package ai.areas.Gracia.AI.NPC.ZealotOfShilen;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
@ -58,17 +57,17 @@ public final class ZealotOfShilen extends AbstractNpcAI
|
||||
startQuestTimer("WATCHING", 10000, npc, null, true);
|
||||
if (event.equalsIgnoreCase("WATCHING") && !npc.isAttackingNow())
|
||||
{
|
||||
for (L2Character monster : L2World.getInstance().getVisibleObjects(npc, L2MonsterInstance.class))
|
||||
L2World.getInstance().forEachVisibleObject(npc, L2MonsterInstance.class, character ->
|
||||
{
|
||||
if (!monster.isDead() && !((L2Attackable) monster).isDecayed())
|
||||
if (!character.isDead() && !character.isDecayed())
|
||||
{
|
||||
npc.setRunning();
|
||||
((L2Attackable) npc).addDamageHate(monster, 0, 999);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, monster, null);
|
||||
((L2Attackable) npc).addDamageHate(character, 0, 999);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, character, null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return null;
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user