unitframes: update pets healthcolor text

This commit is contained in:
shagu
2017-12-23 21:30:48 +01:00
parent c08e1da445
commit 8051d0314b
+11 -3
View File
@@ -1493,10 +1493,18 @@ function pfUI.uf.GetColor(self, preset)
if RAID_CLASS_COLORS[class] then
r, g, b = RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b
end
else
if UnitReactionColor[UnitReaction(unitstr, "player")] then
r, g, b = UnitReactionColor[UnitReaction(unitstr, "player")].r, UnitReactionColor[UnitReaction(unitstr, "player")].g, UnitReactionColor[UnitReaction(unitstr, "player")].b
elseif self.label == "pet" then
local happiness = GetPetHappiness()
if happiness == 1 then
r, g, b = 1, 0, 0
elseif happiness == 2 then
r, g, b = 1, 1, 0
else
r, g, b = 0, 1, 0
end
else
local color = UnitReactionColor[UnitReaction(unitstr, "player")]
r, g, b = color.r, color.g, color.b
end
elseif preset == "class" and config["classcolor"] == "1" then