Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: java/net/sf/l2j/Config.java
- ===================================================================
- --- java/net/sf/l2j/Config.java (revision 84)
- +++ java/net/sf/l2j/Config.java (working copy)
- + public static IntIntHolder[] REWARD_WINNER_SIEGE_CLAN;
- + public static IntIntHolder[] LEADER_REWARD_WINNER_SIEGE_CLAN;
- + REWARD_WINNER_SIEGE_CLAN = sieges.parseIntIntList("MembersRewardsID", "57-100");
- + LEADER_REWARD_WINNER_SIEGE_CLAN = sieges.parseIntIntList("LeaderRewardsID", "57-400");
- ===================================================================
- --- java/net/sf/l2j/gameserver/configserver/model/entity/Siege.java (revision 0)
- +++ java/net/sf/l2j/gameserver/configserver/model/entity/Siege.java (working copy)
- @@ -0,0 +1,84 @@
- @Override
- public void endSiege()
- {
- if (!isInProgress())
- return;
- World.toAllOnlinePlayers(SystemMessage.getSystemMessage(SystemMessageId.SIEGE_OF_S1_HAS_ENDED).addString(_castle.getName()));
- World.toAllOnlinePlayers(new PlaySound("systemmsg_e.18"));
- + if (_castle.getOwnerId() > 0)
- + {
- + Clan clan = ClanTable.getInstance().getClan(_castle.getOwnerId());
- + World.toAllOnlinePlayers(SystemMessage.getSystemMessage(SystemMessageId.CLAN_S1_VICTORIOUS_OVER_S2_S_SIEGE).addString(clan.getName()).addString(_castle.getName()));
- + final List<String> playerIps = new ArrayList<>();
- + for (Player player : World.getInstance().getPlayers())
- + {
- + final String pIp = player.getClient().getConnection().getInetAddress().getHostAddress();
- +
- + if (!playerIps.contains(pIp))
- + {
- + playerIps.add(pIp);
- +
- + if (player.isClanLeader())
- + {
- + for (IntIntHolder reward : Config.LEADER_REWARD_WINNER_SIEGE_CLAN)
- + {
- + if (reward.getId() > 0)
- + player.addItem("", reward.getId(), reward.getValue(), player, true);
- + }
- + }
- + else
- + {
- + for (IntIntHolder reward : Config.REWARD_WINNER_SIEGE_CLAN)
- + {
- + if (reward.getId() > 0)
- + player.addItem("", reward.getId(), reward.getValue(), player, true);
- + }
- + }
- + }
- + }
- // An initial clan was holding the castle and is different of current owner.
- if (_formerOwner != null && clan != _formerOwner)
- {
- // Delete circlets and crown's leader for initial castle's owner (if one was existing)
- _castle.checkItemsForClan(_formerOwner);
- // Refresh hero diaries.
- for (ClanMember member : clan.getMembers())
- {
- final Player player = member.getPlayerInstance();
- if (player != null && player.isNoble())
- HeroManager.getInstance().setCastleTaken(player.getObjectId(), _castle.getCastleId());
- }
- }
- }
- else
- World.toAllOnlinePlayers(SystemMessage.getSystemMessage(SystemMessageId.SIEGE_S1_DRAW).addString(_castle.getName()));
- // Cleanup clans kills/deaths counters, cleanup flag.
- for (Clan clan : _registeredClans.keySet())
- {
- clan.setSiegeKills(0);
- clan.setSiegeDeaths(0);
- clan.setFlag(null);
- }
- // Refresh reputation points towards siege end.
- updateClansReputation();
- // Teleport all non-owning castle players on second closest town.
- _castle.getSiegeZone().banishForeigners(_castle.getOwnerId());
- // Clear all flags.
- updatePlayerSiegeStateFlags(true);
- // Save castle specific data.
- saveCastleSiege(true);
- // Clear registered clans.
- clearAllClans();
- // Remove all towers from this castle.
- removeTowers();
- // Despawn guards or mercenaries.
- _castle.despawnSiegeGuardsOrMercenaries();
- // Respawn/repair castle doors.
- _castle.spawnDoors(false);
- _castle.getSiegeZone().setActive(false);
- }
- #=============================================================
- # Renewal Sieges
- #=============================================================
- # Reward Clan Winner, For Leaders clan/ members clan. Example : itemId-ItemCount;itemId-ItemCount;
- LeaderRewardsID = 0-0;
- MembersRewardsID = 0-0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement