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:
@@ -3,11 +3,23 @@ local totemColors = {}
|
||||
local MAX_TOTEMS = MAX_TOTEMS
|
||||
|
||||
-- Death Knights untalented ghouls are guardians and are considered totems........... so set it up for them
|
||||
if( select(2, UnitClass("player")) == "DEATHKNIGHT" ) then
|
||||
local playerClass = select(2, UnitClass("player"))
|
||||
if( playerClass == "DEATHKNIGHT" ) then
|
||||
MAX_TOTEMS = 1
|
||||
ShadowUF:RegisterModule(Totems, "totemBar", ShadowUF.L["Guardian bar"], true, "DEATHKNIGHT")
|
||||
else
|
||||
ShadowUF:RegisterModule(Totems, "totemBar", ShadowUF.L["Totem bar"], true, "SHAMAN")
|
||||
-- CoA: SHAMAN is the vanilla totem class, but CoA custom classes (Witchdoctor, …) also use the
|
||||
-- multi-cast totem bar. Detect via MAX_TOTEMS > 1 (set by FrameXML for totem classes) or the
|
||||
-- HasMultiCastActionBar API (Bartender uses the same probe). Register with class=nil so the
|
||||
-- module is available to any CoA totem class, not just SHAMAN.
|
||||
local hasTotems = (MAX_TOTEMS and MAX_TOTEMS > 1)
|
||||
or (type(HasMultiCastActionBar) == "function" and HasMultiCastActionBar())
|
||||
or playerClass == "SHAMAN"
|
||||
if( hasTotems ) then
|
||||
ShadowUF:RegisterModule(Totems, "totemBar", ShadowUF.L["Totem bar"], true)
|
||||
else
|
||||
ShadowUF:RegisterModule(Totems, "totemBar", ShadowUF.L["Totem bar"], true, "SHAMAN")
|
||||
end
|
||||
end
|
||||
|
||||
function Totems:OnEnable(frame)
|
||||
|
||||
Reference in New Issue
Block a user