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.