Lua Code:
function CollectPerkInfo()
if HasArtifactEquipped() then
local forceHide;
-- opens (equipped) arfifact layout
if not ArtifactFrame:IsShown() then
forceHide = true
SocketInventoryItem(16)
end
for i, powerID in ipairs(C_ArtifactUI.GetPowers()) do
local spellID, cost, currentRank, maxRank, bonusRanks, x, y, prereqsMet, isStart, isGoldMedal, isFinal = C_ArtifactUI.GetPowerInfo(powerID)
-- you can now cache the info you want
end
if ArtifactFrame:IsShown() and forceHide then
HideUIPanel(ArtifactFrame)
end
end
end
Here is an example on how it could be used: