Package lineage2.gameserver.model.pledge

Examples of lineage2.gameserver.model.pledge.Clan$ClanReputationComparator


   * @return CTBSiegeClanObject
   */
  @Override
  public CTBSiegeClanObject newSiegeClan(String type, int clanId, long i, long date)
  {
    Clan clan = ClanTable.getInstance().getClan(clanId);
    return clan == null ? null : new CTBSiegeClanObject(type, clan, i, date);
  }
View Full Code Here


      }
    }
    if ((getOwnerId() > 0) && ((clan == null) || (clan.getClanId() != getOwnerId())))
    {
      removeSkills();
      Clan oldOwner = getOwner();
      if (oldOwner != null)
      {
        oldOwner.setHasFortress(0);
      }
      cancelCycleTask();
      clearFacility();
    }
    if (clan != null)
View Full Code Here

    Player activeChar = getClient().getActiveChar();
    if (activeChar == null)
    {
      return;
    }
    Clan clan = activeChar.getClan();
    if (clan != null)
    {
      activeChar.sendPacket(clan.listAll());
    }
  }
View Full Code Here

      msg.replace("%id%", String.valueOf(clanHall.getId()));
      msg.replace("%bigger_size%", String.valueOf(attackers.size()));
      msg.replace("%grade%", String.valueOf(clanHall.getGrade()));
      msg.replace("%rental_fee%", String.valueOf(clanHall.getRentalFee()));
     
      Clan owner = clanHall.getOwner();
     
      msg.replace("%owner%", owner == null ? StringUtils.EMPTY : owner.getName());
      msg.replace("%owner_leader%", owner == null ? StringUtils.EMPTY : owner.getLeaderName());
      msg.replace("%description%", clanHall.getAuctionDescription());
      msg.replace("%min_bid%", String.valueOf(clanHall.getAuctionMinBid()));
     
      Calendar c = auctionEvent.getEndSiegeDate();
     
View Full Code Here

                if (oldCastle != null)
                    oldCastle.changeOwner(null);
            }
        }

        Clan oldOwner = null;
        if (getOwnerId() > 0 && (newOwner == null || newOwner.getClanId() != getOwnerId())) {
            removeSkills();

            setTaxPercent(null, 0);
            cancelCycleTask();

            oldOwner = getOwner();
            if (oldOwner != null) {
                long amount = getTreasury();
                if (amount > 0) {
                    Warehouse warehouse = oldOwner.getWarehouse();
                    if (warehouse != null) {
                        warehouse.addItem(ItemTemplate.ITEM_ID_ADENA, amount);
                        addToTreasuryNoTax(-amount, false, false);
                        Log.add(getName() + "|" + -amount + "|Castle:changeOwner", "treasury");
                    }
                }

                for (Player clanMember : oldOwner.getOnlineMembers(0))
                    if (clanMember != null && clanMember.getInventory() != null)
                        clanMember.getInventory().validateItems();

                oldOwner.setHasCastle(0);
            }
        }

        if (newOwner != null)
            newOwner.setHasCastle(getId());
View Full Code Here

  private int hasCastle, hasHideout, hasFortress, atWar;
  private List<PledgeMemberInfo> infos = new ArrayList<PledgeMemberInfo>();

  public GMViewPledgeInfo(Player activeChar)
  {
    Clan clan = activeChar.getClan();
    for (UnitMember member : clan)
    {
      if (member == null)
        continue;
      char_name = member.getName();
      clan_level = member.getLevel();
      clan_id = member.getClassId();
      clan_crest_id = member.isOnline() ? member.getObjectId() : 0;
      rep = member.getSponsor() != 0 ? 1 : 0;
      infos.add(new PledgeMemberInfo(char_name, clan_level, clan_id, clan_crest_id, member.getSex(), 1, rep));
    }

    char_name = activeChar.getName();
    clan_id = clan.getClanId();
    clan_name = clan.getName();
    leader_name = clan.getLeaderName();
    clan_crest_id = clan.getCrestId();
    clan_level = clan.getLevel();
    hasCastle = clan.getCastle();
    hasHideout = clan.getHasHideout();
    hasFortress = clan.getHasFortress();
    rank = clan.getRank();
    rep = clan.getReputationScore();
    ally_id = clan.getAllyId();
    if (clan.getAlliance() != null)
    {
      ally_name = clan.getAlliance().getAllyName();
      ally_crest_id = clan.getAlliance().getAllyCrestId();
    }
    else
    {
      ally_name = "";
      ally_crest_id = 0;
    }
    atWar = clan.isAtWar();
  }
View Full Code Here

    if (!env.character.isPlayer())
    {
      return false;
    }
    Player player = (Player) env.character;
    Clan clan = player.getClan();
    if (clan == null)
    {
      return false;
    }
    int residenceId = clan.getResidenceId(_type);
    return _id > 0 ? residenceId == _id : residenceId > 0;
  }
View Full Code Here

   */
  @Override
  public void teleportPlayers(String t)
  {
    List<Player> players = new ArrayList<>();
    Clan ownerClan = getResidence().getOwner();
    if (t.equalsIgnoreCase(OWNER))
    {
      if (ownerClan != null)
      {
        for (Player player : getPlayersInZone())
View Full Code Here

   * @return S
   */
  @SuppressWarnings("unchecked")
  public S newSiegeClan(String type, int clanId, long param, long date)
  {
    Clan clan = ClanTable.getInstance().getClan(clanId);
    return clan == null ? null : (S) new SiegeClanObject(type, clan, param, date);
  }
View Full Code Here

   * @return int
   */
  @Override
  public int getRelation(Player thisPlayer, Player targetPlayer, int result)
  {
    Clan clan1 = thisPlayer.getClan();
    Clan clan2 = targetPlayer.getClan();
    if ((clan1 == null) || (clan2 == null))
    {
      return result;
    }
    SiegeEvent<?, ?> siegeEvent2 = targetPlayer.getEvent(SiegeEvent.class);
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.pledge.Clan$ClanReputationComparator

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.