WoWInterface - View Single Post - GameToolTip Update Event
View Single Post
01-19-21, 06:16 PM   #5
A Frostmaul Preserver
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 278
Instead of
local BlizzardGameTooltipOnUpdateRetention = GameTooltip.OnUpdate
you would have to do
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