Thread Tools Display Modes
08-13-09, 01:41 PM   #1
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
Tag updates

How could I update a tag every second? I want it to return the time left on a buff.

Here's what I have so far.
Code:
oUF.Tags["[rnwTime]"] = function(u)
  local name, _,_,_,_,_, expirationTime, fromwho,_ = UnitAura(u, L["Renew"])
  if not (fromwho == "player") then return end
  local spellTimer = "|cffffff00"..format("%.0f",-1*(GetTime()-expirationTime)).."|r"
  return spellTimer end
oUF.TagEvents["[rnwTime]"] = "UNIT_AURA"
  Reply With Quote
08-13-09, 02:32 PM   #2
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
Code:
local sometag = self:CreateFontString(...)
sometag.frequentUpdates = 1
self:Tag(sometag, '[rnwTime]')
  Reply With Quote
08-13-09, 02:49 PM   #3
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
Awesome thanks
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Tag updates


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off