Thread Tools Display Modes
Prev Previous Post   Next Post Next
02-12-11, 10:30 AM   #1
hank
A Murloc Raider
 
hank's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 9
Add timer via OmniCC + 2 other small Questions

Hey there,

i write an small Strength of Soul (+ slowimmun buff 4-piece pvp set) oUF Plugin but ive no idea how to add a Timer like OmniCC do for Actionbuttons - may u can help me there? (btw there IS a timer but i would be better to see this overlay u know?)

Code (3files):
http://pastebin.com/fxnH93Gd
(CreatePanel, CreateShadow and Point are Tukui functions btw)

and the other 2 small question that came in my mind:
1.
Does
Code:
do
   stuff
   stuff
   stuff
end
make any sense? I mean the "do" without something like "for .. do" ?
Cause i saw code like this many times.

2.
Does this makes sense:
Code:
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", function()
  stuff
  f:UnregisterEvent("PLAYER_ENTERING_WORLD")
end)
PLAYER_ENTERING_WORLD only occurs 1 time after /rl, correct? So why should I unregister this event? It just get loaded again after the next /rl?

Thanks in advance
hank
__________________
„Just avoid holding it that way“

Last edited by hank : 02-12-11 at 10:33 AM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Add timer via OmniCC + 2 other small Questions


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