WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   GameTooltip:GetSpell() (https://www.wowinterface.com/forums/showthread.php?t=58567)

Platine 01-28-21 03:07 PM

GameTooltip:GetSpell()
 
The function OnTooltipSetSpell is fired on spell and talent tooltip.
How to recognize if it is spell or talent?

Lua Code:
  1. GameTooltip:HookScript("OnTooltipSetSpell", function(self)
  2.     local spellName, spellID = self:GetSpell();
  3.    ----- this work both on spell and talent tooltip
  4. end
  5. );

p3lim 01-28-21 03:22 PM

Lua Code:
  1. hooksecurefunc(GameTooltip, 'SetTalent', function(self, spellID, isInspect, talentGroup)
  2.    -- do your thing
  3. end)

Platine 01-29-21 06:53 AM

OK, it is some information that I can use.
Thanks p3lim.


All times are GMT -6. The time now is 11:31 PM.

vBulletin © 2021, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI