Addition of over enchanting prohibition config.
This commit is contained in:
@@ -414,6 +414,12 @@ EnchantChanceElementEnergy = 10
|
|||||||
# Default: 7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7828,7829,7830,7831,13293,13294,13296
|
# Default: 7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7828,7829,7830,7831,13293,13294,13296
|
||||||
EnchantBlackList = 7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7828,7829,7830,7831,13293,13294,13296
|
EnchantBlackList = 7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7828,7829,7830,7831,13293,13294,13296
|
||||||
|
|
||||||
|
# If enabled, enchanting over the maximum enchant limit will not be possible; instead, a warning message will be sent to the player.
|
||||||
|
# You can set custom maxEnchant values at EnchantItemData.xml
|
||||||
|
# Default: True
|
||||||
|
DisableOverEnchanting = True
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Augmenting
|
# Augmenting
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
@@ -400,6 +400,7 @@ public final class Config
|
|||||||
public static int FS_MAX_SUPPLY_LEVEL;
|
public static int FS_MAX_SUPPLY_LEVEL;
|
||||||
public static int FS_FEE_FOR_CASTLE;
|
public static int FS_FEE_FOR_CASTLE;
|
||||||
public static int FS_MAX_OWN_TIME;
|
public static int FS_MAX_OWN_TIME;
|
||||||
|
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// Feature Settings
|
// Feature Settings
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
@@ -925,6 +926,7 @@ public final class Config
|
|||||||
public static double ENCHANT_CHANCE_ELEMENT_JEWEL;
|
public static double ENCHANT_CHANCE_ELEMENT_JEWEL;
|
||||||
public static double ENCHANT_CHANCE_ELEMENT_ENERGY;
|
public static double ENCHANT_CHANCE_ELEMENT_ENERGY;
|
||||||
public static int[] ENCHANT_BLACKLIST;
|
public static int[] ENCHANT_BLACKLIST;
|
||||||
|
public static boolean DISABLE_OVER_ENCHANTING;
|
||||||
public static int AUGMENTATION_NG_SKILL_CHANCE;
|
public static int AUGMENTATION_NG_SKILL_CHANCE;
|
||||||
public static int AUGMENTATION_NG_GLOW_CHANCE;
|
public static int AUGMENTATION_NG_GLOW_CHANCE;
|
||||||
public static int AUGMENTATION_MID_SKILL_CHANCE;
|
public static int AUGMENTATION_MID_SKILL_CHANCE;
|
||||||
@@ -1649,7 +1651,7 @@ public final class Config
|
|||||||
ENCHANT_BLACKLIST[i] = Integer.parseInt(notenchantable[i]);
|
ENCHANT_BLACKLIST[i] = Integer.parseInt(notenchantable[i]);
|
||||||
}
|
}
|
||||||
Arrays.sort(ENCHANT_BLACKLIST);
|
Arrays.sort(ENCHANT_BLACKLIST);
|
||||||
|
DISABLE_OVER_ENCHANTING = Character.getBoolean("DisableOverEnchanting", true);
|
||||||
AUGMENTATION_NG_SKILL_CHANCE = Character.getInt("AugmentationNGSkillChance", 15);
|
AUGMENTATION_NG_SKILL_CHANCE = Character.getInt("AugmentationNGSkillChance", 15);
|
||||||
AUGMENTATION_NG_GLOW_CHANCE = Character.getInt("AugmentationNGGlowChance", 0);
|
AUGMENTATION_NG_GLOW_CHANCE = Character.getInt("AugmentationNGGlowChance", 0);
|
||||||
AUGMENTATION_MID_SKILL_CHANCE = Character.getInt("AugmentationMidSkillChance", 30);
|
AUGMENTATION_MID_SKILL_CHANCE = Character.getInt("AugmentationMidSkillChance", 30);
|
||||||
|
@@ -110,8 +110,8 @@ public final class RequestEnchantItem implements IClientIncomingPacket
|
|||||||
supportTemplate = EnchantItemData.getInstance().getSupportItem(support);
|
supportTemplate = EnchantItemData.getInstance().getSupportItem(support);
|
||||||
}
|
}
|
||||||
|
|
||||||
// first validation check
|
// first validation check - also over enchant check
|
||||||
if (!scrollTemplate.isValid(item, supportTemplate) || (item.getEnchantLevel() == scrollTemplate.getMaxEnchantLevel()))
|
if (!scrollTemplate.isValid(item, supportTemplate) || (Config.DISABLE_OVER_ENCHANTING && (item.getEnchantLevel() == scrollTemplate.getMaxEnchantLevel())))
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS);
|
activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS);
|
||||||
activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE);
|
activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE);
|
||||||
|
Reference in New Issue
Block a user