Quantcast
WoWInterface - View Single Post - GameToolTip Update Event
View Single Post
01-19-21, 06:16 PM   #5
LudiusMaximus
A Frostmaul Preserver
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 278
Instead of
Code:
local BlizzardGameTooltipOnUpdateRetention = GameTooltip.OnUpdate
you would have to do
Code:
local BlizzardGameTooltipOnUpdateRetention = GameTooltip:GetScript("OnUpdate")
But what you are doing then, overriding the original OnUpdate script is an insecure hook.

Is it important that your CustomToolTipOnUpdate() gets called before BlizzardGameTooltipOnUpdateRetention()? If not, just do a HookScript:

Lua Code:
  1. GameTooltip:HookScript("OnUpdate", function(self)
  2.    -- Your stuff here. E.g.:
  3.    for i = 1, self:NumLines(), 1 do
  4.      local line = _G[self:GetName().."TextLeft"..i]:GetText()
  5.      print (i, line)
  6.    end  
  7. end)
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote