diff --git a/Altoholic-Addon/Altoholic/Altoholic.lua b/Altoholic-Addon/Altoholic/Altoholic.lua
index cf732e4..24aeb14 100644
--- a/Altoholic-Addon/Altoholic/Altoholic.lua
+++ b/Altoholic-Addon/Altoholic/Altoholic.lua
@@ -707,7 +707,10 @@ function Altoholic:ShowClassIcons()
end)
local _, class = DS:GetCharacterClass(character)
- local tc = CLASS_ICON_TCOORDS[class]
+ -- CoA: CLASS_ICON_TCOORDS only carries the vanilla 10 + DK on Voljin.
+ -- For the 21 CoA custom classes the lookup is nil; fall back to
+ -- WARRIOR's coords so we render *something* rather than crashing.
+ local tc = CLASS_ICON_TCOORDS[class] or CLASS_ICON_TCOORDS["WARRIOR"]
local itemTexture = _G[itemName .. "IconTexture"]
itemTexture:SetTexture("Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes");
itemTexture:SetTexCoord(tc[1], tc[2], tc[3], tc[4]);
diff --git a/Altoholic-Addon/Altoholic/Altoholic.xml b/Altoholic-Addon/Altoholic/Altoholic.xml
index 7c56f79..ac97f6f 100644
--- a/Altoholic-Addon/Altoholic/Altoholic.xml
+++ b/Altoholic-Addon/Altoholic/Altoholic.xml
@@ -17,7 +17,8 @@
-
+
+
diff --git a/Altoholic-Addon/Altoholic/CoAClassColors.lua b/Altoholic-Addon/Altoholic/CoAClassColors.lua
new file mode 100644
index 0000000..f4f1e3d
--- /dev/null
+++ b/Altoholic-Addon/Altoholic/CoAClassColors.lua
@@ -0,0 +1,47 @@
+-- CoAClassColors.lua
+--
+-- Mirrors the live client's RAID_CLASS_COLORS palette into
+-- Altoholic.ClassInfo so the guild/character/profession panes render
+-- the 21 Conquest-of-Azeroth custom classes (plus HERO) instead of
+-- defaulting to WHITE via the `or WHITE` fallback at
+-- Altoholic.lua:581.
+--
+-- Background
+-- ----------
+-- Altoholic ships a hardcoded ChatColor table keyed by the 10 vanilla
+-- englishClass tokens (Altoholic.lua:23-32). On the CoA Voljin/PTR
+-- realm, UnitClass / GetGuildRosterInfo return tokens like BARBARIAN,
+-- WITCHDOCTOR, CHRONOMANCER, … which fall through the table.
+--
+-- The realm-authoritative palette is shipped by the client itself in
+-- _G.RAID_CLASS_COLORS (Interface/SharedXML/SharedConstants.lua inside
+-- patch-B.MPQ — 10 vanilla + HERO + 21 CoA = 32 entries on Voljin).
+-- Other Exiles addon ports follow the same mirror pattern
+-- (coa-omen/CoAClassColors.lua → CUSTOM_CLASS_COLORS,
+-- coa-shadowedunitframes/.../CoAClassColors.lua → SUF profile,
+-- coa-kui-nameplates/.../CoAClassColors.lua → !ClassColors).
+--
+-- Source of truth: db.exil.es /coa/dev for the full palette;
+-- _G.RAID_CLASS_COLORS at FrameXML load time for the running client.
+
+local AC = _G.Altoholic and _G.Altoholic.ClassInfo
+if type(AC) ~= "table" then return end
+
+local source = _G.RAID_CLASS_COLORS
+if type(source) ~= "table" then return end
+
+local function unpackColor(c)
+ if type(c) ~= "table" then return end
+ if c.GetRGB then return c:GetRGB() end
+ return c.r, c.g, c.b
+end
+
+for token, color in pairs(source) do
+ if AC[token] == nil then
+ local r, g, b = unpackColor(color)
+ if r and g and b then
+ AC[token] = string.format("|cFF%02X%02X%02X",
+ r * 255 + 0.5, g * 255 + 0.5, b * 255 + 0.5)
+ end
+ end
+end
diff --git a/Altoholic-Addon/DataStore_Characters/DataStore_Characters.lua b/Altoholic-Addon/DataStore_Characters/DataStore_Characters.lua
index 20b39e6..360bbd2 100644
--- a/Altoholic-Addon/DataStore_Characters/DataStore_Characters.lua
+++ b/Altoholic-Addon/DataStore_Characters/DataStore_Characters.lua
@@ -129,26 +129,52 @@ local function _GetCharacterClass(character)
return character.class or "", character.englishClass or ""
end
+local WHITE = "|cFFFFFFFF"
+
local ClassColors = {
["MAGE"] = "|cFF69CCF0",
["WARRIOR"] = "|cFFC79C6E",
["HUNTER"] = "|cFFABD473",
["ROGUE"] = "|cFFFFF569",
- ["WARLOCK"] = "|cFF9482CA",
- ["DRUID"] = "|cFFFF7D0A",
+ ["WARLOCK"] = "|cFF9482CA",
+ ["DRUID"] = "|cFFFF7D0A",
["SHAMAN"] = "|cFF2459FF",
- ["PALADIN"] = "|cFFF58CBA",
- ["PRIEST"] = "|cFFFFFFFF",
+ ["PALADIN"] = "|cFFF58CBA",
+ ["PRIEST"] = WHITE,
["DEATHKNIGHT"] = "|cFFC41F3B"
}
-local function _GetColoredCharacterName(character)
- return ClassColors[character.englishClass] .. character.name
+-- CoA: mirror _G.RAID_CLASS_COLORS (10 vanilla + HERO + 21 CoA tokens on
+-- the Voljin/PTR realm) into ClassColors so guild/character rows for
+-- BARBARIAN, WITCHDOCTOR, CHRONOMANCER, … render with the
+-- realm-canonical palette instead of nil-concat-crashing in
+-- _GetColoredCharacterName below. Source of truth is the client's
+-- Interface/SharedXML/SharedConstants.lua; same pattern as
+-- coa-omen/CoAClassColors.lua and the Altoholic UI's CoAClassColors.lua.
+do
+ local source = _G.RAID_CLASS_COLORS
+ if type(source) == "table" then
+ for token, color in pairs(source) do
+ if ClassColors[token] == nil and type(color) == "table" then
+ local r, g, b
+ if color.GetRGB then r, g, b = color:GetRGB()
+ else r, g, b = color.r, color.g, color.b end
+ if r and g and b then
+ ClassColors[token] = string.format("|cFF%02X%02X%02X",
+ r * 255 + 0.5, g * 255 + 0.5, b * 255 + 0.5)
+ end
+ end
+ end
+ end
end
-
+
+local function _GetColoredCharacterName(character)
+ return (ClassColors[character.englishClass] or WHITE) .. character.name
+end
+
local function _GetClassColor(character)
-- return just the color of this character's class
- return ClassColors[character.englishClass]
+ return ClassColors[character.englishClass] or WHITE
end
local function _GetCharacterFaction(character)