Earlier Versions
| Name | Size | Uploaded | Game Version | Downloads | |
| 1.0 release | 1.08 KB | Mar 10, 2018 | 7.3.5 | 239 | Download |
Description
Patch 8.0 status: nameplates now use a separate GameTooltip instance (NamePlateTooltip), so unless another portion of FrameXML causes GameTooltip to become forbidden, AltGameTooltip is probably not necessary.
The library provides a GameTooltip object (AltGameTooltip) which maps method calls to act on FrameXML's GameTooltip when it is not forbidden, and on a library-created alternative otherwise. Using AltGameTooltip allows addons to avoid errors when FrameXML's GameTooltip object becomes forbidden without requiring significant modifications of addon code.
How to use AltGameTooltip in your addon
- Include the library XML file in your addon, loading it before your other code.
-
Change any instances of
GameTooltiptoAltGameTooltipin your addon. You can do this by any one of the following:- Adding
local GameTooltip = AltGameTooltipto the top of any addon file interacting with GameTooltip; watch out for any instances of_G.GameTooltipor equivalent expressions. - Alternatively, replacing any occurrence of
GameTooltipwithAltGameTooltipin your addon, but watch out forGameTooltip_SetDefaultAnchorand similarly-named functions.
- Adding
The above procedure is sufficient as long as your addon does not need to modify the script handlers (i.e., call :SetScript or :HookScript) on GameTooltip. If you need to do so, perform the modifications on both the original GameTooltip and the library-created AltGameTooltipRaw object.
What's a forbidden GameTooltip?
Hovering over a debuff over a friendly nameplate while in an instance (or certain other instanced world zones) causes GameTooltip to become forbidden. While forbidden, calling any method on GameTooltip except :IsForbidden will cause an error, interfering with addon functionality.
Get 0.05 TON 💎
Download



Add a comment