Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/java/net/sf/l2j/Config.java b/java/net/sf/l2j/Config.java
- index b034ed5..d4e835f 100644
- --- a/java/net/sf/l2j/Config.java
- +++ b/java/net/sf/l2j/Config.java
- @@ -77,7 +77,8 @@
- public static int MANOR_APPROVE_MIN;
- public static int MANOR_MAINTENANCE_MIN;
- public static int MANOR_SAVE_PERIOD_RATE;
- -
- + public static boolean ANNOUNCE_PK_KILL;
- + public static boolean ANNOUNCE_PVP_KILL;
- /** Clan Hall function */
- public static long CH_TELE_FEE_RATIO;
- public static int CH_TELE1_FEE;
- @@ -1114,6 +1115,8 @@
- private static final void loadSpecial()
- {
- final ExProperties Special = initProperties(SPECIAL_MODS);
- + ANNOUNCE_PVP_KILL = Boolean.parseBoolean(Special.getProperty("AnnouncePvPKill", "false"));
- + ANNOUNCE_PK_KILL = Boolean.parseBoolean(Special.getProperty("AnnouncePkKill", "false"));
- ANNOUNCE_RAIDBOS_KILL = Boolean.parseBoolean(Special.getProperty("AnnounceRaidBossKill", "false"));
- ANNOUNCE_GRANDBOS_KILL = Boolean.parseBoolean(Special.getProperty("AnnounceGranBossKill", "false"));
- ANNOUNCE_BOSS_ALIVE = Boolean.parseBoolean(Special.getProperty("AnnounceSpawnAllBoss", "false"));
- diff --git a/java/net/sf/l2j/gameserver/model/actor/Player.java b/java/net/sf/l2j/gameserver/model/actor/Player.java
- index 361b0dd..92f7065 100644
- --- a/java/net/sf/l2j/gameserver/model/actor/Player.java
- +++ b/java/net/sf/l2j/gameserver/model/actor/Player.java
- @@ -2890,10 +2890,18 @@
- {
- // Add PvP point to attacker.
- setPvpKills(getPvpKills() + 1);
- -
- + if (Config.ANNOUNCE_PVP_KILL)
- + {
- + SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
- + sm.addZoneName(targetPlayer.getPosition());
- + sm.addString("- " + getName() + " defeated Player " + target.getName() + ".");
- + World.toAllOnlinePlayers(sm);
- // Send UserInfo packet to attacker with its Karma and PK Counter
- sendPacket(new UserInfo(this));
- - }
- +
- + // Send UserInfo packet to attacker with its Karma and PK Counter
- + sendPacket(new UserInfo(this));
- + }}
- }
- // Otherwise, killer is considered as a PKer.
- else if (targetPlayer.getKarma() == 0 && targetPlayer.getPvpFlag() == 0)
- @@ -2901,7 +2909,12 @@
- // PK Points are increased only if you kill a player.
- if (target instanceof Player)
- setPkKills(getPkKills() + 1);
- -
- + if (Config.ANNOUNCE_PK_KILL)
- + {
- + SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
- + sm.addZoneName(targetPlayer.getPosition());
- + sm.addString("- " + getName() + " murdered Player " + target.getName() + ".");
- + World.toAllOnlinePlayers(sm);
- + }
- // Calculate new karma.
- setKarma(getKarma() + Formulas.calculateKarmaGain(getPkKills(), target instanceof Summon));
- @@ -2912,6 +2925,7 @@
- PvpFlagTaskManager.getInstance().remove(this, true);
- }
- }
- public void updatePvPStatus()
- {
- diff --git a/java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java b/java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java
- index 5513367..15568ea 100644
- --- a/java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java
- +++ b/java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java
- @@ -28,7 +28,7 @@
- private SMParam[] _params;
- private int _paramIndex;
- - private SystemMessage(final SystemMessageId smId)
- + public SystemMessage(final SystemMessageId smId)
- {
- final int paramCount = smId.getParamCount();
- _smId = smId;
- Index: DataPack
- +#===================================================
- +# Annuncie PvP/Pk Kill+Local da morte
- +#===================================================
- +# Announce PvP Kill
- +AnnouncePvPKill = True
- +# Announce Pk Kills
- +AnnouncePkKill = True
Add Comment
Please, Sign In to add comment