瀏覽代碼

BETA: One more enchant related config MaxEnchantLevel
It will be used only for default value (When you haven't added maxEnchantLevel="XX") to enchants.

Rumen Nikiforov 13 年之前
父節點
當前提交
bb1dc14ad1

+ 6 - 2
L2J_Server_BETA/dist/game/config/Character.properties

@@ -365,9 +365,13 @@ NpcTalkBlockingTime = 3
 # ---------------------------------------------------------------------------
 # Enchanting
 # ---------------------------------------------------------------------------
-# Base rate for scrolls of enchant
+# Default enchant rate for scrolls.
+# Be aware the data in enchantData.xml will override those values!
+# This is just default data (For enchants with not defined such variables)
 # Default: 66.66
-EnchantChance = 66.66
+EnchantChance = 66.66 
+# Default: 0 (Unlimited)
+MaxEnchantLevel = 0
 
 # 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.

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

@@ -1005,6 +1005,7 @@ public final class Config
 	public static ObjectMapType MAP_TYPE;
 	public static ObjectSetType SET_TYPE;
 	public static double ENCHANT_CHANCE;
+	public static int MAX_ENCHANT_LEVEL;
 	public static double ENCHANT_CHANCE_ELEMENT_STONE;
 	public static double ENCHANT_CHANCE_ELEMENT_CRYSTAL;
 	public static double ENCHANT_CHANCE_ELEMENT_JEWEL;
@@ -1635,6 +1636,7 @@ public final class Config
 					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"));
+					MAX_ENCHANT_LEVEL = Integer.parseInt(Character.getProperty("MaxEnchantLevel", "0"));
 					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

@@ -87,7 +87,7 @@ public class EnchantItemTable
 						boolean isCrystal = false;
 						boolean isSafe = false;
 						int type = L2Item.CRYSTAL_NONE;
-						int maxEnchant = 0;
+						int maxEnchant = Config.MAX_ENCHANT_LEVEL;
 						double chance = Config.ENCHANT_CHANCE;
 						int[] items = null;