Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-25-18, 10:34 AM   #1
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
Hooking Mixins and unnamed frames

I'm trying to hook WorldMapBountyBoardMixin:ShowBountyTooltip. There was a thread a little while back (http://www.wowinterface.com/forums/s...ad.php?t=56578) that I used for reference and what I took from it is that if I hook the mixin AFTER the mixin is created but BEFORE it's used on a frame, the hook will work. Looking at the WorldMap code I didn't believe this was the case, but I tested it anyway with this:
Lua Code:
  1. hooksecurefunc(WorldMapBountyBoardMixin, "ShowBountyTooltip", function(self,bountyIndex)
  2.     print("WorldMapBountyBoardMixin:ShowBountyTooltip " .. tostring(bountyIndex))
  3. end)

The print did not fire. The other method mentioned in that thread is to hook the frame itself, but in this case the frames are unnamed (just a hex string) so I don't believe I can do that directly.

So in a case like this, what is a reliable way to hook the method?
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Hooking Mixins and unnamed frames


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