SHOW:
|
|
- or go back to the newest paste.
| 1 | diff --git a/java/net/sf/l2j/Config.java b/java/net/sf/l2j/Config.java | |
| 2 | index b034ed5..d4e835f 100644 | |
| 3 | --- a/java/net/sf/l2j/Config.java | |
| 4 | +++ b/java/net/sf/l2j/Config.java | |
| 5 | @@ -77,7 +77,8 @@ | |
| 6 | public static int MANOR_APPROVE_MIN; | |
| 7 | public static int MANOR_MAINTENANCE_MIN; | |
| 8 | public static int MANOR_SAVE_PERIOD_RATE; | |
| 9 | - | |
| 10 | + public static boolean ANNOUNCE_PK_KILL; | |
| 11 | + public static boolean ANNOUNCE_PVP_KILL; | |
| 12 | /** Clan Hall function */ | |
| 13 | public static long CH_TELE_FEE_RATIO; | |
| 14 | public static int CH_TELE1_FEE; | |
| 15 | @@ -1114,6 +1115,8 @@ | |
| 16 | private static final void loadSpecial() | |
| 17 | {
| |
| 18 | final ExProperties Special = initProperties(SPECIAL_MODS); | |
| 19 | + ANNOUNCE_PVP_KILL = Boolean.parseBoolean(Special.getProperty("AnnouncePvPKill", "false"));
| |
| 20 | + ANNOUNCE_PK_KILL = Boolean.parseBoolean(Special.getProperty("AnnouncePkKill", "false"));
| |
| 21 | ANNOUNCE_RAIDBOS_KILL = Boolean.parseBoolean(Special.getProperty("AnnounceRaidBossKill", "false"));
| |
| 22 | ANNOUNCE_GRANDBOS_KILL = Boolean.parseBoolean(Special.getProperty("AnnounceGranBossKill", "false"));
| |
| 23 | ANNOUNCE_BOSS_ALIVE = Boolean.parseBoolean(Special.getProperty("AnnounceSpawnAllBoss", "false"));
| |
| 24 | diff --git a/java/net/sf/l2j/gameserver/model/actor/Player.java b/java/net/sf/l2j/gameserver/model/actor/Player.java | |
| 25 | index 361b0dd..92f7065 100644 | |
| 26 | --- a/java/net/sf/l2j/gameserver/model/actor/Player.java | |
| 27 | +++ b/java/net/sf/l2j/gameserver/model/actor/Player.java | |
| 28 | @@ -2890,10 +2890,18 @@ | |
| 29 | {
| |
| 30 | // Add PvP point to attacker. | |
| 31 | setPvpKills(getPvpKills() + 1); | |
| 32 | - | |
| 33 | + if (Config.ANNOUNCE_PVP_KILL) | |
| 34 | + {
| |
| 35 | + SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2); | |
| 36 | + sm.addZoneName(targetPlayer.getPosition()); | |
| 37 | + sm.addString("- " + getName() + " defeated Player " + target.getName() + ".");
| |
| 38 | + World.toAllOnlinePlayers(sm); | |
| 39 | // Send UserInfo packet to attacker with its Karma and PK Counter | |
| 40 | sendPacket(new UserInfo(this)); | |
| 41 | - } | |
| 42 | + | |
| 43 | + // Send UserInfo packet to attacker with its Karma and PK Counter | |
| 44 | + sendPacket(new UserInfo(this)); | |
| 45 | + }} | |
| 46 | } | |
| 47 | // Otherwise, killer is considered as a PKer. | |
| 48 | else if (targetPlayer.getKarma() == 0 && targetPlayer.getPvpFlag() == 0) | |
| 49 | @@ -2901,7 +2909,12 @@ | |
| 50 | // PK Points are increased only if you kill a player. | |
| 51 | if (target instanceof Player) | |
| 52 | setPkKills(getPkKills() + 1); | |
| 53 | - | |
| 54 | + if (Config.ANNOUNCE_PK_KILL) | |
| 55 | + {
| |
| 56 | + SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2); | |
| 57 | + sm.addZoneName(targetPlayer.getPosition()); | |
| 58 | + sm.addString("- " + getName() + " murdered Player " + target.getName() + ".");
| |
| 59 | + World.toAllOnlinePlayers(sm); | |
| 60 | + } | |
| 61 | // Calculate new karma. | |
| 62 | setKarma(getKarma() + Formulas.calculateKarmaGain(getPkKills(), target instanceof Summon)); | |
| 63 | ||
| 64 | @@ -2912,6 +2925,7 @@ | |
| 65 | PvpFlagTaskManager.getInstance().remove(this, true); | |
| 66 | } | |
| 67 | } | |
| 68 | ||
| 69 | public void updatePvPStatus() | |
| 70 | {
| |
| 71 | diff --git a/java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java b/java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java | |
| 72 | index 5513367..15568ea 100644 | |
| 73 | --- a/java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java | |
| 74 | +++ b/java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java | |
| 75 | @@ -28,7 +28,7 @@ | |
| 76 | private SMParam[] _params; | |
| 77 | private int _paramIndex; | |
| 78 | ||
| 79 | - private SystemMessage(final SystemMessageId smId) | |
| 80 | + public SystemMessage(final SystemMessageId smId) | |
| 81 | {
| |
| 82 | final int paramCount = smId.getParamCount(); | |
| 83 | _smId = smId; | |
| 84 | ||
| 85 | Index: DataPack | |
| 86 | ||
| 87 | +#=================================================== | |
| 88 | +# Annuncie PvP/Pk Kill+Local da morte | |
| 89 | +#=================================================== | |
| 90 | +# Announce PvP Kill | |
| 91 | +AnnouncePvPKill = True | |
| 92 | +# Announce Pk Kills | |
| 93 | +AnnouncePkKill = True | |
| 94 | ||
| 95 |