Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-20-16, 06:10 PM   #1
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
Getting artifact perks data

I would like to get info about which artifact perks are currently active. So far I have the following code:

lua Code:
  1. local powers = C_ArtifactUI.GetPowers()
  2.  
  3. for i = 1, #powers do
  4.     local spellID, _, currentRank = C_ArtifactUI.GetPowerInfo(powers[i])
  5.  
  6.     if currentRank > 0 then
  7.         local name = GetSpellInfo(spellID)
  8.         -- do stuff
  9.     end
  10. end

However this only works when the ArtifactUI is open and I can't figure out how to open it programmatically. Would appreciate some help on that.
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » Getting artifact perks data


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off