fork download
  1. -- Put this somewhere after everything has loaded (i.e a function that's called via a callback / timer -- OnLoad does not work)
  2.  
  3. local raw = Tooltip.GetItemTooltipForm or error("Unable to get Tooltip.GetItemTooltipForm")
  4. function Tooltip.GetItemTooltipForm(luaCaller, wndParent, itemSource, tFlags, nCount)
  5. -- Pass args, collect result from raw/old function
  6. local wndTooltip, wndTooltipComp = raw(luaCaller, wndParent, itemSource, tFlags, nCount)
  7. -- Do your magic with the tooltip here. I think something like this will work,
  8. -- but you should of course check that the item is in a gear set first:
  9.  
  10. -- Also, you could probably hack together something that will have it's own gear set form,
  11. -- but I'm not quite sure how to do that :)
  12.  
  13. -- I'll try the item header for now, but this will not work with the currently equipped item
  14. -- in comparisons (even though I tried; probably being updated somewhere in ToolTips, in a
  15. -- local function.):
  16.  
  17. local wndHeader = wndTooltip:FindChild("CurrentHeader")
  18. wndHeader:SetText("[Gear Set]" .. (tFlags.bNotEquipped and " [Equipped]" or "")) -- This flag seems to work only in comparisons.
  19. wndHeader:Show(true)
  20.  
  21. return wndTooltip, wndTooltipComp
  22. end
Runtime error #stdin #stdout #stderr 0.01s 2492KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
lua: prog.lua:3: attempt to index global 'Tooltip' (a nil value)
stack traceback:
	prog.lua:3: in main chunk
	[C]: ?