comparison Export.lua @ 91:b8e9664d3229 v43

option to disable equipment manager sets, minor artifact/talent bug fixes
author yellowfive
date Wed, 21 Sep 2016 00:14:22 -0700
parents 6bbe64d587b4
children e635cd648e01
comparison
equal deleted inserted replaced
90:db63475ef5d4 91:b8e9664d3229
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 if not Amr.db or not Amr.db.char or not Amr.db.char.Artifacts then return end
274
273 local powers = C_ArtifactUI.GetPowers() 275 local powers = C_ArtifactUI.GetPowers()
274 if not powers then return end 276 if not powers then return end
275 277
276 local powerRanks = {} 278 local powerRanks = {}
277 for k,v in pairs(powers) do 279 for k,v in pairs(powers) do
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 -- make sure that the artifact UI didn't get closed while we were reading it, GetPowers seems to return nil unless it is open
291 powers = C_ArtifactUI.GetPowers() 293 powers = C_ArtifactUI.GetPowers()
292 if not powers then return end 294 if not powers then return end
293 295
294 -- use the artifact item ID to figure out which spec this is for, since you can open your artifact on any spec 296 -- 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() 297 local itemID = C_ArtifactUI.GetArtifactInfo()
296 local spec = Amr.ArtifactIdToSpecNumber[itemID] 298 local spec = Amr.ArtifactIdToSpecNumber[itemID]
297 --local spec = GetSpecialization() 299 --local spec = GetSpecialization()
298 300
299 Amr.db.char.Artifacts[spec] = { 301 if spec then
300 Powers = powerRanks, 302 Amr.db.char.Artifacts[spec] = {
301 Relics = relicInfo 303 Powers = powerRanks,
302 } 304 Relics = relicInfo
305 }
306 end
303 end 307 end
304 308
305 -- Returns a data object containing all information about the current player needed for an export: 309 -- Returns a data object containing all information about the current player needed for an export:
306 -- gear, spec, reputations, bag, bank, and void storage items. 310 -- gear, spec, reputations, bag, bank, and void storage items.
307 function Amr:ExportCharacter() 311 function Amr:ExportCharacter()