Quantcast

Change Name's color script to match the UnitTooltip's module's name-line's color.

Scott Sibley [09-17-10 - 05:28]
Change Name's color script to match the UnitTooltip's module's name-line's color.
Filename
Modules/Text.lua
diff --git a/Modules/Text.lua b/Modules/Text.lua
index a79a299..eaa8c11 100644
--- a/Modules/Text.lua
+++ b/Modules/Text.lua
@@ -60,8 +60,11 @@ if not UnitExists(unit) then return end
 return '--' .. select(1, UnitName(unit)) .. '--'
 ]],
 		color = [[
-if not UnitExists(unit) then return end
-return ClassColor(unit)
+if UnitIsPlayer(unit) then
+    return ClassColor(unit)
+else
+    return UnitSelectionColor(unit)
+end
 ]],
 		cols = 50,
 		align = WidgetText.ALIGN_PINGPONG,