View Single Post
10-31-22, 03:46 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,323
I get the feeling this is part of some bigger picture which has an easier solution than what you're focused on currently.

It's certainly possible if you absolutely need to filter out tooltip handling to specific buttons, but there's a point where the performance cost would be drastically higher than hooking the OnEnter handler of your target buttons for example.

Right now, there's just not enough information of the overall process to suggest a better alternative.



Another example is how BuffOwner was written. The goal of the addon was to show who was the caster of a buff or debuff. I could've followed the same route of hooking whenever the tooltip was shown and figure out if the calling button was from an aura button. Instead, I came to the conclusion that it didn't need to know that. All it needed was the buff's info, and hooking the appropriate :Set() functions that generate the description in the first place would be adequate for retrieving it.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 10-31-22 at 03:52 PM.
  Reply With Quote