Added specific checks for armor over enchant.
This commit is contained in:
@@ -566,7 +566,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);
|
||||
|
@@ -267,7 +267,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);
|
||||
|
@@ -571,7 +571,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);
|
||||
|
@@ -267,7 +267,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);
|
||||
|
@@ -571,7 +571,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);
|
||||
|
@@ -267,7 +267,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);
|
||||
|
@@ -571,7 +571,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);
|
||||
|
@@ -267,7 +267,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);
|
||||
|
@@ -571,7 +571,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);
|
||||
|
@@ -264,7 +264,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);
|
||||
|
@@ -571,7 +571,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);
|
||||
|
@@ -274,7 +274,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);
|
||||
|
@@ -571,7 +571,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);
|
||||
|
@@ -274,7 +274,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);
|
||||
|
@@ -577,7 +577,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);
|
||||
|
@@ -274,7 +274,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);
|
||||
|
@@ -595,7 +595,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);
|
||||
|
@@ -275,7 +275,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);
|
||||
|
@@ -601,7 +601,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);
|
||||
|
@@ -275,7 +275,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);
|
||||
|
@@ -605,7 +605,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);
|
||||
|
@@ -276,7 +276,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);
|
||||
|
@@ -608,7 +608,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);
|
||||
|
@@ -277,7 +277,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);
|
||||
|
@@ -211,7 +211,7 @@ public class EnterWorld implements ClientPacket
|
||||
if (item.isEquipable() //
|
||||
&& (((item.getTemplate().getType2() == ItemTemplate.TYPE2_WEAPON) && (item.getEnchantLevel() > Config.ENCHANT_WEAPON_MAX)) //
|
||||
|| ((item.getTemplate().getType2() == ItemTemplate.TYPE2_ACCESSORY) && (item.getEnchantLevel() > Config.ENCHANT_JEWELRY_MAX)) //
|
||||
|| (item.getEnchantLevel() > Config.ENCHANT_ARMOR_MAX)))
|
||||
|| ((item.getTemplate().getType2() != ItemTemplate.TYPE2_WEAPON) && (item.getTemplate().getType2() != ItemTemplate.TYPE2_ACCESSORY) && (item.getEnchantLevel() > Config.ENCHANT_ARMOR_MAX))))
|
||||
{
|
||||
player.getInventory().destroyItem("Over-enchant protection", item, player, null);
|
||||
PacketLogger.info("Over-enchanted " + item + " has been removed from " + player);
|
||||
|
@@ -287,7 +287,7 @@ public class UseItem implements ClientPacket
|
||||
if (Config.OVER_ENCHANT_PROTECTION && !player.isGM() //
|
||||
&& (((item.getTemplate().getType2() == ItemTemplate.TYPE2_WEAPON) && (item.getEnchantLevel() > Config.ENCHANT_WEAPON_MAX)) //
|
||||
|| ((item.getTemplate().getType2() == ItemTemplate.TYPE2_ACCESSORY) && (item.getEnchantLevel() > Config.ENCHANT_JEWELRY_MAX)) //
|
||||
|| (item.getEnchantLevel() > Config.ENCHANT_ARMOR_MAX)))
|
||||
|| ((item.getTemplate().getType2() != ItemTemplate.TYPE2_WEAPON) && (item.getTemplate().getType2() != ItemTemplate.TYPE2_ACCESSORY) && (item.getEnchantLevel() > Config.ENCHANT_ARMOR_MAX))))
|
||||
{
|
||||
player.getInventory().destroyItem("Over-enchant protection", item, player, null);
|
||||
PacketLogger.info("Over-enchanted " + item + " has been removed from " + player);
|
||||
|
@@ -221,7 +221,7 @@ public class EnterWorld implements ClientPacket
|
||||
if (item.isEquipable() //
|
||||
&& (((item.getTemplate().getType2() == ItemTemplate.TYPE2_WEAPON) && (item.getEnchantLevel() > Config.ENCHANT_WEAPON_MAX)) //
|
||||
|| ((item.getTemplate().getType2() == ItemTemplate.TYPE2_ACCESSORY) && (item.getEnchantLevel() > Config.ENCHANT_JEWELRY_MAX)) //
|
||||
|| (item.getEnchantLevel() > Config.ENCHANT_ARMOR_MAX)))
|
||||
|| ((item.getTemplate().getType2() != ItemTemplate.TYPE2_WEAPON) && (item.getTemplate().getType2() != ItemTemplate.TYPE2_ACCESSORY) && (item.getEnchantLevel() > Config.ENCHANT_ARMOR_MAX))))
|
||||
{
|
||||
player.getInventory().destroyItem("Over-enchant protection", item, player, null);
|
||||
PacketLogger.info("Over-enchanted " + item + " has been removed from " + player);
|
||||
|
@@ -288,7 +288,7 @@ public class UseItem implements ClientPacket
|
||||
if (Config.OVER_ENCHANT_PROTECTION && !player.isGM() //
|
||||
&& (((item.getTemplate().getType2() == ItemTemplate.TYPE2_WEAPON) && (item.getEnchantLevel() > Config.ENCHANT_WEAPON_MAX)) //
|
||||
|| ((item.getTemplate().getType2() == ItemTemplate.TYPE2_ACCESSORY) && (item.getEnchantLevel() > Config.ENCHANT_JEWELRY_MAX)) //
|
||||
|| (item.getEnchantLevel() > Config.ENCHANT_ARMOR_MAX)))
|
||||
|| ((item.getTemplate().getType2() != ItemTemplate.TYPE2_WEAPON) && (item.getTemplate().getType2() != ItemTemplate.TYPE2_ACCESSORY) && (item.getEnchantLevel() > Config.ENCHANT_ARMOR_MAX))))
|
||||
{
|
||||
player.getInventory().destroyItem("Over-enchant protection", item, player, null);
|
||||
PacketLogger.info("Over-enchanted " + item + " has been removed from " + player);
|
||||
|
@@ -498,7 +498,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);
|
||||
|
@@ -224,7 +224,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);
|
||||
|
@@ -576,7 +576,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);
|
||||
|
@@ -301,7 +301,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);
|
||||
|
@@ -587,7 +587,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);
|
||||
|
@@ -301,7 +301,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);
|
||||
|
@@ -559,7 +559,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);
|
||||
|
@@ -267,7 +267,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);
|
||||
|
@@ -562,7 +562,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);
|
||||
|
@@ -267,7 +267,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);
|
||||
|
@@ -564,7 +564,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);
|
||||
|
@@ -267,7 +267,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);
|
||||
|
@@ -564,7 +564,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);
|
||||
|
@@ -267,7 +267,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);
|
||||
|
@@ -566,7 +566,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);
|
||||
|
@@ -264,7 +264,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);
|
||||
|
@@ -566,7 +566,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);
|
||||
|
@@ -274,7 +274,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);
|
||||
|
@@ -571,7 +571,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);
|
||||
|
@@ -274,7 +274,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);
|
||||
|
@@ -566,7 +566,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);
|
||||
|
@@ -274,7 +274,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);
|
||||
|
@@ -572,7 +572,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);
|
||||
|
@@ -274,7 +274,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);
|
||||
|
@@ -559,7 +559,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);
|
||||
|
@@ -275,7 +275,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);
|
||||
|
@@ -579,7 +579,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);
|
||||
|
@@ -294,7 +294,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);
|
||||
|
@@ -588,7 +588,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);
|
||||
|
@@ -309,7 +309,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);
|
||||
|
@@ -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);
|
||||
|
@@ -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