Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P L2J_Server
- Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 4684)
- +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy)
- @@ -574,6 +574,11 @@
- private boolean _noble = false;
- private boolean _hero = false;
- + /** Special hero aura values */
- + private int heroConsecutiveKillCount = 0;
- + private boolean isPermaHero = false;
- + private boolean isPVPHero = false;
- +
- /** The L2FolkInstance corresponding to the last Folk wich one the player talked. */
- private L2Npc _lastFolkNpc = null;
- @@ -2530,6 +2535,13 @@
- public void setPvpKills(int pvpKills)
- {
- _pvpKills = pvpKills;
- +
- + // Set hero aura if pvp kills > 100
- + if (pvpKills > 100)
- + {
- + isPermaHero = true;
- + setHero(true);
- + }
- }
- /**
- @@ -5466,7 +5478,14 @@
- stopRentPet();
- stopWaterTask();
- -
- +
- + // Remove kill count for special hero aura if total pvp < 100
- + heroConsecutiveKillCount = 0;
- + if (!isPermaHero)
- + {
- + setHero(false);
- + sendPacket(new UserInfo(this));
- + }
- AntiFeedManager.getInstance().setLastDeathTime(getObjectId());
- if (isPhoenixBlessed())
- @@ -5671,7 +5690,13 @@
- {
- // Add karma to attacker and increase its PK counter
- setPvpKills(getPvpKills() + 1);
- -
- +
- + // Increase the kill count for a special hero aura
- + heroConsecutiveKillCount++;
- +
- + // If heroConsecutiveKillCount > 4 (5+ kills) give hero aura
- + if(heroConsecutiveKillCount > 4)
- + setHero(true);
- // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
- sendPacket(new UserInfo(this));
- sendPacket(new ExBrExtraUserInfo(this));
- @@ -10165,7 +10190,24 @@
- public BlockList getBlockList()
- {
- return _blockList;
- +
- }
- +
- + public void reloadPVPHeroAura()
- + {
- + sendPacket(new UserInfo(this));
- + }
- +
- + public void setHeroAura (boolean heroAura)
- + {
- + isPVPHero = heroAura;
- + return;
- + }
- +
- + public boolean getIsPVPHero()
- + {
- + return isPVPHero;
- + }
- public void setHero(boolean hero)
- {
- Index: java/com/l2jserver/Config.java
- ===================================================================
- --- java/com/l2jserver/Config.java (revision 4682)
- +++ java/com/l2jserver/Config.java (working copy)
- @@ -53,6 +53,9 @@
- {
- protected static final Logger _log = Logger.getLogger(Config.class.getName());
- + // Custom Starting Level
- + public static boolean is_PVP_HERO;
- +
- //--------------------------------------------------
- // L2J Property File Definitions
- //--------------------------------------------------
- @@ -2196,7 +2199,7 @@
- L2Properties L2JModSettings = new L2Properties();
- is = new FileInputStream(new File(L2JMOD_CONFIG_FILE));
- L2JModSettings.load(is);
- -
- + is_PVP_HERO = Boolean.parseBoolean(L2JModSettings.getProperty("AllowHeroPvP", "False"));
- L2JMOD_CHAMPION_ENABLE = Boolean.parseBoolean(L2JModSettings.getProperty("ChampionEnable", "false"));
- L2JMOD_CHAMPION_PASSIVE = Boolean.parseBoolean(L2JModSettings.getProperty("ChampionPassive", "false"));
- L2JMOD_CHAMPION_FREQUENCY = Integer.parseInt(L2JModSettings.getProperty("ChampionFrequency", "0"));
- Index: java/config/l2jmods.properties
- ===================================================================
- --- java/config/l2jmods.properties (revision 4688)
- +++ java/config/l2jmods.properties (working copy)
- @@ -426,3 +426,10 @@
- # will be 1+2=3. Use 0 or negative value for unlimited number of connections.
- # Default: 127.0.0.1,0 (no limits from localhost)
- DualboxCheckWhitelist = 127.0.0.1,0
- +
- +# ---------------------------------------------------------------------------
- +# Pvp Hero
- +# ---------------------------------------------------------------------------
- +# After 100 pvp you get Hero Aura Permanent
- +# After 5 kills in row you get Hero Aura until you die
- +AllowPvPHero = False
- \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement