From 91200316d6a037b298ba8611d17328d4df6ff371 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Tue, 30 Aug 2016 12:55:33 +0300 Subject: [PATCH] Changed the logic in ench error check. More reliable now --- .../Armory/CharacterArmory/CharacterArmory.lua | 7 ++++++- .../modules/Armory/InspectArmory/InspectArmory.lua | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua b/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua index b06feaf..fd4b90a 100644 --- a/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua +++ b/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua @@ -678,7 +678,12 @@ function CA:Update_Gear() if E.db.sle.Armory.Character.NoticeMissing ~= false then if not Slot.IsEnchanted and Info.Armory_Constants.EnchantableSlots[SlotName] then - if SlotName ~= 'SecondaryHandSlot' or ((ItemType == "INVTYPE_WEAPONOFFHAND" or ItemType == "INVTYPE_WEAPON") and (TrueItemLevel and TrueItemLevel <= 750) ) then + local isValid = false + local isWeapon = (ItemType == "INVTYPE_WEAPONOFFHAND" or ItemType == "INVTYPE_WEAPON" or ItemType == "INVTYPE_2HWEAPON") + if (isWeapon and (TrueItemLevel and TrueItemLevel <= 750)) or (SlotName ~= 'SecondaryHandSlot' and not isWeapon) then + isValid = true + end + if isValid then ErrorDetected = true Slot.EnchantWarning:Show() diff --git a/ElvUI_SLE/modules/Armory/InspectArmory/InspectArmory.lua b/ElvUI_SLE/modules/Armory/InspectArmory/InspectArmory.lua index f9bb561..1dda985 100644 --- a/ElvUI_SLE/modules/Armory/InspectArmory/InspectArmory.lua +++ b/ElvUI_SLE/modules/Armory/InspectArmory/InspectArmory.lua @@ -1922,7 +1922,12 @@ function IA:InspectFrame_DataSetting(DataTable) ]] if E.db.sle.Armory.Inspect.NoticeMissing ~= false then if not Slot.IsEnchanted and Info.Armory_Constants.EnchantableSlots[SlotName] and Slot.Gradation.ItemEnchant then - if SlotName ~= 'SecondaryHandSlot' or ((ItemType == "INVTYPE_WEAPONOFFHAND" or ItemType == "INVTYPE_WEAPON") and (Slot.ILvL and Slot.ILvL <= 750) ) then + local isValid = false + local isWeapon = (ItemType == "INVTYPE_WEAPONOFFHAND" or ItemType == "INVTYPE_WEAPON" or ItemType == "INVTYPE_2HWEAPON") + if (isWeapon and (TrueItemLevel and TrueItemLevel <= 750)) or (SlotName ~= 'SecondaryHandSlot' and not isWeapon) then + isValid = true + end + if isValid then ErrorDetected = true Slot.EnchantWarning:Show() -- 1.7.9.5