Package l2p.gameserver.model.instances

Source Code of l2p.gameserver.model.instances.L2CastleMessengerInstance

package l2p.gameserver.model.instances;

import l2p.gameserver.model.L2Player;
import l2p.gameserver.model.entity.siege.territory.TerritorySiege;
import l2p.gameserver.serverpackets.NpcHtmlMessage;
import l2p.gameserver.templates.L2NpcTemplate;

public class L2CastleMessengerInstance extends L2NpcInstance
{
  public L2CastleMessengerInstance(int objectID, L2NpcTemplate template)
  {
    super(objectID, template);
  }

  /**
   * If siege is in progress shows the Busy HTML<BR>
   * else Shows the SiegeInfo window
   *
   * @param player
   */
  @Override
  public void showChatWindow(L2Player player, int val)
  {
    if(!getCastle().getSiege().isInProgress() && !TerritorySiege.isInProgress())
    {
      getCastle().getSiege().listRegisterClan(player);
    }
    else
    {
      NpcHtmlMessage html = new NpcHtmlMessage(player, this);
      html.setHtml("<html><body><font color=\"LEVEL\">Oh! Our castle is being attacked and I can't do anything for you right now.</font></body></html>");
      player.sendPacket(html);
    }
  }
}
TOP

Related Classes of l2p.gameserver.model.instances.L2CastleMessengerInstance

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.