mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-21 11:50:49 +00:00
unitframes: fix error on invalid reaction colors
This commit is contained in:
+3
-5
@@ -1450,10 +1450,8 @@ function pfUI.uf:RefreshUnit(unit, component)
|
|||||||
local r, g, b, a = .2, .2, .2, 1
|
local r, g, b, a = .2, .2, .2, 1
|
||||||
if UnitIsPlayer(unitstr) then
|
if UnitIsPlayer(unitstr) then
|
||||||
local _, class = UnitClass(unitstr)
|
local _, class = UnitClass(unitstr)
|
||||||
if RAID_CLASS_COLORS[class] then
|
local color = RAID_CLASS_COLORS[class]
|
||||||
local color = RAID_CLASS_COLORS[class]
|
if color then r, g, b = color.r, color.g, color.b end
|
||||||
r, g, b = color.r, color.g, color.b
|
|
||||||
end
|
|
||||||
elseif unit.label == "pet" then
|
elseif unit.label == "pet" then
|
||||||
local happiness = GetPetHappiness()
|
local happiness = GetPetHappiness()
|
||||||
if happiness == 1 then
|
if happiness == 1 then
|
||||||
@@ -1465,7 +1463,7 @@ function pfUI.uf:RefreshUnit(unit, component)
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
local color = UnitReactionColor[UnitReaction(unitstr, "player")]
|
local color = UnitReactionColor[UnitReaction(unitstr, "player")]
|
||||||
r, g, b = color.r, color.g, color.b
|
if color then r, g, b = color.r, color.g, color.b end
|
||||||
end
|
end
|
||||||
|
|
||||||
if C.unitframes.custom == "1" then
|
if C.unitframes.custom == "1" then
|
||||||
|
|||||||
Reference in New Issue
Block a user