mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-03 12:10:01 +00:00
buffwatch: use official dispel-type colours for debuff bars
The debuff-bar auto colour read the vanilla DebuffTypeColor global, diverging from unitframes/buff which use C_UnitAuras.GetAuraDispelTypeColor (the BC GlobalColor.dbc palette ClassicAPI ships). Switch buffwatch to the same accessor so all aura displays share one palette; nil/unknown types fall back to DEBUFF_TYPE_NONE instead of the old ad-hoc (1, .2, .2).
This commit is contained in:
@@ -296,11 +296,9 @@ pfUI:RegisterModule("buffwatch", function ()
|
||||
-- calculate dynamic auto color
|
||||
local r, g, b
|
||||
if frame.type == "HARMFUL" then
|
||||
r, g, b = 1, .2, .2
|
||||
local dtype = data[6]
|
||||
if dtype and DebuffTypeColor[dtype] then
|
||||
r,g,b = DebuffTypeColor[dtype].r,DebuffTypeColor[dtype].g,DebuffTypeColor[dtype].b
|
||||
end
|
||||
-- official Blizzard dispel-type colors (matches unitframes/buff);
|
||||
-- nil/unknown type falls back to the DEBUFF_TYPE_NONE colour
|
||||
r, g, b = C_UnitAuras.GetAuraDispelTypeColor(data[6] or ""):GetRGBA()
|
||||
else
|
||||
r,g,b = str2rgb(data[3])
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user