### Eclipse Workspace Patch 1.0
#P L2j_Pirama
Index: config/players.properties
===================================================================
--- config/players.properties (revision 85)
+++ config/players.properties (working copy)
@@ -1,6 +1,7 @@
#=============================================================
# Misc
#=============================================================
+AnnounsPvp = true
#Amount of adenas that a new character is given, default is 100
StartingAdena = 100
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 85)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -449,6 +449,7 @@
// --------------------------------------------------
/** Misc */
+ public static boolean ANNOUNS_PVP;
public static int STARTING_ADENA;
public static boolean EFFECT_CANCELING;
public static double HP_REGEN_MULTIPLIER;
@@ -1102,6 +1103,7 @@
// players
ExProperties players = load(PLAYERS_FILE);
+ ANNOUNS_PVP = players.getProperty("AnnounsPvp", true);
STARTING_ADENA = players.getProperty("StartingAdena", 100);
EFFECT_CANCELING = players.getProperty("CancelLesserEffect", true);
HP_REGEN_MULTIPLIER = players.getProperty("HpRegenMultiplier", 1.);
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 85)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -37,6 +37,7 @@
import net.sf.l2j.Config;
import net.sf.l2j.L2DatabaseFactory;
+import net.sf.l2j.gameserver.Announcements;
import net.sf.l2j.gameserver.LoginServerThread;
import net.sf.l2j.gameserver.ThreadPoolManager;
import net.sf.l2j.gameserver.ai.CtrlEvent;
@@ -394,6 +395,8 @@
private byte _siegeState = 0;
private int _curWeightPenalty = 0;
+ private int _pvpKillsAnnoun;
+
private int _lastCompassZone; // the last compass zone update send to the client
private boolean _isInWater;
@@ -1797,6 +1800,16 @@
_pvpKills = pvpKills;
}
+ public int getPvpKillsAnnoun()
+ {
+ return _pvpKillsAnnoun;
+ }
+
+ public void setPvpKillsAnnoun(int pvpKillsAnnoun)
+ {
+ _pvpKillsAnnoun = pvpKillsAnnoun;
+ }
+
/**
* @return The ClassId object of the L2PcInstance contained in L2PcTemplate.
*/
@@ -4011,6 +4024,8 @@
// Clear resurrect xp calculation
setExpBeforeDeath(0);
+ setPvpKillsAnnoun(0);
+
if (isCursedWeaponEquipped())
CursedWeaponsManager.getInstance().drop(_cursedWeaponEquippedId, killer);
else
@@ -4212,6 +4227,16 @@
// Add PvP point to attacker.
setPvpKills(getPvpKills() + 1);
+ if (Config.ANNOUNS_PVP)
+ {
+ setPvpKillsAnnoun(getPvpKillsAnnoun() + 1);
+
+ if (getPvpKillsAnnoun() == 10 || getPvpKillsAnnoun() == 30 || getPvpKillsAnnoun() == 50)
+ {
+ Announcements.announceToAll(" " + getName() + " Killed consecutive " + getPvpKillsAnnoun() + " adversary's ");
+ }
+ }
// Send UserInfo packet to attacker with its Karma and PK Counter
sendPacket(new UserInfo(this));
}