From 6a95f02f62d0e8d6f648e9f858a55ecbf4f3b3c3 Mon Sep 17 00:00:00 2001 From: Scott Sibley Date: Fri, 29 Jul 2011 16:44:05 -0500 Subject: [PATCH] Bug fixes. This may fix the bug in the Threat line. And also it fixes where "" was shown for all player types. --- Localization/enUS.lua | 2 ++ Modules/UnitTooltip/UnitTooltip.lua | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Localization/enUS.lua b/Localization/enUS.lua index f630d16..08c02a4 100644 --- a/Localization/enUS.lua +++ b/Localization/enUS.lua @@ -217,6 +217,8 @@ L["Clip Length"] = true L["Whether to clip the string's length when it is longer than the value of Columns."] = true L["Dog Tags"] = true L["Whether to parse the return values as DogTags or not."] = true +L["Unit Override"] = true +L["There's a default unit provided to each run environment, and you access it with 'unit' in your script. These \"units\" include 'mouseover', 'target', 'party1', etc... Here you can override that unit specifier."] = true -- Mouse Gestures L["Left Button"] = true diff --git a/Modules/UnitTooltip/UnitTooltip.lua b/Modules/UnitTooltip/UnitTooltip.lua index 1bd46c8..8f2d0cc 100644 --- a/Modules/UnitTooltip/UnitTooltip.lua +++ b/Modules/UnitTooltip/UnitTooltip.lua @@ -117,7 +117,7 @@ return texture .. Colorize((Name(unit, true) or Name(unit)) .. afk , r, g, b) if not UnitExists(unit) then return L["None"] end local dt = '\ -[IsPlayer and "":ClassColor or Color(Name, %f, %f, %f) \ +[IsUnit("player") and "":ClassColor or Color(Name, %f, %f, %f ) \ (if PvP then \ "++":Red \ end)]' @@ -960,6 +960,7 @@ function mod:CreateLines() local update = v.update or 0 v.update = 0 if v.left and v.leftUpdating then v.update = update end + mod.core.environment.unit = StarTip.unit or "player" llines[j].leftObj = v.left and WidgetText:New(mod.core, "StarTip.UnitTooltip:" .. v.name .. ":left:", copy(v), 0, 0, v.layer or 0, StarTip.db.profile.errorLevel, widgetUpdate) v.value = v.right -- 1.7.9.5