View Single Post
12-05-20, 03:50 PM   #3
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
It was not removed, it was converted to a fileID instead back in I believe Legion. Then, Shadowlands converted the function to return a table. The fileID is under the key "iconFileID".

https://wow.gamepedia.com/API_C_Curr...etCurrencyInfo

The following code will print "You have ## of Soul Ash" in chat with the Soul Ash icon right before the name.

Lua Code:
  1. local data = C_CurrencyInfo.GetCurrencyInfo(1828)
  2.  
  3. if data.name and tonumber(data.quantity) then
  4.     local color = data.quality and ITEM_QUALITY_COLORS[data.quality].hex or ""
  5.     local message = "You have " .. data.quantity .. " of " .. (data.iconFileID and "|T"..data.iconFileID..":12|t" or "") .. color .. data.name .. "|r"
  6.     DEFAULT_CHAT_FRAME:AddMessage(message)
  7. end

Last edited by Kanegasi : 12-05-20 at 03:53 PM.
  Reply With Quote