Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: F:/Workspace/L2jFrozen_GameServer/config/functions/pvp.properties
- ===================================================================
- --- F:/Workspace/L2jFrozen_GameServer/config/functions/pvp.properties (revision 899)
- +++ F:/Workspace/L2jFrozen_GameServer/config/functions/pvp.properties (working copy)
- @@ -181,15 +143,12 @@
- # Default : True
- AllowSoEInPvP = True
- -# Announce all Kills (PVP and PK Kills) (THIS MOD IS STILL BETA!)
- -AnnounceAllKill = False
- +# Announces when a Player Pvp another Player. Default - false
- +AnnouncePvPKill = False
- # Announces when a Player PK another Player. Default - false
- AnnouncePkKill = False
- -# Announces when a Player Pvp another Player. Default - false
- -AnnouncePvPKill = False
- -
- # When the duel is more than 4 players are transported to the coordinates,
- # Listed below
- DuelSpawnX = -102495
- Index: F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 899)
- +++ F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy)
- @@ -6478,6 +6455,10 @@
- if(checkIfPvP(target) && targetPlayer.getPvpFlag() != 0 || isInsideZone(ZONE_PVP) && targetPlayer.isInsideZone(ZONE_PVP))
- {
- increasePvpKills();
- + if(target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL && !isGM())
- + {
- + Announcements.getInstance().announceToPlayers("PvP: " + getName() + " hunted " + target.getName());
- + }
- }
- else
- {
- @@ -6490,14 +6471,10 @@
- {
- // 'Both way war' -> 'PvP Kill'
- increasePvpKills();
- - if(target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL)
- + if(target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL && !isGM())
- {
- - Announcements.getInstance().announceToAll("Player " + getName() + " hunted Player " + target.getName());
- + Announcements.getInstance().announceToPlayers("PvP: " + getName() + " hunted " + target.getName());
- }
- - else if(target instanceof L2PcInstance && Config.ANNOUNCE_ALL_KILL)
- - {
- - Announcements.getInstance().announceToAll("Player " + getName() + " killed Player " + target.getName());
- - }
- addItemReword(targetPlayer);
- return;
- }
- @@ -6511,27 +6488,22 @@
- if(Config.KARMA_AWARD_PK_KILL)
- {
- increasePvpKills();
- + if(target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL && !isGM())
- + {
- + Announcements.getInstance().announceToPlayers("PvP: " + getName() + " hunted " + target.getName());
- + }
- }
- -
- - if(target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL)
- - {
- - Announcements.getInstance().announceToAll("Player " + getName() + " hunted Player " + target.getName());
- - }
- }
- else if(targetPlayer.getPvpFlag() == 0) // Target player doesn't have karma
- {
- increasePkKillsAndKarma(targetPlayer.getLevel());
- - if(target instanceof L2PcInstance && Config.ANNOUNCE_PK_KILL)
- + if(target instanceof L2PcInstance && Config.ANNOUNCE_PK_KILL && !isGM())
- {
- - Announcements.getInstance().announceToAll("Player " + getName() + " has assassinated Player " + target.getName());
- + Announcements.getInstance().announceToPlayers("PK: " + getName() + " has assassinated " + target.getName());
- }
- }
- }
- }
- - if(target instanceof L2PcInstance && Config.ANNOUNCE_ALL_KILL)
- - {
- - Announcements.getInstance().announceToAll("Player " + getName() + " killed Player " + target.getName());
- - }
- if(targetPlayer.getObjectId() == _lastKill && (count < Config.REWORD_PROTECT - 1 || Config.REWORD_PROTECT == 0) || !(_inEventDM && DM.is_started()))
- {
- Index: F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/entity/Announcements.java
- ===================================================================
- --- F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/entity/Announcements.java (revision 899)
- +++ F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/entity/Announcements.java (working copy)
- @@ -257,26 +257,29 @@
- cs = null;
- }
- +
- + public void announceToPlayers(String message)
- + {
- + for (L2PcInstance player : L2World.getInstance().getAllPlayers())
- + {
- + player.sendMessage(message);
- + }
- + }
- +
- // Method fo handling announcements from admin
- public void handleAnnounce(String command, int lengthToTrim)
- {
- Index: F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/Config.java
- ===================================================================
- --- F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/Config.java (revision 899)
- +++ F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/Config.java (working copy)
- @@ -2531,7 +2547,6 @@
- /** Announce PvP, PK, Kill*/
- public static boolean ANNOUNCE_PVP_KILL;
- public static boolean ANNOUNCE_PK_KILL;
- - public static boolean ANNOUNCE_ALL_KILL;
- public static int DUEL_SPAWN_X;
- public static int DUEL_SPAWN_Y;
- @@ -2649,8 +2686,7 @@
- ALLOW_POTS_IN_PVP = Boolean.parseBoolean(pvpSettings.getProperty("AllowPotsInPvP", "True"));
- /** Enable Pk Info mod. Displays number of times player has killed other */
- ENABLE_PK_INFO = Boolean.valueOf(pvpSettings.getProperty("EnablePkInfo", "false"));
- - // Get the AnnounceAllKill, AnnouncePvpKill and AnnouncePkKill values
- - ANNOUNCE_ALL_KILL = Boolean.parseBoolean(pvpSettings.getProperty("AnnounceAllKill", "False"));
- + // Get the AnnouncePvpKill and AnnouncePkKill values
- ANNOUNCE_PVP_KILL = Boolean.parseBoolean(pvpSettings.getProperty("AnnouncePvPKill", "False"));
- ANNOUNCE_PK_KILL = Boolean.parseBoolean(pvpSettings.getProperty("AnnouncePkKill", "False"));
- @@ -5297,18 +5333,14 @@
- {
- STARTING_AA = Integer.parseInt(pValue);
- }
- - else if(pName.equalsIgnoreCase("AnnouncePvPKill") && !ANNOUNCE_ALL_KILL)
- + else if(pName.equalsIgnoreCase("AnnouncePvPKill"))
- {
- ANNOUNCE_PVP_KILL = Boolean.valueOf(pValue);
- }
- - else if(pName.equalsIgnoreCase("AnnouncePkKill") && !ANNOUNCE_ALL_KILL)
- + else if(pName.equalsIgnoreCase("AnnouncePkKill"))
- {
- ANNOUNCE_PK_KILL = Boolean.valueOf(pValue);
- }
- - else if(pName.equalsIgnoreCase("AnnounceAllKill") && !ANNOUNCE_PVP_KILL && !ANNOUNCE_PK_KILL)
- - {
- - ANNOUNCE_ALL_KILL = Boolean.valueOf(pValue);
- - }
- else if(pName.equalsIgnoreCase("DisableWeightPenalty"))
- {
- DISABLE_WEIGHT_PENALTY = Boolean.valueOf(pValue);
Advertisement
Add Comment
Please, Sign In to add comment