From a51d7f01ab3dd914c47631ced4c9a79c853eb5dd Mon Sep 17 00:00:00 2001 From: Scott Sibley Date: Wed, 27 Oct 2010 20:40:52 +0000 Subject: [PATCH] Refactor GetUnit hook a bit --- StarTip.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/StarTip.lua b/StarTip.lua index dc6033c..86d53bc 100644 --- a/StarTip.lua +++ b/StarTip.lua @@ -796,11 +796,14 @@ function StarTip:GameTooltipShow(...) end function StarTip:GameTooltipGetUnit() + local name, unit = self.hooks[GameTooltip].GetUnit(GameTooltip) + if name then + return name, unit + end if StarTip.unit and UnitExists(StarTip.unit) then local name = UnitName(StarTip.unit) return name, StarTip.unit end - return self.hooks[GameTooltip].GetUnit(GameTooltip) end -- 1.7.9.5