diff Gear.lua @ 143:55823e37403b v67

Updated pt-BR translation, bug fixes.
author yellowfive
date Thu, 08 Nov 2018 21:21:10 -0800
parents c229c759a125
children df1596b1a744
line wrap: on
line diff
--- a/Gear.lua	Tue Nov 06 15:39:26 2018 -0800
+++ b/Gear.lua	Thu Nov 08 21:21:10 2018 -0800
@@ -671,24 +671,12 @@
 	return bestItem, bestDiff, bestLink
 end
 
--- on completion, create an equipment manager set if desired
-local function onEquipGearSetComplete()
-	if Amr.db.profile.options.disableEm then return end
-	
-	-- create an equipment manager set
+local function createAmrEquipmentSet()
 
-	-- note: ignore slots and/or saveset need to be called twice
-    -- for some reason, the slot is treated as blank if you try to ignore once on the first load of the equipment manager
- 
-    -- clear any currently ignored slots
-    --C_EquipmentSet.ClearIgnoredSlotsForSave()
-    --C_EquipmentSet.ClearIgnoredSlotsForSave()
- 
-    -- ignore shirt and tabard
+	-- clear any currently ignored slots, ignore shirt and tabard
+    C_EquipmentSet.ClearIgnoredSlotsForSave()
     C_EquipmentSet.IgnoreSlotForSave(INVSLOT_BODY) -- shirt
     C_EquipmentSet.IgnoreSlotForSave(INVSLOT_TABARD)
-    C_EquipmentSet.IgnoreSlotForSave(INVSLOT_BODY) -- shirt
-	C_EquipmentSet.IgnoreSlotForSave(INVSLOT_TABARD)
 		
 	-- for now use icon of the spec
 	local _, specName, _, setIcon = GetSpecializationInfo(GetSpecialization())
@@ -716,6 +704,19 @@
 	end
 end
 
+-- on completion, create an equipment manager set if desired
+local function onEquipGearSetComplete()
+	if Amr.db.profile.options.disableEm then return end
+	
+	-- create an equipment manager set
+	createAmrEquipmentSet()
+
+	-- need to call it twice because on first load the WoW equipment manager just doesn't work
+	Amr.Wait(1, function()
+		createAmrEquipmentSet()
+	end)
+end
+
 -- stop any currently in-progress gear swapping operation and clean up
 local function disposeGearOp()
 	_pendingGearOps = nil