I would like to get info about which artifact perks are currently active. So far I have the following code:
lua Code:
local powers = C_ArtifactUI.GetPowers()
for i = 1, #powers do
local spellID, _, currentRank = C_ArtifactUI.GetPowerInfo(powers[i])
if currentRank > 0 then
local name = GetSpellInfo(spellID)
-- do stuff
end
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.