Max enchant warning message.

This commit is contained in:
MobiusDev
2015-09-07 04:25:43 +00:00
parent 1ebe8b4076
commit d77d07d0a3
3 changed files with 9 additions and 2 deletions

View File

@ -1043,6 +1043,7 @@ public final class Config
public static double ENCHANT_CHANCE_ELEMENT_ENERGY;
public static int CHANGE_CHANCE_ELEMENT;
public static int[] ENCHANT_BLACKLIST;
public static boolean DISABLE_OVER_ENCHANTING;
public static int AUGMENTATION_NG_SKILL_CHANCE;
public static int AUGMENTATION_NG_GLOW_CHANCE;
public static int AUGMENTATION_MID_SKILL_CHANCE;
@ -1555,6 +1556,7 @@ public final class Config
ENCHANT_BLACKLIST[i] = Integer.parseInt(notenchantable[i]);
}
Arrays.sort(ENCHANT_BLACKLIST);
DISABLE_OVER_ENCHANTING = character.getBoolean("DisableOverEnchanting", true);
AUGMENTATION_NG_SKILL_CHANCE = character.getInt("AugmentationNGSkillChance", 15);
AUGMENTATION_NG_GLOW_CHANCE = character.getInt("AugmentationNGGlowChance", 0);

View File

@ -122,8 +122,8 @@ public final class RequestEnchantItem extends L2GameClientPacket
supportTemplate = EnchantItemData.getInstance().getSupportItem(support);
}
// first validation check
if (!scrollTemplate.isValid(item, supportTemplate))
// first validation check - also over enchant check
if (!scrollTemplate.isValid(item, supportTemplate) || (Config.DISABLE_OVER_ENCHANTING && (item.getEnchantLevel() == scrollTemplate.getMaxEnchantLevel())))
{
activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS);
activeChar.removeRequest(request.getClass());