Thread: Warforged Seals
View Single Post
07-14-14, 12:15 PM   #5
mec666
A Deviate Faerie Dragon
 
mec666's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2013
Posts: 13
so just something like this then?

Lua Code:
  1. local WarforgedSeal = CreateFrame("Frame", "MEC_Warforged_Seal")
  2. WarforgedSeals.obj = LibStub("LibDataBroker-1.1"):NewDataObject("MEC Warforged Seals",{
  3.     type  = "data source",
  4.     text  = "0",
  5.     label = "Warforged Seal",
  6.     icon  = "Interface\\Icons\\inv_arcane_orb",
  7. } )
  8.  
  9. WarforgedSeal:SetScript("OnEvent", function()
  10.  
  11.     local name, count, texture = GetCurrencyInfo(776)
  12.  
  13.     Warforgedseal.obj.text = count or "0"
  14.  
  15. end)
  16.  
  17. WarforgedSeal:RegisterEvent("CURRENCY_DISPLAY_UPDATE")
  18. WarforgedSeal:RegisterEvent("PLAYER_ENTERING_WORLD")

I tried this and it still shows 0. unless i'm still doing something wrong
  Reply With Quote