2
0
Эх сурвалжийг харах

BETA: Config for default enchant rate

Rumen Nikiforov 13 жил өмнө
parent
commit
92b0cf617b

+ 4 - 0
L2J_Server_BETA/dist/game/config/Character.properties

@@ -365,6 +365,10 @@ NpcTalkBlockingTime = 3
 # ---------------------------------------------------------------------------
 # Enchanting
 # ---------------------------------------------------------------------------
+# Base rate for scrolls of enchant
+# Default: 66.66
+EnchantChance = 66.66
+
 # This controls the chance an item has to break if it is enchanted.
 # This chance is in %, so if you set this to 100%, enchants will always succeed.
 # DEFAULT NEEDS TO BE VERIFIED, MUST BE CHANGED HERE AND IN CONFIG.JAVA IF NOT CORRECT

+ 2 - 0
L2J_Server_BETA/java/com/l2jserver/Config.java

@@ -1003,6 +1003,7 @@ public final class Config
 	}
 	public static ObjectMapType MAP_TYPE;
 	public static ObjectSetType SET_TYPE;
+	public static double ENCHANT_CHANCE;
 	public static double ENCHANT_CHANCE_ELEMENT_STONE;
 	public static double ENCHANT_CHANCE_ELEMENT_CRYSTAL;
 	public static double ENCHANT_CHANCE_ELEMENT_JEWEL;
@@ -1631,6 +1632,7 @@ public final class Config
 					WAREHOUSE_SLOTS_CLAN = Integer.parseInt(Character.getProperty("MaximumWarehouseSlotsForClan", "150"));
 					ALT_FREIGHT_SLOTS = Integer.parseInt(Character.getProperty("MaximumFreightSlots", "200"));
 					ALT_FREIGHT_PRIECE = Integer.parseInt(Character.getProperty("FreightPriece", "1000"));
+					ENCHANT_CHANCE = Double.parseDouble(Character.getProperty("EnchantChance", "66.66"));
 					ENCHANT_CHANCE_ELEMENT_STONE = Double.parseDouble(Character.getProperty("EnchantChanceElementStone", "50"));
 					ENCHANT_CHANCE_ELEMENT_CRYSTAL = Double.parseDouble(Character.getProperty("EnchantChanceElementCrystal", "30"));
 					ENCHANT_CHANCE_ELEMENT_JEWEL = Double.parseDouble(Character.getProperty("EnchantChanceElementJewel", "20"));

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/EnchantItemTable.java

@@ -88,7 +88,7 @@ public class EnchantItemTable
 						boolean isSafe = false;
 						int type = L2Item.CRYSTAL_NONE;
 						int maxEnchant = 0;
-						double chance = 66.66;
+						double chance = Config.ENCHANT_CHANCE;
 						int[] items = null;
 						
 						NamedNodeMap attrs = n.getAttributes();