Package lineage2.gameserver.model.entity.residence

Examples of lineage2.gameserver.model.entity.residence.ClanHall


  {
    if (!canBypassCheck(player, this))
    {
      return;
    }
    ClanHall clanHall = getClanHall();
    if (command.equalsIgnoreCase("openDoors"))
    {
      if (player.hasPrivilege(Privilege.CH_ENTER_EXIT) && (player.getClan().getHasHideout() == clanHall.getId()))
      {
        for (int d : _doors)
        {
          ReflectionUtils.getDoor(d).openMe();
        }
        showChatWindow(player, "residence2/clanhall/agitafterdooropen.htm");
      }
      else
      {
        showChatWindow(player, "residence2/clanhall/noAuthority.htm");
      }
    }
    else if (command.equalsIgnoreCase("closeDoors"))
    {
      if (player.hasPrivilege(Privilege.CH_ENTER_EXIT) && (player.getClan().getHasHideout() == clanHall.getId()))
      {
        for (int d : _doors)
        {
          ReflectionUtils.getDoor(d).closeMe(player, true);
        }
        showChatWindow(player, "residence2/clanhall/agitafterdoorclose.htm");
      }
      else
      {
        showChatWindow(player, "residence2/clanhall/noAuthority.htm");
      }
    }
    else if (command.equalsIgnoreCase("banish"))
    {
      if (player.hasPrivilege(Privilege.CH_DISMISS))
      {
        clanHall.banishForeigner();
        showChatWindow(player, "residence2/clanhall/agitafterbanish.htm");
      }
      else
      {
        showChatWindow(player, "residence2/clanhall/noAuthority.htm");
View Full Code Here


   * @param arg Object[]
   */
  @Override
  public void showChatWindow(Player player, int val, Object... arg)
  {
    ClanHall clanHall = getClanHall();
    if (clanHall != null)
    {
      Clan playerClan = player.getClan();
      if ((playerClan != null) && (playerClan.getHasHideout() == clanHall.getId()))
      {
        showChatWindow(player, _elite ? "residence2/clanhall/WyvernAgitJanitorHi.htm" : "residence2/clanhall/AgitJanitorHi.htm", "%owner%", playerClan.getName());
      }
      else
      {
View Full Code Here

   * @param arg Object[]
   */
  @Override
  public void showChatWindow(Player player, int val, Object... arg)
  {
    ClanHall clanHall = getClanHall();
    ClanHallTeamBattleEvent siegeEvent = clanHall.getSiegeEvent();
   
    if (_timeout > System.currentTimeMillis())
    {
      showChatWindow(player, "residence2/clanhall/agit_mass_teleporter001.htm");
      return;
View Full Code Here

   * @param command String
   */
  @Override
  public void onBypassFeedback(final Player player, final String command)
  {
    ClanHall clanHall = getClanHall();
    ClanHallTeamBattleEvent siegeEvent = clanHall.getSiegeEvent();
    Clan clan = player.getClan();
    if (command.equalsIgnoreCase("registrationMenu"))
    {
      if (!checkCond(player, true))
      {
View Full Code Here

   * @return boolean
   */
  private boolean checkCond(Player player, boolean regMenu)
  {
    Clan clan = player.getClan();
    ClanHall clanHall = getClanHall();
    ClanHallTeamBattleEvent siegeEvent = clanHall.getSiegeEvent();
    List<CTBSiegeClanObject> siegeClans = siegeEvent.getObjects(SiegeEvent.ATTACKERS);
    SiegeClanObject siegeClan = siegeEvent.getSiegeClan(SiegeEvent.ATTACKERS, clan);
    if (siegeEvent.isRegistrationOver())
    {
      showChatWindow(player, "quests/_504_CompetitionForTheBanditStronghold/azit_messenger_q0504_03.htm", "%siege_time%", TimeUtils.toSimpleFormat(clanHall.getSiegeDate()));
      return false;
    }
    if (regMenu && (siegeClan != null))
    {
      return true;
    }
    if ((clan == null) || (player.getObjectId() != clan.getLeaderId()))
    {
      showChatWindow(player, "quests/_504_CompetitionForTheBanditStronghold/azit_messenger_q0504_05.htm");
      return false;
    }
    if ((player.getObjectId() == clan.getLeaderId()) && (clan.getLevel() < 4))
    {
      showChatWindow(player, "quests/_504_CompetitionForTheBanditStronghold/azit_messenger_q0504_04.htm");
      return false;
    }
    if (clan.getHasHideout() == clanHall.getId())
    {
      showChatWindow(player, "residence2/clanhall/agit_oel_mahum_messeger_22.htm");
      return false;
    }
    if (clan.getHasHideout() > 0)
View Full Code Here

   * @param player Player
   */
  private void register(Player player)
  {
    Clan clan = player.getClan();
    ClanHall clanHall = getClanHall();
    ClanHallTeamBattleEvent siegeEvent = clanHall.getSiegeEvent();
    CTBSiegeClanObject siegeClan = new CTBSiegeClanObject(SiegeEvent.ATTACKERS, clan, 0);
    siegeClan.getPlayers().add(player.getObjectId());
    siegeEvent.addObject(SiegeEvent.ATTACKERS, siegeClan);
    SiegeClanDAO.getInstance().insert(clanHall, siegeClan);
    SiegePlayerDAO.getInstance().insert(clanHall, clan.getClanId(), player.getObjectId());
View Full Code Here

   * @param arg Object[]
   */
  @Override
  public void showChatWindow(Player player, int val, Object... arg)
  {
    ClanHall clanHall = getClanHall();
    ClanHallSiegeEvent siegeEvent = clanHall.getSiegeEvent();
    if ((clanHall.getOwner() != null) && (clanHall.getOwner() == player.getClan()))
    {
      showChatWindow(player, _ownerDialog);
    }
    else if (siegeEvent.isInProgress())
    {
View Full Code Here

  {
    if (!canBypassCheck(player, this))
    {
      return;
    }
    ClanHall clanHall = getClanHall();
    ClanHallMiniGameEvent miniGameEvent = clanHall.getSiegeEvent();
    if (command.equalsIgnoreCase("register"))
    {
      if (miniGameEvent.isRegistrationOver())
      {
        showChatWindow(player, "residence2/clanhall/messenger_yetti014.htm");
View Full Code Here

   * @param arg Object[]
   */
  @Override
  public void showChatWindow(Player player, int val, Object... arg)
  {
    ClanHall clanHall = getClanHall();
    Clan clan = clanHall.getOwner();
    NpcHtmlMessage msg = new NpcHtmlMessage(player, this);
    if (clan != null)
    {
      msg.setFile("residence2/clanhall/messenger_yetti001.htm");
      msg.replace("%owner_name%", clan.getName());
    }
    else
    {
      msg.setFile("residence2/clanhall/messenger_yetti001a.htm");
    }
    msg.replace("%siege_date%", TimeUtils.toSimpleFormat(clanHall.getSiegeDate()));
    player.sendPacket(msg);
  }
View Full Code Here

    switch (restartType)
    {
      case TO_CLANHALL:
        if ((clan != null) && (clan.getHasHideout() != 0))
        {
          ClanHall clanHall = activeChar.getClanHall();
          loc = TeleportUtils.getRestartLocation(activeChar, RestartType.TO_CLANHALL);
          if (clanHall.getFunction(ResidenceFunction.RESTORE_EXP) != null)
          {
            activeChar.restoreExp(clanHall.getFunction(ResidenceFunction.RESTORE_EXP).getLevel());
          }
        }
        break;
      case TO_CASTLE:
        if ((clan != null) && (clan.getCastle() != 0))
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.entity.residence.ClanHall

Copyright © 2018 www.massapicom. 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.