fix: include CoA custom classes in portrait/totems/raid-grouping

portrait.lua: guard CLASS_ICON_TCOORDS[classToken] lookup. CoA custom
classes (Witchdoctor, Templar, …) have no entry in the vanilla
CLASS_ICON_TCOORDS table, so the old SetTexCoord call crashed with a
nil-index whenever a custom-class unit was shown. Cache the lookup
into a local and fall through to blank texture on miss.

totems.lua: file-level class gate registered the totem bar only for
SHAMAN (and a 1-slot DK guardian variant), locking out Witchdoctor and
any future CoA totem class. Probe MAX_TOTEMS > 1 / HasMultiCastActionBar
(Bartender's pattern) and register without a class filter when the
player has the multi-cast totem bar, so any CoA totem class picks it up.

units.lua: raid-header groupingOrder was the hardcoded 10-class vanilla
string, which dumped the 11 CoA custom classes into an unsorted tail
when GROUP BY CLASS was active. Build the order dynamically from
RAID_CLASS_COLORS (CoA populates this with all 21 classes via the
CUSTOM_CLASS_COLORS mechanism) at the call site.
This commit is contained in:
2026-05-24 17:39:05 +02:00
parent ede7d2b23d
commit 5d9749a920
3 changed files with 27 additions and 5 deletions
+4 -2
View File
@@ -70,10 +70,12 @@ function Portrait:Update(frame, event)
-- Use class thingy
if( type == "class" ) then
local classToken = select(2, UnitClass(frame.unitOwner))
if( classToken ) then
local coords = classToken and CLASS_ICON_TCOORDS[classToken]
if( coords ) then
frame.portrait:SetTexture("Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes")
frame.portrait:SetTexCoord(CLASS_ICON_TCOORDS[classToken][1], CLASS_ICON_TCOORDS[classToken][2], CLASS_ICON_TCOORDS[classToken][3], CLASS_ICON_TCOORDS[classToken][4])
frame.portrait:SetTexCoord(coords[1], coords[2], coords[3], coords[4])
else
-- CoA custom classes (Witchdoctor/Templar/…) have no CLASS_ICON_TCOORDS entry; blank instead of crash
frame.portrait:SetTexture("")
end
-- Use 2D character image