Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 5538)
- +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy)
- @@ -4343,7 +4343,58 @@
- DuelManager.getInstance().broadcastToOppositTeam(this, update);
- }
- }
- -
- +
- + public void updatePrefix()
- + {
- + if (Config.PVP_PREFIX_SYSTEM_ENABLED)
- + {
- + //Check if the character has GM access
- + if (isGM())
- + return;
- + {
- + ing pvpKills = getPvpKills();
- + if ((pvpKills >= (Config.PVP_LVL1)) && (pvpKills <= (Config.PVP_LVL1)))
- + {
- + setPrefix(Config.NAME_PREFIX_FOR_PVP_LVL1);
- + }
- + else if ((pvpKills >= (Config.PVP_LVL2)) && (pvpKills <= (Config.PVP_LVL2)))
- + {
- + setPrefix(Config.NAME_PREFIX_FOR_PVP_LVL2);
- + }
- + else if ((pvpKills >= (Config.PVP_LVL3)) && (pvpKills <= (Config.PVP_LVL3)))
- + {
- + setPrefix(Config.NAME_PREFIX_FOR_PVP_LVL3);
- + }
- + else if ((pvpKills >= (Config.PVP_LVL4)) && (pvpKills <= (Config.PVP_LVL4)))
- + {
- + setPrefix(Config.NAME_PREFIX_FOR_PVP_LVL4);
- + }
- + else if ((pvpKills >= (Config.PVP_LVL5)) && (pvpKills <= (Config.PVP_LVL5)))
- + {
- + setPrefix(Config.NAME_PREFIX_FOR_PVP_LVL5);
- + }
- + else if ((pvpKills >= (Config.PVP_LVL6)) && (pvpKills <= (Config.PVP_LVL6)))
- + {
- + setPrefix(Config.NAME_PREFIX_FOR_PVP_LVL6);
- + }
- + else if ((pvpKills >= (Config.PVP_LVL7)) && (pvpKills <= (Config.PVP_LVL7)))
- + {
- + setPrefix(Config.NAME_PREFIX_FOR_PVP_LVL7);
- + }
- + else if ((pvpKills >= (Config.PVP_LVL8)) && (pvpKills <= (Config.PVP_LVL8)))
- + {
- + setPrefix(Config.NAME_PREFIX_FOR_PVP_LVL8);
- + }
- + else if ((pvpKills >= (Config.PVP_LVL9)) && (pvpKills <= (Config.PVP_LVL9)))
- + {
- + setPrefix(Config.NAME_PREFIX_FOR_PVP_LVL9);
- + }
- + else if (pvpKills >= (Config.PVP_LVL10))
- + {
- + setPrefix(Config.NAME_PREFIX_FOR_PVP_LVL10);
- + }
- + }
- + }
- + }
- + private String _prefix;
- + public String getPrefix()
- + {
- + return _prefix;
- + }
- + public void setPrefix(String prefix)
- + {
- + _prefix = prefix;
- + }
- /**
- * Send a Server->Client packet UserInfo to this L2PcInstance and CharInfo to all L2PcInstance in its _KnownPlayers.<BR><BR>
- *
- @@ -5684,6 +5735,9 @@
- // Add karma to attacker and increase its PK counter
- setPvpKills(getPvpKills() + 1);
- + updatePrefix(getPvpKills());
- + broadcastUserInfo();
- +
- // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
- sendPacket(new UserInfo(this));
- sendPacket(new ExBrExtraUserInfo(this));
- Index: java/com/l2jserver/Config.java
- ===================================================================
- --- java/com/l2jserver/Config.java (revision 5538)
- +++ java/com/l2jserver/Config.java (working copy)
- @@ -725,6 +725,27 @@
- public static int L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
- public static int L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
- public static TIntIntHashMap L2JMOD_DUALBOX_CHECK_WHITELIST;
- + public static boolean PVP_PREFIX_SYSTEM_ENABLED;
- + public static final int PVP_LVL1;
- + public static final int PVP_LVL2;
- + public static final int PVP_LVL3;
- + public static final int PVP_LVL4;
- + public static final int PVP_LVL5;
- + public static final int PVP_LVL6;
- + public static final int PVP_LVL7;
- + public static final int PVP_LVL8;
- + public static final int PVP_LVL9;
- + public static final int PVP_LVL10;
- + public static final String NAME_PREFIX_FOR_PVP_LVL1;
- + public static final String NAME_PREFIX_FOR_PVP_LVL2;
- + public static final String NAME_PREFIX_FOR_PVP_LVL3;
- + public static final String NAME_PREFIX_FOR_PVP_LVL4;
- + public static final String NAME_PREFIX_FOR_PVP_LVL5;
- + public static final String NAME_PREFIX_FOR_PVP_LVL6;
- + public static final String NAME_PREFIX_FOR_PVP_LVL7;
- + public static final String NAME_PREFIX_FOR_PVP_LVL8;
- + public static final String NAME_PREFIX_FOR_PVP_LVL9;
- + public static final String NAME_PREFIX_FOR_PVP_LVL10;
- //--------------------------------------------------
- // NPC Settings
- @@ -2421,7 +2442,29 @@
- }
- }
- }
- -
- + // PVP Name Prefix System configs - Start
- + PVP_PREFIX_SYSTEM_ENABLED = Boolean.parseBoolean(L2JModSettings.getProperty("EnablePrefixSystem", "false"));
- + PVP_LVL1 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl1", "500"));
- + PVP_LVL2 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl2", "1000"));
- + PVP_LVL3 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl3", "2000"));
- + PVP_LVL4 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl4", "2500"));
- + PVP_LVL5 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl5", "3000"));
- + PVP_LVL6 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl6", "350"));
- + PVP_LVL7 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl7", "4000"));
- + PVP_LVL8 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl8", "4500"));
- + PVP_LVL9 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl9", "5000"));
- + PVP_LVL10 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl10", "7000"));
- + NAME_PREFIX_FOR_PVP_LVL1 = L2JModSettings.getProperty("PrefLvl1", "[Cadet]");
- + NAME_PREFIX_FOR_PVP_LVL2 = L2JModSettings.getProperty("PrefLvl2", "[Slayer]");
- + NAME_PREFIX_FOR_PVP_LVL3 = L2JModSettings.getProperty("PrefLvl3", "[Corporal]");
- + NAME_PREFIX_FOR_PVP_LVL4 = L2JModSettings.getProperty("PrefLvl4", "[Killer]");
- + NAME_PREFIX_FOR_PVP_LVL5 = L2JModSettings.getProperty("PrefLvl5", "[Executioner]");
- + NAME_PREFIX_FOR_PVP_LVL6 = L2JModSettings.getProperty("PrefLvl6", "[Most Wanted]");
- + NAME_PREFIX_FOR_PVP_LVL7 = L2JModSettings.getProperty("PrefLvl7", "[Enforcer}");
- + NAME_PREFIX_FOR_PVP_LVL8 = L2JModSettings.getProperty("PrefLvl8", "[Assasin}");
- + NAME_PREFIX_FOR_PVP_LVL9 = L2JModSettings.getProperty("PrefLvl9", "[Exterminator]");
- + NAME_PREFIX_FOR_PVP_LVL10 = L2JModSettings.getProperty("PrefLvl10", "[Lord of War]");
- + // PvP Name Prefix System configs - End
- BANKING_SYSTEM_ENABLED = Boolean.parseBoolean(L2JModSettings.getProperty("BankingEnabled", "false"));
- BANKING_SYSTEM_GOLDBARS = Integer.parseInt(L2JModSettings.getProperty("BankingGoldbarCount", "1"));
- BANKING_SYSTEM_ADENA = Integer.parseInt(L2JModSettings.getProperty("BankingAdenaCount", "500000000"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement