Advertisement
-JRGames-

L2JSanne Augument VIP

Jul 16th, 2022
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2jSanne_GameServer
  3. Index: head-src/com/l2jfrozen/Config.java
  4. ===================================================================
  5. --- head-src/com/l2jfrozen/Config.java (revision 52)
  6. +++ head-src/com/l2jfrozen/Config.java (working copy)
  7. @@ -3108,6 +3108,11 @@
  8. public static int AUGMENTATION_MID_SKILL_CHANCE;
  9. public static int AUGMENTATION_HIGH_SKILL_CHANCE;
  10. public static int AUGMENTATION_TOP_SKILL_CHANCE;
  11. + // Augment Vip Chance
  12. + public static int AUGMENTATION_VIP_NG_SKILL_CHANCE;
  13. + public static int AUGMENTATION_VIP_MID_SKILL_CHANCE;
  14. + public static int AUGMENTATION_VIP_HIGH_SKILL_CHANCE;
  15. + public static int AUGMENTATION_VIP_TOP_SKILL_CHANCE;
  16. public static int AUGMENTATION_BASESTAT_CHANCE;
  17. // Augment glow
  18. public static int AUGMENTATION_NG_GLOW_CHANCE;
  19. @@ -3410,8 +3415,15 @@
  20. AUGMENTATION_MID_SKILL_CHANCE = Integer.parseInt(ENCHANTSetting.getProperty("AugmentationMidSkillChance", "30"));
  21. AUGMENTATION_HIGH_SKILL_CHANCE = Integer.parseInt(ENCHANTSetting.getProperty("AugmentationHighSkillChance", "45"));
  22. AUGMENTATION_TOP_SKILL_CHANCE = Integer.parseInt(ENCHANTSetting.getProperty("AugmentationTopSkillChance", "60"));
  23. +
  24. + /** augmentation Vip chance **/
  25. + AUGMENTATION_VIP_NG_SKILL_CHANCE = Integer.parseInt(ENCHANTSetting.getProperty("AugmentationVIPNGSkillChance", "15"));
  26. + AUGMENTATION_VIP_MID_SKILL_CHANCE = Integer.parseInt(ENCHANTSetting.getProperty("AugmentationVIPMidSkillChance", "30"));
  27. + AUGMENTATION_VIP_HIGH_SKILL_CHANCE = Integer.parseInt(ENCHANTSetting.getProperty("AugmentationVIPHighSkillChance", "45"));
  28. + AUGMENTATION_VIP_TOP_SKILL_CHANCE = Integer.parseInt(ENCHANTSetting.getProperty("AugmentationVIPTopSkillChance", "60"));
  29. AUGMENTATION_BASESTAT_CHANCE = Integer.parseInt(ENCHANTSetting.getProperty("AugmentationBaseStatChance", "1"));
  30.  
  31. +
  32. /** augmentation glow **/
  33. AUGMENTATION_NG_GLOW_CHANCE = Integer.parseInt(ENCHANTSetting.getProperty("AugmentationNGGlowChance", "0"));
  34. AUGMENTATION_MID_GLOW_CHANCE = Integer.parseInt(ENCHANTSetting.getProperty("AugmentationMidGlowChance", "40"));
  35. @@ -5199,6 +5211,22 @@
  36. {
  37. AUGMENTATION_TOP_SKILL_CHANCE = Integer.parseInt(pValue);
  38. }
  39. + else if(pName.equalsIgnoreCase("AugmentationVIPNGSkillChance"))
  40. + {
  41. + AUGMENTATION_VIP_NG_SKILL_CHANCE = Integer.parseInt(pValue);
  42. + }
  43. + else if(pName.equalsIgnoreCase("AugmentationVIPMidSkillChance"))
  44. + {
  45. + AUGMENTATION_VIP_MID_SKILL_CHANCE = Integer.parseInt(pValue);
  46. + }
  47. + else if(pName.equalsIgnoreCase("AugmentationVIPHighSkillChance"))
  48. + {
  49. + AUGMENTATION_VIP_HIGH_SKILL_CHANCE = Integer.parseInt(pValue);
  50. + }
  51. + else if(pName.equalsIgnoreCase("AugmentationVIPTopSkillChance"))
  52. + {
  53. + AUGMENTATION_VIP_TOP_SKILL_CHANCE = Integer.parseInt(pValue);
  54. + }
  55. else if(pName.equalsIgnoreCase("AugmentationBaseStatChance"))
  56. {
  57. AUGMENTATION_BASESTAT_CHANCE = Integer.parseInt(pValue);
  58. Index: config/head/enchant.properties
  59. ===================================================================
  60. --- config/head/enchant.properties (revision 50)
  61. +++ config/head/enchant.properties (working copy)
  62. @@ -87,6 +87,13 @@
  63. AugmentationMidSkillChance = 30
  64. AugmentationHighSkillChance = 45
  65. AugmentationTopSkillChance = 60
  66. +# --------------------------
  67. +# Augmentation Vip Chance -
  68. +# --------------------------
  69. +AugmentationVIPNGSkillChance = 15
  70. +AugmentationVIPMidSkillChance = 30
  71. +AugmentationVIPHighSkillChance = 45
  72. +AugmentationVIPTopSkillChance = 60
  73. # Chance to get a base stat
  74. # Default: 1
  75. AugmentationBaseStatChance = 1
  76. Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestRefine.java
  77. ===================================================================
  78. --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestRefine.java (revision 50)
  79. +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestRefine.java (working copy)
  80. @@ -253,7 +253,7 @@
  81. player.destroyItem("RequestRefine", _gemstoneItemObjId, modifyGemstoneCount, null, false);
  82.  
  83. // generate augmentation
  84. - targetItem.setAugmentation(AugmentationData.getInstance().generateRandomAugmentation(targetItem, lifeStoneLevel, lifeStoneGrade));
  85. + targetItem.setAugmentation(AugmentationData.getInstance().generateRandomAugmentation(player, targetItem, lifeStoneLevel, lifeStoneGrade));
  86.  
  87. // finish and send the inventory update packet
  88. InventoryUpdate iu = new InventoryUpdate();
  89. Index: head-src/com/l2jfrozen/gameserver/datatables/xml/AugmentationData.java
  90. ===================================================================
  91. --- head-src/com/l2jfrozen/gameserver/datatables/xml/AugmentationData.java (revision 50)
  92. +++ head-src/com/l2jfrozen/gameserver/datatables/xml/AugmentationData.java (working copy)
  93. @@ -38,6 +38,7 @@
  94. import com.l2jfrozen.gameserver.model.L2Augmentation;
  95. import com.l2jfrozen.gameserver.model.L2Skill;
  96. import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
  97. +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  98. import com.l2jfrozen.gameserver.skills.Stats;
  99. import com.l2jfrozen.util.random.Rnd;
  100.  
  101. @@ -443,12 +444,13 @@
  102. /**
  103. * Generate a new random augmentation
  104. *
  105. + * @param player
  106. * @param item
  107. * @param lifeStoneLevel
  108. * @param lifeStoneGrade
  109. * @return L2Augmentation
  110. */
  111. - public L2Augmentation generateRandomAugmentation(L2ItemInstance item, int lifeStoneLevel, int lifeStoneGrade)
  112. + public L2Augmentation generateRandomAugmentation(L2PcInstance player, L2ItemInstance item, int lifeStoneLevel, int lifeStoneGrade)
  113. {
  114. // Note that stat12 stands for stat 1 AND 2 (same for stat34 ;p )
  115. // this is because a value can contain up to 2 stat modifications
  116. @@ -466,7 +468,10 @@
  117. switch(lifeStoneGrade)
  118. {
  119. case 0:
  120. - skill_Chance = Config.AUGMENTATION_NG_SKILL_CHANCE;
  121. + if(player.isVip())
  122. + skill_Chance = Config.AUGMENTATION_VIP_NG_SKILL_CHANCE;
  123. + else
  124. + skill_Chance = Config.AUGMENTATION_NG_SKILL_CHANCE;
  125.  
  126. if(Rnd.get(1, 100) <= Config.AUGMENTATION_NG_GLOW_CHANCE)
  127. {
  128. @@ -475,8 +480,12 @@
  129. break;
  130.  
  131. case 1:
  132. - skill_Chance = Config.AUGMENTATION_MID_SKILL_CHANCE;
  133. + if(player.isVip())
  134. + skill_Chance = Config.AUGMENTATION_VIP_MID_SKILL_CHANCE;
  135. + else
  136. + skill_Chance = Config.AUGMENTATION_MID_SKILL_CHANCE;
  137.  
  138. +
  139. if(Rnd.get(1, 100) <= Config.AUGMENTATION_MID_GLOW_CHANCE)
  140. {
  141. generateGlow = true;
  142. @@ -484,8 +493,12 @@
  143. break;
  144.  
  145. case 2:
  146. - skill_Chance = Config.AUGMENTATION_HIGH_SKILL_CHANCE;
  147. + if(player.isVip())
  148. + skill_Chance = Config.AUGMENTATION_VIP_HIGH_SKILL_CHANCE;
  149. + else
  150. + skill_Chance = Config.AUGMENTATION_HIGH_SKILL_CHANCE;
  151.  
  152. +
  153. if(Rnd.get(1, 100) <= Config.AUGMENTATION_HIGH_GLOW_CHANCE)
  154. {
  155. generateGlow = true;
  156. @@ -493,8 +506,12 @@
  157. break;
  158.  
  159. case 3:
  160. - skill_Chance = Config.AUGMENTATION_TOP_SKILL_CHANCE;
  161. + if(player.isVip())
  162. + skill_Chance = Config.AUGMENTATION_VIP_TOP_SKILL_CHANCE;
  163. + else
  164. + skill_Chance = Config.AUGMENTATION_TOP_SKILL_CHANCE;
  165.  
  166. +
  167. if(Rnd.get(1, 100) <= Config.AUGMENTATION_TOP_GLOW_CHANCE)
  168. {
  169. generateGlow = true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement