WoWInterface - View Single Post - Dorwido seems really gone this time...
View Single Post
07-05-19, 09:19 PM   #4
I did that?
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,306
If you have an event frame and a space in your UI for the token FontString (.TokenText in this case), this should give you what you want for that part.

Lua Code:
  1. local function GetTokenPrice(self)
  2.     local Price = C_WowTokenPublic.GetCurrentMarketPrice()
  3.     if not Price then
  4.         self:SetText("N/A")
  5.         return
  6.     end
  7.     Price = tonumber(string.sub(Price, 1, string.len(Price)-4))
  8.     self:SetText("|TInterface\\ICONS\\Wow_Token01:0:0:2:0|t"..FormatLargeNumber(Price).."|TInterface\\MoneyFrame\\UI-GoldIcon:0:0:2:0|t")
  9. end
  11. -- frame event with FontString (TokenText)
  12. if event == "TOKEN_MARKET_PRICE_UPDATED" or event == "PLAYER_LOGIN" then
  13.     GetTokenPrice(self.TokenText)
  14. end
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote