View Single Post
03-18-24, 05:13 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,327
I haven't tested this past running it through a Lua compiler.
Code:
GameTooltip:HookScript("OnShow",function(s)if _G[s:GetName().."TextLeft1"]:GetText():find"^Corpse of "then s:Hide()end end)

I revised the provided code as well. :SetScript() will break things if there's already an existing script. It's advised to use :HookScript() instead. The caveat being you don't want to run this line multiple times or you end up stacking identical callbacks on top of each other. There's also an existing function (GameTooltip_Hide()) for hiding the tooltip made for calls from XML templates.
Code:
GameTooltip:HookScript("OnTooltipSetUnit",GameTooltip_Hide)
I'm assuming this is to be put into a macro hence the removal of optional whitespace.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 03-18-24 at 05:23 PM.
  Reply With Quote