Is there still a way to do a pre-hook on what used to be OnTooltipSetItem?
I want to operate on the tooltip of items before any other addons added their lines to it.
Before 10.0.2 I executed this code (a few seconds after login, to make sure that all other addons have already registered):
Lua Code:
local OtherScripts = GameTooltip:GetScript("OnTooltipSetItem")
local function RunOtherScripts(self, ...)
if OtherScripts then
return OtherScripts(self, ...)
else
return
end
end
GameTooltip:SetScript("OnTooltipSetItem", function(self, ...)
-- Do my stuff with the untouched tooltip.
-- Then let the other addons append their lines.
return RunOtherScripts(self, ...)
end)
How could the same effect be achieved with the new TooltipDataProcessor?