From 589536af5ccbd06b29de654b390a7f7280a840c1 Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 17 Oct 2016 19:09:55 +0200 Subject: [PATCH] target: fix nil color error --- modules/target.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/target.lua b/modules/target.lua index ba172b52..50d587a5 100644 --- a/modules/target.lua +++ b/modules/target.lua @@ -87,14 +87,13 @@ pfUI:RegisterModule("target", function () pfUI.uf.target.hpText:SetText( hp) end - local color + local color = { r = 1, g = 1, b = 1 } if UnitIsPlayer("target") then _, class = UnitClass("target") color = RAID_CLASS_COLORS[class] else color = UnitReactionColor[UnitReaction("target", "player")] end - if not color then color.r, color.g, color.b = 1, 1, 1 end local r, g, b = (color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5