Added specific checks for armor over enchant.
This commit is contained in:
		| @@ -590,7 +590,7 @@ public class EnterWorld implements ClientPacket | ||||
| 				if (item.isEquipable() // | ||||
| 					&& ((item.isWeapon() && (item.getEnchantLevel() > EnchantItemGroupsData.getInstance().getMaxWeaponEnchant())) // | ||||
| 						|| ((item.getTemplate().getType2() == ItemTemplate.TYPE2_ACCESSORY) && (item.getEnchantLevel() > EnchantItemGroupsData.getInstance().getMaxAccessoryEnchant())) // | ||||
| 						|| (item.getEnchantLevel() > EnchantItemGroupsData.getInstance().getMaxArmorEnchant()))) | ||||
| 						|| (item.isArmor() && (item.getTemplate().getType2() != ItemTemplate.TYPE2_ACCESSORY) && (item.getEnchantLevel() > EnchantItemGroupsData.getInstance().getMaxArmorEnchant())))) | ||||
| 				{ | ||||
| 					player.getInventory().destroyItem("Over-enchant protection", item, player, null); | ||||
| 					PacketLogger.info("Over-enchanted " + item + " has been removed from " + player); | ||||
|   | ||||
| @@ -312,7 +312,7 @@ public class UseItem implements ClientPacket | ||||
| 			if (Config.OVER_ENCHANT_PROTECTION && !player.isGM() // | ||||
| 				&& ((item.isWeapon() && (item.getEnchantLevel() > EnchantItemGroupsData.getInstance().getMaxWeaponEnchant())) // | ||||
| 					|| ((item.getTemplate().getType2() == ItemTemplate.TYPE2_ACCESSORY) && (item.getEnchantLevel() > EnchantItemGroupsData.getInstance().getMaxAccessoryEnchant())) // | ||||
| 					|| (item.getEnchantLevel() > EnchantItemGroupsData.getInstance().getMaxArmorEnchant()))) | ||||
| 					|| (item.isArmor() && (item.getTemplate().getType2() != ItemTemplate.TYPE2_ACCESSORY) && (item.getEnchantLevel() > EnchantItemGroupsData.getInstance().getMaxArmorEnchant())))) | ||||
| 			{ | ||||
| 				player.getInventory().destroyItem("Over-enchant protection", item, player, null); | ||||
| 				PacketLogger.info("Over-enchanted " + item + " has been removed from " + player); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment