Package l2p.gameserver.skills.effects

Source Code of l2p.gameserver.skills.effects.EffectBetray

package l2p.gameserver.skills.effects;

import static l2p.gameserver.ai.CtrlIntention.AI_INTENTION_ACTIVE;
import l2p.gameserver.model.L2Effect;
import l2p.gameserver.model.L2Summon;
import l2p.gameserver.skills.Env;

public class EffectBetray extends L2Effect
{
  public EffectBetray(Env env, EffectTemplate template)
  {
    super(env, template);
  }

  @Override
  public void onStart()
  {
    super.onStart();
    if(_effected instanceof L2Summon)
    {
      L2Summon summon = (L2Summon) _effected;
      summon.setPossessed(true);
      summon.getAI().Attack(summon.getPlayer(), true, false);
    }
  }

  @Override
  public void onExit()
  {
    super.onExit();
    if(_effected instanceof L2Summon)
    {
      L2Summon summon = (L2Summon) _effected;
      summon.setPossessed(false);
      summon.getAI().setIntention(AI_INTENTION_ACTIVE);
    }
  }

  @Override
  public boolean onActionTime()
  {
    return false;
  }
}
TOP

Related Classes of l2p.gameserver.skills.effects.EffectBetray

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.