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:
GameTooltip:HookScript("OnUpdate", function(self)
-- Your stuff here. E.g.:
for i = 1, self:NumLines(), 1 do
local line = _G[self:GetName().."TextLeft"..i]:GetText()
print (i, line)
end
end)