// Decompiled by DJ v3.9.9.91 Copyright 2005 Atanas Neshkov Date: 12/15/2007 1:02:20 AM // Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version! // Decompiler options: packimports(3) // Source File Name: EffectFear.java package net.sf.l2j.gameserver.skills.effects; import net.sf.l2j.gameserver.ai.CtrlIntention; import net.sf.l2j.gameserver.ai.L2CharacterAI; import net.sf.l2j.gameserver.model.*; import net.sf.l2j.gameserver.model.actor.instance.*; import net.sf.l2j.gameserver.skills.Env; // Referenced classes of package net.sf.l2j.gameserver.skills.effects: // EffectTemplate final class EffectFear extends L2Effect { public EffectFear(Env env, EffectTemplate template) { super(env, template); } public net.sf.l2j.gameserver.model.L2Effect.EffectType getEffectType() { return net.sf.l2j.gameserver.model.L2Effect.EffectType.FEAR; } public void onStart() { if(!getEffected().isAfraid()) { getEffected().startFear(); onActionTime(); } } public void onExit() { getEffected().stopFear(this); } public boolean onActionTime() { if((getEffected() instanceof L2PcInstance) && (getEffector() instanceof L2PcInstance) && getSkill().getId() != 1376 && getSkill().getId() != 1169 && getSkill().getId() != 65 && getSkill().getId() != 1092) return false; if(getEffected() instanceof L2FolkInstance) return false; if(getEffected() instanceof L2SiegeGuardInstance) return false; if(getEffected() instanceof L2SiegeFlagInstance) return false; if(getEffected() instanceof L2SiegeSummonInstance) return false; int posX = getEffected().getX(); int posY = getEffected().getY(); int posZ = getEffected().getZ(); int signx = -1; int signy = -1; if(getEffected().getX() > getEffector().getX()) signx = 1; if(getEffected().getY() > getEffector().getY()) signy = 1; posX += signx * 500; posY += signy * 500; getEffected().setRunning(); getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new L2CharPosition(posX, posY, posZ, 0)); return true; } public static final int FEAR_RANGE = 500; }