Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.32 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2J_Server
  3. Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
  4. ===================================================================
  5. --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 4684)
  6. +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy)
  7. @@ -574,6 +574,11 @@
  8. private boolean _noble = false;
  9. private boolean _hero = false;
  10.  
  11. + /** Special hero aura values */
  12. + private int heroConsecutiveKillCount = 0;
  13. + private boolean isPermaHero = false;
  14. + private boolean isPVPHero = false;
  15. +
  16. /** The L2FolkInstance corresponding to the last Folk wich one the player talked. */
  17. private L2Npc _lastFolkNpc = null;
  18.  
  19. @@ -2530,6 +2535,13 @@
  20. public void setPvpKills(int pvpKills)
  21. {
  22. _pvpKills = pvpKills;
  23. +
  24. + // Set hero aura if pvp kills > 100
  25. + if (pvpKills > 100)
  26. + {
  27. + isPermaHero = true;
  28. + setHero(true);
  29. + }
  30. }
  31.  
  32. /**
  33. @@ -5466,7 +5478,14 @@
  34.  
  35. stopRentPet();
  36. stopWaterTask();
  37. -
  38. +
  39. + // Remove kill count for special hero aura if total pvp < 100
  40. + heroConsecutiveKillCount = 0;
  41. + if (!isPermaHero)
  42. + {
  43. + setHero(false);
  44. + sendPacket(new UserInfo(this));
  45. + }
  46. AntiFeedManager.getInstance().setLastDeathTime(getObjectId());
  47.  
  48. if (isPhoenixBlessed())
  49. @@ -5671,7 +5690,13 @@
  50. {
  51. // Add karma to attacker and increase its PK counter
  52. setPvpKills(getPvpKills() + 1);
  53. -
  54. +
  55. + // Increase the kill count for a special hero aura
  56. + heroConsecutiveKillCount++;
  57. +
  58. + // If heroConsecutiveKillCount > 4 (5+ kills) give hero aura
  59. + if(heroConsecutiveKillCount > 4)
  60. + setHero(true);
  61. // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
  62. sendPacket(new UserInfo(this));
  63. sendPacket(new ExBrExtraUserInfo(this));
  64. @@ -10165,7 +10190,24 @@
  65. public BlockList getBlockList()
  66. {
  67. return _blockList;
  68. +
  69. }
  70. +
  71. + public void reloadPVPHeroAura()
  72. + {
  73. + sendPacket(new UserInfo(this));
  74. + }
  75. +
  76. + public void setHeroAura (boolean heroAura)
  77. + {
  78. + isPVPHero = heroAura;
  79. + return;
  80. + }
  81. +
  82. + public boolean getIsPVPHero()
  83. + {
  84. + return isPVPHero;
  85. + }
  86.  
  87. public void setHero(boolean hero)
  88. {
  89. Index: java/com/l2jserver/Config.java
  90. ===================================================================
  91. --- java/com/l2jserver/Config.java (revision 4682)
  92. +++ java/com/l2jserver/Config.java (working copy)
  93. @@ -53,6 +53,9 @@
  94. {
  95. protected static final Logger _log = Logger.getLogger(Config.class.getName());
  96.  
  97. + // Custom Starting Level
  98. + public static boolean is_PVP_HERO;
  99. +
  100. //--------------------------------------------------
  101. // L2J Property File Definitions
  102. //--------------------------------------------------
  103. @@ -2196,7 +2199,7 @@
  104. L2Properties L2JModSettings = new L2Properties();
  105. is = new FileInputStream(new File(L2JMOD_CONFIG_FILE));
  106. L2JModSettings.load(is);
  107. -
  108. + is_PVP_HERO = Boolean.parseBoolean(L2JModSettings.getProperty("AllowHeroPvP", "False"));
  109. L2JMOD_CHAMPION_ENABLE = Boolean.parseBoolean(L2JModSettings.getProperty("ChampionEnable", "false"));
  110. L2JMOD_CHAMPION_PASSIVE = Boolean.parseBoolean(L2JModSettings.getProperty("ChampionPassive", "false"));
  111. L2JMOD_CHAMPION_FREQUENCY = Integer.parseInt(L2JModSettings.getProperty("ChampionFrequency", "0"));
  112.  
  113. Index: java/config/l2jmods.properties
  114. ===================================================================
  115. --- java/config/l2jmods.properties (revision 4688)
  116. +++ java/config/l2jmods.properties (working copy)
  117. @@ -426,3 +426,10 @@
  118. # will be 1+2=3. Use 0 or negative value for unlimited number of connections.
  119. # Default: 127.0.0.1,0 (no limits from localhost)
  120. DualboxCheckWhitelist = 127.0.0.1,0
  121. +
  122. +# ---------------------------------------------------------------------------
  123. +# Pvp Hero
  124. +# ---------------------------------------------------------------------------
  125. +# After 100 pvp you get Hero Aura Permanent
  126. +# After 5 kills in row you get Hero Aura until you die
  127. +AllowPvPHero = False
  128. \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement