WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Mirror Timers (https://www.wowinterface.com/forums/showthread.php?t=5061)

Uruloke 06-09-06 07:29 AM

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?

Esamynn 06-09-06 04:42 PM

Did you happen to look at FrameXML\MirrorTimer.lua?

It is rather enlighenting.

Uruloke 06-09-06 05:05 PM

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.

Esamynn 06-09-06 06:05 PM

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". ;)


All times are GMT -6. The time now is 09:13 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI