Quantcast

Changed the logic in ench error check. More reliable now

Darthpred [08-30-16 - 09:55]
Changed the logic in ench error check. More reliable now
Filename
ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
ElvUI_SLE/modules/Armory/InspectArmory/InspectArmory.lua
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()