comparison 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
comparison
equal deleted inserted replaced
88:b3ff336fad77 89:6bbe64d587b4
268 268
269 Amr.db.char.Talents[specPos] = str 269 Amr.db.char.Talents[specPos] = str
270 end 270 end
271 271
272 local function scanArtifact() 272 local function scanArtifact()
273 -- TODO: when they put in a real API for this, switch to that instead of using UI methods directly
274 local powers = C_ArtifactUI.GetPowers() 273 local powers = C_ArtifactUI.GetPowers()
275 if not powers then return end 274 if not powers then return end
276 275
277 local powerRanks = {} 276 local powerRanks = {}
278 for k,v in pairs(powers) do 277 for k,v in pairs(powers) do
290 289
291 -- make sure that the artifact UI didn't get closed while we were reading it, GetPowers seems to return nil unless it is open 290 -- make sure that the artifact UI didn't get closed while we were reading it, GetPowers seems to return nil unless it is open
292 powers = C_ArtifactUI.GetPowers() 291 powers = C_ArtifactUI.GetPowers()
293 if not powers then return end 292 if not powers then return end
294 293
295 local spec = GetSpecialization() 294 -- use the artifact item ID to figure out which spec this is for, since you can open your artifact on any spec
295 local itemID = C_ArtifactUI.GetArtifactInfo()
296 local spec = Amr.ArtifactIdToSpecNumber[itemID]
297 --local spec = GetSpecialization()
298
296 Amr.db.char.Artifacts[spec] = { 299 Amr.db.char.Artifacts[spec] = {
297 Powers = powerRanks, 300 Powers = powerRanks,
298 Relics = relicInfo 301 Relics = relicInfo
299 } 302 }
300 end 303 end