I want to put an extra line in the item tooltip directly beneath the "Sell price" line.
I am hooking OnTooltipSetItem to do so:
Code:
GameTooltip:HookScript("OnTooltipSetItem", function(self)
-- my code
end)
The problem is that I have other addons running which also append their info to the item tooltip.
I guess there is no way to enforce that my addon gets to hook its script first, unless I put it into the optional dependencies of the other addons?
If so, is there another option than scanning the content of the current GameTooltip line by line and inserting my new line after the line beginning with SELL_PRICE?
What would be the most efficient way to do this?
Do I really have to read every line from GameTooltip to a new tooltip or table, then do a GameTooltip:ClearLines() and then GameTooltip:AddLine() everything back?