Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: java/com/l2jserver/Config.java
- ===================================================================
- --- java/com/l2jserver/Config.java (revision 4265)
- +++ java/com/l2jserver/Config.java (working copy)
- @@ -916,6 +932,14 @@
- public static int ENCHANT_MAX_JEWELRY;
- public static int ENCHANT_SAFE_MAX;
- public static int ENCHANT_SAFE_MAX_FULL;
- + //Dwarfsystem
- + public static boolean ENCHANT_DWARF_SYSTEM;
- + public static int ENCHANT_DWARF_1_ENCHANTLEVEL; // Dwarf enchant System Dwarf 1 Enchantlevel?
- + public static int ENCHANT_DWARF_2_ENCHANTLEVEL; // Dwarf enchant System Dwarf 2 Enchantlevel?
- + public static int ENCHANT_DWARF_3_ENCHANTLEVEL; // Dwarf enchant System Dwarf 3 Enchantlevel?
- + public static int ENCHANT_DWARF_1_CHANCE; // Dwarf enchant System Dwarf 1 chance?
- + public static int ENCHANT_DWARF_2_CHANCE; // Dwarf enchant System Dwarf 2 chance?
- + public static int ENCHANT_DWARF_3_CHANCE; // Dwarf enchant System Dwarf 3 chance?
- public static int AUGMENTATION_NG_SKILL_CHANCE;
- public static int AUGMENTATION_NG_GLOW_CHANCE;
- public static int AUGMENTATION_MID_SKILL_CHANCE;
- @@ -1427,6 +1488,13 @@
- ENCHANT_MAX_ARMOR = Integer.parseInt(Character.getProperty("EnchantMaxArmor", "0"));
- ENCHANT_MAX_JEWELRY = Integer.parseInt(Character.getProperty("EnchantMaxJewelry", "0"));
- ENCHANT_SAFE_MAX = Integer.parseInt(Character.getProperty("EnchantSafeMax", "3"));
- + ENCHANT_DWARF_SYSTEM = Boolean.parseBoolean(Character.getProperty("EnchantDwarfSystem", "False"));
- + ENCHANT_DWARF_1_ENCHANTLEVEL = Integer.parseInt(Character.getProperty("EnchantDwarf1Enchantlevel", "8"));
- + ENCHANT_DWARF_2_ENCHANTLEVEL = Integer.parseInt(Character.getProperty("EnchantDwarf2Enchantlevel", "10"));
- + ENCHANT_DWARF_3_ENCHANTLEVEL = Integer.parseInt(Character.getProperty("EnchantDwarf3Enchantlevel", "12"));
- + ENCHANT_DWARF_1_CHANCE = Integer.parseInt(Character.getProperty("EnchantDwarf1Chance", "15"));
- + ENCHANT_DWARF_2_CHANCE = Integer.parseInt(Character.getProperty("EnchantDwarf2Chance", "15"));
- + ENCHANT_DWARF_3_CHANCE = Integer.parseInt(Character.getProperty("EnchantDwarf3Chance", "15"));
- ENCHANT_SAFE_MAX_FULL = Integer.parseInt(Character.getProperty("EnchantSafeMaxFull", "4"));
- AUGMENTATION_NG_SKILL_CHANCE = Integer.parseInt(Character.getProperty("AugmentationNGSkillChance", "15"));
- AUGMENTATION_NG_GLOW_CHANCE = Integer.parseInt(Character.getProperty("AugmentationNGGlowChance", "0"));
- Index: java/com/l2jserver/gameserver/network/clientpackets/AbstractEnchantPacket.java
- ===================================================================
- --- java/com/l2jserver/gameserver/network/clientpackets/AbstractEnchantPacket.java (revision 4265)
- +++ java/com/l2jserver/gameserver/network/clientpackets/AbstractEnchantPacket.java (working copy)
- @@ -22,6 +22,8 @@
- import com.l2jserver.gameserver.model.L2ItemInstance;
- import com.l2jserver.gameserver.templates.item.L2Item;
- import com.l2jserver.gameserver.templates.item.L2WeaponType;
- +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jserver.gameserver.model.base.Race;
- public abstract class AbstractEnchantPacket extends L2GameClientPacket
- @@ -152,7 +154,7 @@
- return isValid(enchantItem);
- }
- - public final int getChance(L2ItemInstance enchantItem, EnchantItem supportItem)
- + public final int getChance(L2ItemInstance enchantItem, EnchantItem supportItem, L2PcInstance activeChar)
- {
- if (!isValid(enchantItem, supportItem))
- return -1;
- @@ -187,6 +189,17 @@
- else
- chance = Config.ENCHANT_CHANCE_ARMOR;
- }
- + if (activeChar.getRace() == Race.Dwarf && Config.ENCHANT_DWARF_SYSTEM)
- + {
- + int _charlevel = activeChar.getLevel();
- + int _itemlevel = enchantItem.getEnchantLevel();
- + if (_charlevel >= 20 && _itemlevel <= Config.ENCHANT_DWARF_1_ENCHANTLEVEL)
- + chance = chance + Config.ENCHANT_DWARF_1_CHANCE;
- + else if (_charlevel >= 40 && _itemlevel <= Config.ENCHANT_DWARF_2_ENCHANTLEVEL)
- + chance = chance + Config.ENCHANT_DWARF_2_CHANCE;
- + else if (_charlevel >= 76 && _itemlevel <= Config.ENCHANT_DWARF_3_ENCHANTLEVEL)
- + chance = Config.ENCHANT_DWARF_3_CHANCE;
- + }
- chance += _chanceAdd;
- @@ -239,10 +252,11 @@
- _scrolls.put(22011, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_C, 0, 10, null));
- _scrolls.put(22012, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_B, 0, 10, null));
- _scrolls.put(22013, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_A, 0, 10, null));
- - _scrolls.put(22014, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_B, 16, 10, null));
- - _scrolls.put(22015, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_A, 16, 10, null));
- - _scrolls.put(22016, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_B, 16, 10, null));
- - _scrolls.put(22017, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_A, 16, 10, null));
- + _scrolls.put(22014, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_B, 0, 10, null));
- + _scrolls.put(22015, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_A, 0, 10, null));
- + _scrolls.put(22016, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_B, 0, 10, null));
- + _scrolls.put(22017, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_A, 0, 10, null));
- + _scrolls.put(20519, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_S, 0, 10, null));
- _scrolls.put(22018, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_B, 0, 100, null));
- _scrolls.put(22019, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_A, 0, 100, null));
- _scrolls.put(22020, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_B, 0, 100, null));
- Index: java/com/l2jserver/gameserver/network/clientpackets/RequestEnchantItem.java
- ===================================================================
- --- java/com/l2jserver/gameserver/network/clientpackets/RequestEnchantItem.java (revision 4265)
- +++ java/com/l2jserver/gameserver/network/clientpackets/RequestEnchantItem.java (working copy)
- @@ -139,7 +139,7 @@
- synchronized (item)
- {
- - int chance = scrollTemplate.getChance(item, supportTemplate);
- + int chance = scrollTemplate.getChance(item, supportTemplate, activeChar);
- L2Skill enchant4Skill = null;
- L2Item it = item.getItem();
- Index: java/config/Character.properties
- ===================================================================
- --- java/config/Character.properties (revision 4265)
- +++ java/config/Character.properties (working copy)
- @@ -325,7 +325,34 @@
- EnchantSafeMax = 3
- EnchantSafeMaxFull = 4
- +#============================================================#
- +# Dwarfen Enchantsystem #
- +#============================================================#
- +# if enabled a lvl 20 dwarf can enchant up to 5
- +# Alternate Dwarf enchant system (default: false)
- +# lvl 40 up to 10
- +# lvl 70 up to 15
- +# Dwarf from lvl 20 can enchant up to EnchantDwarf1Enchantlevel with a chance bonus from + EnchantDwarf1Chance
- +# Dwarf from lvl 40 can enchant up to EnchantDwarf2Enchantlevel with a chance bonus from + EnchantDwarf2Chance
- +# Dwarf from lvl 76 can enchant up to EnchantDwarf3Enchantlevel with a chance bonus from + EnchantDwarf3Chance
- +EnchantDwarfSystem = True
- +EnchantDwarf1Enchantlevel = 4
- +EnchantDwarf2Enchantlevel = 5
- +EnchantDwarf3Enchantlevel = 6
- +EnchantDwarf1Chance = 100
- +EnchantDwarf2Chance = 100
- +EnchantDwarf3Chance = 100
- +# This is the maximum safe enchant.
- +# Notes:
- +# If EnchantSafeMax is set to for 8 the item will be safely enchanted to 8 regardless of the max enchant value set above.
- +# EnchantSafeMaxFull is for full body armor (upper and lower).
- +# These values should always be greater than 0.
- +# Default: 3, 4
- +EnchantSafeMax = 3
- +EnchantSafeMaxFull = 4
- +
- +
- # ---------------------------------------------------------------------------
- # Augmenting
- # ---------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement