TekNoLogic / TourGuide

WoW Addon - Powerleveling guide framework
http://www.tekkub.net/
17 stars 26 forks source link

Weird Issue with TourGuide and my addon (Inquest) #4

Closed arnath closed 15 years ago

arnath commented 15 years ago

I have a mod called Inquest that among other things, does a lot of stuff with the quest tracker for which I hook WatchFrame_Update(). I know that my hook works just fine because I see tons of WatchFrame_Updates get processed correctly. However, for whatever reason, the call to WatchFrame_Update() on line 72 of Broker.lua in TourGuide seems to not call my hook and calls the original function somehow. Do you know why this is/how I might be able to fix it?

tekkub commented 15 years ago

Because I save a local reference before you're hooking.

Naturally I question why you hook, hooking should be a last resort.

arnath commented 15 years ago

Right now I do some processing both before and after calling Blizz's WatchFrame_Update() function. I'd avoid this problem by using a secure hook instead, right?

tekkub commented 15 years ago

Secure hooks fire only after the function in question.

arnath commented 15 years ago

Well to elaborate, my options are either to do what I do now (raw hook) or to basically run WatchFrame_Update() twice every time it is called because I resize the WatchFrame and Blizz's function won't update to the new size if I do so after the update happens.

tekkub commented 15 years ago

I've not delved deeply into it, but I did notice two things about the new watch frame... it uses a frame's width as the max width, and it seems to ignore width entirely if the frame is on the left half of the screen. Personally, I was thinking about tricking into always thinking it was on the left, and the tinkering with the position by hand probably. or maybe just forcing the frame to be wider...

arnath commented 15 years ago

Thanks, I figured out a way to avoid hooking the function that involved just telling it the frame was on the left side of the screen before I resized.