View Single Post
10-31-20, 04:48 AM   #5
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 321
Originally Posted by Rilgamon View Post
May be the first thing when Setitem fires is that it calls a clear for the tooltip?
OK, turns out you were right. I got another addon hooking OnTooltipSetItem executing ClearLines().
If that goes first, it's like:

Code:
GameTooltip:HookScript("OnTooltipSetItem", function(self)
  self:ClearLines()
  self:AddLine("hi")
end)

GameTooltip:HookScript("OnTooltipSetItem", function() print(GetTime(), "SetItem") end)
GameTooltip:HookScript("OnTooltipCleared", function() print(GetTime(), "Cleared") end)
Leading to

Code:
3679.479 Cleared
3679.479 SetItem
3679.629 Cleared
3679.629 Cleared
3679.629 SetItem
3679.831 Cleared
3679.831 Cleared
3679.831 SetItem
3680.031 Cleared
3680.031 Cleared
3680.031 SetItem
...


If it comes second, it's like:

Code:
GameTooltip:HookScript("OnTooltipSetItem", function() print(GetTime(), "SetItem") end)
GameTooltip:HookScript("OnTooltipCleared", function() print(GetTime(), "Cleared") end)

GameTooltip:HookScript("OnTooltipSetItem", function(self)
  self:ClearLines()
  self:AddLine("hi")
end)
leading to


Code:
4264.37 SetItem
4264.37 Cleared
4264.553 Cleared
4264.553 SetItem
4264.553 Cleared
4264.754 Cleared
4264.754 SetItem
4264.754 Cleared
4264.956 Cleared
4264.956 SetItem
4264.956 Cleared
...
Thanks!

Last edited by LudiusMaximus : 10-31-20 at 05:24 AM.
  Reply With Quote