Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.01 KB | None | 0 0
  1. Index: java/com/l2jserver/Config.java
  2. ===================================================================
  3. --- java/com/l2jserver/Config.java (revision 4265)
  4. +++ java/com/l2jserver/Config.java (working copy)
  5. @@ -916,6 +932,14 @@
  6. public static int ENCHANT_MAX_JEWELRY;
  7. public static int ENCHANT_SAFE_MAX;
  8. public static int ENCHANT_SAFE_MAX_FULL;
  9. + //Dwarfsystem
  10. + public static boolean ENCHANT_DWARF_SYSTEM;
  11. + public static int ENCHANT_DWARF_1_ENCHANTLEVEL; // Dwarf enchant System Dwarf 1 Enchantlevel?
  12. + public static int ENCHANT_DWARF_2_ENCHANTLEVEL; // Dwarf enchant System Dwarf 2 Enchantlevel?
  13. + public static int ENCHANT_DWARF_3_ENCHANTLEVEL; // Dwarf enchant System Dwarf 3 Enchantlevel?
  14. + public static int ENCHANT_DWARF_1_CHANCE; // Dwarf enchant System Dwarf 1 chance?
  15. + public static int ENCHANT_DWARF_2_CHANCE; // Dwarf enchant System Dwarf 2 chance?
  16. + public static int ENCHANT_DWARF_3_CHANCE; // Dwarf enchant System Dwarf 3 chance?
  17. public static int AUGMENTATION_NG_SKILL_CHANCE;
  18. public static int AUGMENTATION_NG_GLOW_CHANCE;
  19. public static int AUGMENTATION_MID_SKILL_CHANCE;
  20. @@ -1427,6 +1488,13 @@
  21. ENCHANT_MAX_ARMOR = Integer.parseInt(Character.getProperty("EnchantMaxArmor", "0"));
  22. ENCHANT_MAX_JEWELRY = Integer.parseInt(Character.getProperty("EnchantMaxJewelry", "0"));
  23. ENCHANT_SAFE_MAX = Integer.parseInt(Character.getProperty("EnchantSafeMax", "3"));
  24. + ENCHANT_DWARF_SYSTEM = Boolean.parseBoolean(Character.getProperty("EnchantDwarfSystem", "False"));
  25. + ENCHANT_DWARF_1_ENCHANTLEVEL = Integer.parseInt(Character.getProperty("EnchantDwarf1Enchantlevel", "8"));
  26. + ENCHANT_DWARF_2_ENCHANTLEVEL = Integer.parseInt(Character.getProperty("EnchantDwarf2Enchantlevel", "10"));
  27. + ENCHANT_DWARF_3_ENCHANTLEVEL = Integer.parseInt(Character.getProperty("EnchantDwarf3Enchantlevel", "12"));
  28. + ENCHANT_DWARF_1_CHANCE = Integer.parseInt(Character.getProperty("EnchantDwarf1Chance", "15"));
  29. + ENCHANT_DWARF_2_CHANCE = Integer.parseInt(Character.getProperty("EnchantDwarf2Chance", "15"));
  30. + ENCHANT_DWARF_3_CHANCE = Integer.parseInt(Character.getProperty("EnchantDwarf3Chance", "15"));
  31. ENCHANT_SAFE_MAX_FULL = Integer.parseInt(Character.getProperty("EnchantSafeMaxFull", "4"));
  32. AUGMENTATION_NG_SKILL_CHANCE = Integer.parseInt(Character.getProperty("AugmentationNGSkillChance", "15"));
  33. AUGMENTATION_NG_GLOW_CHANCE = Integer.parseInt(Character.getProperty("AugmentationNGGlowChance", "0"));
  34. Index: java/com/l2jserver/gameserver/network/clientpackets/AbstractEnchantPacket.java
  35. ===================================================================
  36. --- java/com/l2jserver/gameserver/network/clientpackets/AbstractEnchantPacket.java (revision 4265)
  37. +++ java/com/l2jserver/gameserver/network/clientpackets/AbstractEnchantPacket.java (working copy)
  38. @@ -22,6 +22,8 @@
  39. import com.l2jserver.gameserver.model.L2ItemInstance;
  40. import com.l2jserver.gameserver.templates.item.L2Item;
  41. import com.l2jserver.gameserver.templates.item.L2WeaponType;
  42. +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  43. +import com.l2jserver.gameserver.model.base.Race;
  44.  
  45.  
  46. public abstract class AbstractEnchantPacket extends L2GameClientPacket
  47. @@ -152,7 +154,7 @@
  48. return isValid(enchantItem);
  49. }
  50.  
  51. - public final int getChance(L2ItemInstance enchantItem, EnchantItem supportItem)
  52. + public final int getChance(L2ItemInstance enchantItem, EnchantItem supportItem, L2PcInstance activeChar)
  53. {
  54. if (!isValid(enchantItem, supportItem))
  55. return -1;
  56. @@ -187,6 +189,17 @@
  57. else
  58. chance = Config.ENCHANT_CHANCE_ARMOR;
  59. }
  60. + if (activeChar.getRace() == Race.Dwarf && Config.ENCHANT_DWARF_SYSTEM)
  61. + {
  62. + int _charlevel = activeChar.getLevel();
  63. + int _itemlevel = enchantItem.getEnchantLevel();
  64. + if (_charlevel >= 20 && _itemlevel <= Config.ENCHANT_DWARF_1_ENCHANTLEVEL)
  65. + chance = chance + Config.ENCHANT_DWARF_1_CHANCE;
  66. + else if (_charlevel >= 40 && _itemlevel <= Config.ENCHANT_DWARF_2_ENCHANTLEVEL)
  67. + chance = chance + Config.ENCHANT_DWARF_2_CHANCE;
  68. + else if (_charlevel >= 76 && _itemlevel <= Config.ENCHANT_DWARF_3_ENCHANTLEVEL)
  69. + chance = Config.ENCHANT_DWARF_3_CHANCE;
  70. + }
  71.  
  72. chance += _chanceAdd;
  73.  
  74. @@ -239,10 +252,11 @@
  75. _scrolls.put(22011, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_C, 0, 10, null));
  76. _scrolls.put(22012, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_B, 0, 10, null));
  77. _scrolls.put(22013, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_A, 0, 10, null));
  78. - _scrolls.put(22014, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_B, 16, 10, null));
  79. - _scrolls.put(22015, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_A, 16, 10, null));
  80. - _scrolls.put(22016, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_B, 16, 10, null));
  81. - _scrolls.put(22017, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_A, 16, 10, null));
  82. + _scrolls.put(22014, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_B, 0, 10, null));
  83. + _scrolls.put(22015, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_A, 0, 10, null));
  84. + _scrolls.put(22016, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_B, 0, 10, null));
  85. + _scrolls.put(22017, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_A, 0, 10, null));
  86. + _scrolls.put(20519, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_S, 0, 10, null));
  87. _scrolls.put(22018, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_B, 0, 100, null));
  88. _scrolls.put(22019, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_A, 0, 100, null));
  89. _scrolls.put(22020, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_B, 0, 100, null));
  90. Index: java/com/l2jserver/gameserver/network/clientpackets/RequestEnchantItem.java
  91. ===================================================================
  92. --- java/com/l2jserver/gameserver/network/clientpackets/RequestEnchantItem.java (revision 4265)
  93. +++ java/com/l2jserver/gameserver/network/clientpackets/RequestEnchantItem.java (working copy)
  94. @@ -139,7 +139,7 @@
  95.  
  96. synchronized (item)
  97. {
  98. - int chance = scrollTemplate.getChance(item, supportTemplate);
  99. + int chance = scrollTemplate.getChance(item, supportTemplate, activeChar);
  100.  
  101. L2Skill enchant4Skill = null;
  102. L2Item it = item.getItem();
  103. Index: java/config/Character.properties
  104. ===================================================================
  105. --- java/config/Character.properties (revision 4265)
  106. +++ java/config/Character.properties (working copy)
  107. @@ -325,7 +325,34 @@
  108. EnchantSafeMax = 3
  109. EnchantSafeMaxFull = 4
  110.  
  111. +#============================================================#
  112. +# Dwarfen Enchantsystem #
  113. +#============================================================#
  114. +# if enabled a lvl 20 dwarf can enchant up to 5
  115. +# Alternate Dwarf enchant system (default: false)
  116. +# lvl 40 up to 10
  117. +# lvl 70 up to 15
  118. +# Dwarf from lvl 20 can enchant up to EnchantDwarf1Enchantlevel with a chance bonus from + EnchantDwarf1Chance
  119. +# Dwarf from lvl 40 can enchant up to EnchantDwarf2Enchantlevel with a chance bonus from + EnchantDwarf2Chance
  120. +# Dwarf from lvl 76 can enchant up to EnchantDwarf3Enchantlevel with a chance bonus from + EnchantDwarf3Chance
  121. +EnchantDwarfSystem = True
  122. +EnchantDwarf1Enchantlevel = 4
  123. +EnchantDwarf2Enchantlevel = 5
  124. +EnchantDwarf3Enchantlevel = 6
  125. +EnchantDwarf1Chance = 100
  126. +EnchantDwarf2Chance = 100
  127. +EnchantDwarf3Chance = 100
  128.  
  129. +# This is the maximum safe enchant.
  130. +# Notes:
  131. +# If EnchantSafeMax is set to for 8 the item will be safely enchanted to 8 regardless of the max enchant value set above.
  132. +# EnchantSafeMaxFull is for full body armor (upper and lower).
  133. +# These values should always be greater than 0.
  134. +# Default: 3, 4
  135. +EnchantSafeMax = 3
  136. +EnchantSafeMaxFull = 4
  137. +
  138. +
  139. # ---------------------------------------------------------------------------
  140. # Augmenting
  141. # ---------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement