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