View Single Post
12-17-17, 12:21 AM   #3
Tim
A Rage Talon Dragon Guard
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 309
Yeah that's what I'm trying to do, grab the +5 item levels line.

However, what you said I already tried which is why I said grab the info without being at the forge / having artifact window open as that's the only time that information is available.

With that all in mind I just remembered about forcing the artifact window open through SocketInventoryItem(16) and then with a quick google search I found my solution.

Code:
UIParent:UnregisterEvent("ARTIFACT_UPDATE")
SocketInventoryItem(16)

for i = 1, C_ArtifactUI.GetNumRelicSlots() do

   local isLocked = C_ArtifactUI.GetRelicLockedReason(i)
   if isLocked then C_ArtifactUI.Clear() end

   local name = C_ArtifactUI.GetRelicInfo(i)
   local rank = C_ArtifactUI.GetRelicSlotRankInfo(i)

   print("Relic ["..i.."] = "..name..", Rank ["..rank.."]")

end

C_ArtifactUI.Clear()
UIParent:RegisterEvent("ARTIFACT_UPDATE")
  Reply With Quote