Thread Tools Display Modes
Prev Previous Post   Next Post Next
11-01-08, 12:19 AM   #1
HyperGig
A Cyclonian
Join Date: Jan 2008
Posts: 46
StatusBar Time Best Practice?

I'm new to making teh mods and i have a best practice question.

I have a StatusBar that i would like to use to keep track of a particular buff and i was wondering what the best way to do this is? Originally i was doing something like this...

Code:
               
local name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable =UnitBuff("target",i)
local bar = getglobal("Form".."StatusBar1");
local left = (expirationTime - (time()-1225488545)) / duration; 
bar:SetValue(left);
..and stuck this function in the <OnUpdate> tags in the xml.

This can't be the best way to do this right? Like there is some sort of built in thing-a-ma-jig that does times and durations for you?

Thanks in advanced
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » StatusBar Time Best Practice?

Thread Tools
Display Modes

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