package ai;
import l2p.gameserver.ai.Fighter;
import l2p.gameserver.model.L2Character;
import l2p.gameserver.model.L2Skill;
import l2p.gameserver.model.instances.L2NpcInstance;
import l2p.gameserver.tables.SkillTable;
public class Quest421FairyTree extends Fighter
{
public Quest421FairyTree(L2Character actor)
{
super(actor);
actor.setImobilised(true);
}
@Override
protected void onEvtAttacked(L2Character attacker, int damage)
{
L2NpcInstance actor = getActor();
if(actor != null && attacker != null && attacker.isPlayer())
{
L2Skill skill = SkillTable.getInstance().getInfo(5423, 12);
skill.getEffects(actor, attacker, false, false);
return;
}
if(attacker.isPet())
{
super.onEvtAttacked(attacker, damage);
return;
}
}
@Override
protected void onEvtAggression(L2Character attacker, int aggro)
{
L2NpcInstance actor = getActor();
if(actor != null && attacker != null && attacker.isPlayer())
{
L2Skill skill = SkillTable.getInstance().getInfo(5423, 12);
skill.getEffects(actor, attacker, false, false);
return;
}
}
@Override
protected boolean randomWalk()
{
return false;
}
}