Originally Posted by semlar
You need to make sure you only hook it once.
|
Right, I forgot about that. Well, I guess that's a problem in that addon I copied that from :\.
Well, actually... If there's code like this:
Code:
frame:SetScript("OnEnter", something)
frame:HookScript("OnEnter", somethingElse)
frame:SetScript("OnEnter", something)
frame:HookScript("OnEnter", somethingElse)
Do calls to SetScript clear all hooks when the script is set to something else, or would the hooks persist? The Blizzard code for the armor tooltip sets the script every time, IIRC.
Update: Tested. SetScript clears the hook, so in this case, because of what the Blizzard code does, it will need to be re-hooked each time.