Add CoAClassColors.lua: mirror RAID_CLASS_COLORS into profile

SUF stores class colors in a private ShadowUF.db.profile.classColors
table seeded only with the vanilla 10 in defaultlayout.lua. On the
Voljin/CoA client _G.RAID_CLASS_COLORS is populated by FrameXML with
22 additional tokens (HERO + 21 CoA customs), but those never reach
SUF, so a guildmate's CoA-class health bar falls through to the
percent gradient.

New file post-hooks ShadowUF:OnInitialize, ProfileReset and
ProfilesChanged to copy any RAID_CLASS_COLORS entry the active
profile is missing into profile.classColors. Idempotent — only fills
nil keys, so user customisations and SUF's stock vanilla-10 values
win.

Source of truth is the live client's table, populated in
patch-B.MPQ → SharedXML/SharedConstants.lua, so the addon stays in
sync with whatever palette the realm ships without a hardcoded copy.
This commit is contained in:
2026-05-08 22:48:42 +02:00
parent d2e8d1164b
commit 089454f937
2 changed files with 89 additions and 0 deletions
@@ -51,3 +51,5 @@ modules\incheal.lua
modules\range.lua
modules\empty.lua
modules\druid.lua
CoAClassColors.lua