Thread Tools Display Modes
06-09-06, 07:29 AM   #1
Uruloke
A Defias Bandit
Join Date: Dec 2005
Posts: 3
Mirror Timers

I'm coding mirror timer support into my addon and I'm curious what arguments the MIRROR_TIMER_PAUSE event passes. I looked at the WoWWiki site and it only mentions arg1 as being the pause duration. However I know that MIRROR_TIMER_STOP passes a timer argument which says what kind of timer is being stopped. I assume there's such an argument for MIRROR_TIMER_PAUSE as well. I was trying to get the event to fire in-game and watching for it with FireShow and AceDebug but I realized I have no idea what may cause it to fire.

Any ideas?
  Reply With Quote
06-09-06, 04:42 PM   #2
Esamynn
Featured Artist
Premium Member
Featured
Join Date: Jan 2005
Posts: 395
Did you happen to look at FrameXML\MirrorTimer.lua?

It is rather enlighenting.
  Reply With Quote
06-09-06, 05:05 PM   #3
Uruloke
A Defias Bandit
Join Date: Dec 2005
Posts: 3
That was the first thing I started to look at when beginning to code the mirror timer. However they have a different approach than I have. They got one frame for every timer, I'm not sure how the event gets sent to the correct timer frame though since there doesn't seem to be any checks or anything. Anyway, I have a single event handler for all the mirror timer events. So hopefully, MIRROR_TIMER_PAUSE have an timer type argument like MIRROR_TIMER_STOP have.

Edit: Hmmm, must have missed the if-clause in the OnEvent code. So it would seem MIRROR_TIMER_PAUSE doesn't have a timer type argument... or it affects all timers. If I've understood it correctly.

Last edited by Uruloke : 06-09-06 at 05:15 PM.
  Reply With Quote
06-09-06, 06:05 PM   #4
Esamynn
Featured Artist
Premium Member
Featured
Join Date: Jan 2005
Posts: 395
Read MirrorTimerFrame_OnEvent() again. Notice:

Code:
if ( not this:IsShown() or (arg1 ~= this.timer) ) then
	return;
end
Whoever wrote this code seems to have a dislike for "elseif".
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Mirror Timers


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