diff Export.lua @ 89:6bbe64d587b4 v42

Improved artifact/relic reading, gear display. Now creates equipment manager sets when you use button or command to equip a set.
author yellowfive
date Sun, 18 Sep 2016 21:24:08 -0700
parents 8914581c912f
children b8e9664d3229
line wrap: on
line diff
--- a/Export.lua	Fri Sep 02 16:22:12 2016 -0700
+++ b/Export.lua	Sun Sep 18 21:24:08 2016 -0700
@@ -270,7 +270,6 @@
 end
 
 local function scanArtifact()
-	-- TODO: when they put in a real API for this, switch to that instead of using UI methods directly
 	local powers = C_ArtifactUI.GetPowers()
 	if not powers then return end
 	
@@ -292,7 +291,11 @@
 	powers = C_ArtifactUI.GetPowers()
 	if not powers then return end
 	
-	local spec = GetSpecialization()
+	-- use the artifact item ID to figure out which spec this is for, since you can open your artifact on any spec
+	local itemID = C_ArtifactUI.GetArtifactInfo()
+	local spec = Amr.ArtifactIdToSpecNumber[itemID]	
+	--local spec = GetSpecialization()
+	
 	Amr.db.char.Artifacts[spec] = {
 		Powers = powerRanks,
 		Relics = relicInfo