View Single Post
05-20-16, 08:03 PM   #6
syncrow
A Flamescale Wyrmkin
 
syncrow's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 149
Lua Code:
  1. function CollectPerkInfo()
  2.     if HasArtifactEquipped() then
  3.         local forceHide;
  4.  
  5.         -- opens (equipped) arfifact layout
  6.         if not ArtifactFrame:IsShown() then
  7.             forceHide = true
  8.             SocketInventoryItem(16)
  9.         end
  10.        
  11.         for i, powerID in ipairs(C_ArtifactUI.GetPowers()) do
  12.             local spellID, cost, currentRank, maxRank, bonusRanks, x, y, prereqsMet, isStart, isGoldMedal, isFinal = C_ArtifactUI.GetPowerInfo(powerID)
  13.  
  14.             -- you can now cache the info you want
  15.         end
  16.        
  17.         if ArtifactFrame:IsShown() and forceHide then
  18.             HideUIPanel(ArtifactFrame)
  19.         end
  20.     end
  21. end

Here is an example on how it could be used:
__________________

Last edited by syncrow : 05-20-16 at 09:52 PM.