Examples of ClanHall


Examples of com.l2jfrozen.gameserver.model.entity.ClanHall

   */
  public final ClanHall getClanHall()
  {
    if(_clanHallId < 0)
    {
      ClanHall temp = ClanHallManager.getInstance().getNearbyClanHall(getX(), getY(), 500);

      if(temp != null)
      {
        _clanHallId = temp.getId();
        temp = null;
      }

      if(_clanHallId < 0)
        return null;
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.entity.ClanHall

   */
  public final ClanHall getClanHall()
  {
    if(_clanHallId < 0)
    {
      ClanHall temp = ClanHallManager.getInstance().getNearbyClanHall(getX(), getY(), 500);

      if(temp != null)
      {
        _clanHallId = temp.getId();
        temp = null;
      }

      if(_clanHallId < 0)
        return null;
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.entity.ClanHall

  {
    L2NpcInstance result = null;
    L2NpcTemplate template = null;
    L2Spawn spawn = null;

    ClanHall CH = ClanHallManager.getInstance().getClanHallById(34);
    CH.banishForeigners();
    CH.spawnDoor();

    setIsInProgress(true);

    try
    {
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.entity.ClanHall

    _gustav.cancel(true);
    _dietrich.cancel(true);
    _mikhail.cancel(true);
    _monsterdespawn.cancel(true);

    ClanHall CH = ClanHallManager.getInstance().getClanHallById(34);
    CH.banishForeigners();
    CH.spawnDoor();
    CH = null;
  }
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.entity.ClanHall

      if(_npc.getNpcId() == 35410)
      {
        Announce("Siege of Devastated castle is over.");
        Announce("Nobody won! ClanHall belong to NPC until next siege.");

        ClanHall CH = ClanHallManager.getInstance().getClanHallById(34);
        CH.banishForeigners();
        CH.spawnDoor();
      }
      _npc.onDecay();
    }
View Full Code Here

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

    Commands command = (Commands) comm;
    if(!activeChar.getPlayerAccess().CanEditNPC)
    {
      return false;
    }
    ClanHall clanhall = null;
    if(wordList.length > 1)
    {
      clanhall = ClanHallManager.getInstance().getClanHall(Integer.parseInt(wordList[1]));
    }
    if(clanhall == null)
    {
      showClanHallSelectPage(activeChar);
      return true;
    }
    switch(command)
    {
      case admin_clanhall:
        showClanHallSelectPage(activeChar);
        break;
      case admin_clanhallset:
        L2Object target = activeChar.getTarget();
        L2Player player = activeChar;
        if(target != null && target.isPlayer())
        {
          player = (L2Player) target;
        }
        if(player.getClan() == null)
        {
          activeChar.sendPacket(Msg.THAT_IS_THE_INCORRECT_TARGET);
        }
        else
        {
          clanhall.changeOwner(player.getClan());
          Auction auction = AuctionManager.getInstance().getAuction(clanhall.getId());
          if(auction != null)
          {
            auction.cancelAuction();
          }
          _log.fine("ClanHall " + clanhall.getName() + "(id: " + clanhall.getId() + ") owned by clan " + player.getClan().getName());
        }
        break;
      case admin_clanhalldel:
        clanhall.changeOwner(null);
        break;
      case admin_clanhallopendoors:
        clanhall.openCloseDoors(activeChar, true);
        break;
      case admin_clanhallclosedoors:
        clanhall.openCloseDoors(activeChar, false);
        break;
      case admin_clanhallteleportself:
        L2Zone zone = clanhall.getZone();
        if(zone != null)
        {
          activeChar.teleToLocation(zone.getSpawn());
        }
        break;
View Full Code Here

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

    int condition = validateCondition(player);
    if(condition != Cond_Owner)
    {
      return;
    }
    ClanHall ch = getClanHall();
    if(ch.getOwner() == null)
    {
      return;
    }
    long lease = ch.getLease();
    Castle castle = CastleManager.getInstance().getCastleByIndex(ch.getZone().getTaxById());
    long tax = lease * castle.getTaxPercent() / 100;
    lease += tax;
    if(ch.getOwner().getAdenaCount() >= lease)
    {
      return;
    }
    if(ch.getPaidUntil() <= System.currentTimeMillis() + 24 * 60 * 60 * 1000L && ch.getPaidUntil() >= System.currentTimeMillis() + 12 * 60 * 60 * 1000L)
    {
      player.sendPacket(new SystemMessage(SystemMessage.PAYMENT_FOR_YOUR_CLAN_HALL_HAS_NOT_BEEN_MADE_PLEASE_MAKE_PAYMENT_TO_YOUR_CLAN_WAREHOUSE_BY_S1_TOMORROW).addNumber(lease));
    }
    else if(ch.isInDebt())
    {
      player.sendPacket(Msg.THE_CLAN_HALL_FEE_IS_ONE_WEEK_OVERDUE_THEREFORE_THE_CLAN_HALL_OWNERSHIP_HAS_BEEN_REVOKED);
    }
  }
View Full Code Here

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

    return getClanHall();
  }

  public void sendDecoInfo(L2Player player)
  {
    ClanHall clanHall = getClanHall();
    if(clanHall != null)
    {
      player.sendPacket(new AgitDecoInfo(getClanHall()));
    }
  }
View Full Code Here

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

    {
      cancelAuction();
      PlayerMessageStack.getInstance().mailto(_SellerId, Msg.THE_CLAN_HALL_WHICH_HAD_BEEN_PUT_UP_FOR_AUCTION_WAS_NOT_SOLD_AND_THEREFORE_HAS_BEEN_RELISTED);
      return;
    }
    ClanHall ch = ClanHallManager.getInstance().getClanHall(getId());
    if(ch == null)
    {
      _log.warning("ClanHall is null for id " + _Id + ". WTF?");
    }
    L2Clan HighestBidderClan = null;
    if(_bidders.get(_HighestBidderId) == null)
    {
      _log.warning("Bidder with id " + _HighestBidderId + "is null. WTF?");
    }
    else
    {
      HighestBidderClan = ClanTable.getInstance().getClanByName(_bidders.get(_HighestBidderId).getClanName());
      if(HighestBidderClan == null)
      {
        _log.warning("Clan with name " + _bidders.get(_HighestBidderId).getClanName() + "is null. WTF?");
      }
    }
    if(ch != null && HighestBidderClan != null)
    {
      if(_SellerId > 0)
      {
        returnItem(_SellerClanName, _HighestBidderMaxBid, true);
        returnItem(_SellerClanName, ch.getLease(), false);
        PlayerMessageStack.getInstance().mailto(_SellerId, new SystemMessage(SystemMessage.THE_CLAN_HALL_WHICH_WAS_PUT_UP_FOR_AUCTION_HAS_BEEN_AWARDED_TO_S1_CLAN).addString(HighestBidderClan.getName()));
      }
      ch.setLease(Math.max(ch.getPrice() / 100, _HighestBidderMaxBid / 100)); // Аренда - 1% от стоимости в неделю
      ch.changeOwner(HighestBidderClan);
      PlayerMessageStack.getInstance().mailto(HighestBidderClan.getLeaderId(), new SystemMessage("Congratulation! You have won ClanHall " + getItemName() + ". " + ch.getDesc()));
    }
    cancelAuction();
  }
View Full Code Here

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

    _data.loadBid();
  }

  private int getClanHallGrade()
  {
    ClanHall ch = ClanHallManager.getInstance().getClanHall(getId());
    return ch == null ? 0 : ch.getGrade();
  }
View Full Code Here
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.