Package net.sf.l2j.gameserver.model.entity

Examples of net.sf.l2j.gameserver.model.entity.ClanHall$FeeTask


        else if (siege.checkIsDefender(activeChar.getClan()))
            activeChar.setSiegeState((byte)2);
        }
      // Add message at connexion if clanHall not paid.
      // Possibly this is custom...
      ClanHall clanHall = ClanHallManager.getInstance().getClanHallByOwner(activeChar.getClan());
      if(clanHall != null){
        if(!clanHall.getPaid()){
          activeChar.sendPacket(new SystemMessage(SystemMessageId.PAYMENT_FOR_YOUR_CLAN_HALL_HAS_NOT_BEEN_MADE_PLEASE_MAKE_PAYMENT_TO_YOUR_CLAN_WAREHOUSE_BY_S1_TOMORROW));
        }
      }
    }
View Full Code Here


            rs = statement.executeQuery();
            while (rs.next())
            {
              id = rs.getInt("id");
              if(rs.getInt("ownerId") == 0)
                _freeClanHall.put(id,new ClanHall(id,rs.getString("name"),rs.getInt("ownerId"),rs.getInt("lease"),rs.getString("desc"),rs.getString("location"),0,rs.getInt("Grade"),rs.getBoolean("paid")));
              else{
                if(ClanTable.getInstance().getClan(rs.getInt("ownerId")) != null)
                {
                  _clanHall.put(id,new ClanHall(id,rs.getString("name"),rs.getInt("ownerId"),rs.getInt("lease"),rs.getString("desc"),rs.getString("location"),rs.getLong("paidUntil"),rs.getInt("Grade"),rs.getBoolean("paid")));
                  ClanTable.getInstance().getClan(rs.getInt("ownerId")).setHasHideout(id);
                }else
                {
                  _freeClanHall.put(id,new ClanHall(id,rs.getString("name"),rs.getInt("ownerId"),rs.getInt("lease"),rs.getString("desc"),rs.getString("location"),rs.getLong("paidUntil"),rs.getInt("Grade"),rs.getBoolean("paid")));
                  _freeClanHall.get(id).free();
                  AuctionManager.getInstance().initNPC(id);
                }

              }
View Full Code Here

            // If in Monster Derby Track
            if (player.isInsideZone(L2Character.ZONE_MONSTERTRACK))
                return new Location(12661, 181687, -3560);

            Castle castle = null;
            ClanHall clanhall = null;

            if (player.getClan() != null)
            {
              // If teleport to clan hall
              if (teleportWhere == TeleportWhereType.ClanHall)
                {

                  clanhall = ClanHallManager.getInstance().getClanHallByOwner(player.getClan());
                  if (clanhall != null)
                  {
                    L2ClanHallZone zone = clanhall.getZone();
                      if (zone != null)
                      {
                          return zone.getSpawn();
                      }
                  }
View Full Code Here

          continue;

        L2DoorInstance door = parseList(line);
        _staticItems.put(door.getDoorId(), door);
        door.spawnMe(door.getX(), door.getY(),door.getZ());
        ClanHall clanhall = ClanHallManager.getInstance().getNearbyClanHall(door.getX(), door.getY(), 500);
        if (clanhall != null)
        {
            clanhall.getDoors().add(door);
            door.setClanHall(clanhall);
                    if (Config.DEBUG)
                        _log.warning("door "+door.getDoorName()+" attached to ch "+clanhall.getName());
        }
      }

      _log.config("DoorTable: Loaded " + _staticItems.size() + " Door Templates.");
    }
View Full Code Here

    StringTokenizer st = new StringTokenizer(command, " ");
    command = st.nextToken(); // Get actual command

    // Get castle
    Castle castle = null;
    ClanHall clanhall = null;
    if (command.startsWith("admin_clanhall"))
      clanhall = ClanHallManager.getInstance().getClanHallById(Integer.parseInt(st.nextToken()));
    else if (st.hasMoreTokens())
      castle = CastleManager.getInstance().getCastle(st.nextToken());
    // Get castle
    String val = "";
    if (st.hasMoreTokens())
      val = st.nextToken();
    if ((castle == null  || castle.getCastleId() < 0) && clanhall == null)
      // No castle specified
      showCastleSelectPage(activeChar);
    else
    {
      L2Object target = activeChar.getTarget();
      L2PcInstance player = null;
      if (target instanceof L2PcInstance)
        player = (L2PcInstance)target;

      if (command.equalsIgnoreCase("admin_add_attacker"))
      {
        if (player == null)
          activeChar.sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT));
        else
          castle.getSiege().registerAttacker(player,true);
      }
      else if (command.equalsIgnoreCase("admin_add_defender"))
      {
        if (player == null)
          activeChar.sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT));
        else
          castle.getSiege().registerDefender(player,true);
      }
      else if (command.equalsIgnoreCase("admin_add_guard"))
      {
        try
        {
          int npcId = Integer.parseInt(val);
          castle.getSiege().getSiegeGuardManager().addSiegeGuard(activeChar, npcId);
        }
        catch (Exception e)
        {
          activeChar.sendMessage("Usage: //add_guard npcId");
        }
      }
      else if (command.equalsIgnoreCase("admin_clear_siege_list"))
      {
        castle.getSiege().clearSiegeClan();
      }
      else if (command.equalsIgnoreCase("admin_endsiege"))
      {
        castle.getSiege().endSiege();
      }
      else if (command.equalsIgnoreCase("admin_list_siege_clans"))
      {
        castle.getSiege().listRegisterClan(activeChar);
        return true;
      }
      else if (command.equalsIgnoreCase("admin_move_defenders"))
      {
        activeChar.sendPacket(SystemMessage.sendString("Not implemented yet."));
      }
      else if (command.equalsIgnoreCase("admin_setcastle"))
      {
        if (player == null || player.getClan() == null)
          activeChar.sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT));
        else
          castle.setOwner(player.getClan());
      }
      else if (command.equalsIgnoreCase("admin_removecastle"))
      {
        L2Clan clan = ClanTable.getInstance().getClan(castle.getOwnerId());
        if (clan != null)
          castle.removeOwner(clan);
        else
          activeChar.sendMessage("Unable to remove castle");
      }
      else if (command.equalsIgnoreCase("admin_clanhallset"))
      {
        if (player == null || player.getClan() == null)
          activeChar.sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT));
        else if(!ClanHallManager.getInstance().isFree(clanhall.getId()))
          activeChar.sendMessage("This ClanHall isn't free!");
        else if(player.getClan().getHasHideout() == 0)
        {
          ClanHallManager.getInstance().setOwner(clanhall.getId(), player.getClan());
          if(AuctionManager.getInstance().getAuction(clanhall.getId()) != null)
            AuctionManager.getInstance().getAuction(clanhall.getId()).deleteAuctionFromDB();
        }
        else
          activeChar.sendMessage("You have already a ClanHall!");
      }
      else if (command.equalsIgnoreCase("admin_clanhalldel"))
      {
        if(!ClanHallManager.getInstance().isFree(clanhall.getId())){
          ClanHallManager.getInstance().setFree(clanhall.getId());
          AuctionManager.getInstance().initNPC(clanhall.getId());
        }else
          activeChar.sendMessage("This ClanHall is already Free!");
      }
      else if (command.equalsIgnoreCase("admin_clanhallopendoors"))
      {
        clanhall.openCloseDoors(true);
      }
      else if (command.equalsIgnoreCase("admin_clanhallclosedoors"))
      {
        clanhall.openCloseDoors(false);
      }
      else if (command.equalsIgnoreCase("admin_clanhallteleportself"))
      {
        L2ClanHallZone zone = clanhall.getZone();
        if (zone != null)
        {
          activeChar.teleToLocation(zone.getSpawn(), true);
        }
      }
View Full Code Here

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

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

            if (_clanHallId < 0) return null;
        }
        return ClanHallManager.getInstance().getClanHallById(_clanHallId);
    }
View Full Code Here

    if (character instanceof L2PcInstance)
    {
      // Set as in clan hall
      character.setInsideZone(L2Character.ZONE_CLANHALL, true);

      ClanHall clanHall = ClanHallManager.getInstance().getClanHallById(_clanHallId);
      if (clanHall == null) return;

      // Send decoration packet
      ClanHallDecoration deco = new ClanHallDecoration(clanHall);
      ((L2PcInstance)character).sendPacket(deco);

      // Send a message
      if (clanHall.getOwnerId() != 0 && clanHall.getOwnerId() == ((L2PcInstance)character).getClanId())
        ((L2PcInstance)character).sendMessage("You have entered your clan hall");
    }
  }
View Full Code Here

            if (player.isInsideZone(L2Character.ZONE_CLANHALL) && player.getClan() != null)
            {
              int clanHallIndex = player.getClan().getHasHideout();
              if (clanHallIndex > 0)
              {
                ClanHall clansHall = ClanHallManager.getInstance().getClanHallById(clanHallIndex);
                if(clansHall != null)
                  if (clansHall.getFunction(ClanHall.FUNC_RESTORE_HP) != null)
                    hpRegenMultiplier *= 1+ clansHall.getFunction(ClanHall.FUNC_RESTORE_HP).getLvl()/100;
              }
            }

      // Mother Tree effect is calculated at last
      if (player.isInsideZone(L2Character.ZONE_MOTHERTREE)) hpRegenBonus += 2;
View Full Code Here

            if (player.isInsideZone(L2Character.ZONE_CLANHALL) && player.getClan() != null)
            {
              int clanHallIndex = player.getClan().getHasHideout();
              if (clanHallIndex > 0)
              {
                ClanHall clansHall = ClanHallManager.getInstance().getClanHallById(clanHallIndex);
                if(clansHall != null)
                  if (clansHall.getFunction(ClanHall.FUNC_RESTORE_MP) != null)
                    mpRegenMultiplier *= 1+ clansHall.getFunction(ClanHall.FUNC_RESTORE_MP).getLvl()/100;
              }
            }

      // Calculate Movement bonus
            if (player.isSitting()) mpRegenMultiplier *= 1.5;      // Sitting
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.model.entity.ClanHall$FeeTask

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.