Package ai

Source Code of ai.Quest024Mystic

package ai;

import l2p.gameserver.ai.Mystic;
import l2p.gameserver.instancemanager.QuestManager;
import l2p.gameserver.model.L2Character;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.model.L2World;
import l2p.gameserver.model.quest.Quest;

/**
* User: Death
*/
public class Quest024Mystic extends Mystic
{
  private final String myEvent;

  public Quest024Mystic(L2Character actor)
  {
    super(actor);
    myEvent = "playerInMobRange_" + actor.getNpcId();
  }

  @Override
  protected boolean thinkActive()
  {
    Quest q = QuestManager.getQuest(24);
    if(q != null)
    {
      for(L2Player player : L2World.getAroundPlayers(getActor(), 900, 200))
      {
        player.processQuestEvent(q.getName(), myEvent, null);
      }
    }
    return super.thinkActive();
  }
}
TOP

Related Classes of ai.Quest024Mystic

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.