Add CoAClassSpecData.lua (copied from coa-db/data) and wire
GetPlayerCoARole() into TankMode so CoA tokens resolve TANK/HEALER/DAMAGER
from their active spec instead of defaulting to DAMAGER.
- CoAClassSpecData.lua: defines CoAClassSpec keyed by UnitClass token,
loaded in .toc before Core.xml/Modules.xml
- GetPlayerCoARole(): pcall-guarded helper that calls
SpecializationUtil.GetActiveSpecialization() (1-based index) to look up
the current spec in CoAClassSpec[token].specs; TANK > HEALER > DAMAGER
precedence when a spec carries multiple roles; returns nil for vanilla
classes so the existing IsTank/IsHealer path is unchanged
- mod:Update(): try GetPlayerCoARole() first; fall through to vanilla
logic only when nil (vanilla class or unresolvable spec)
- Re-evaluation on spec change already covered: PLAYER_TALENT_UPDATE
fires on both spec and talent changes, driving mod:Update()
luac -p: TankMode.lua OK, CoAClassSpecData.lua OK
On the CoA client the legacy InterfaceOptionsFrame global may be nil (the
reworked Settings panel does not always expose it). The unguarded
HookScript calls in Castbar.lua and ClassColours.lua then threw on
addon load. Wrap both in 'if InterfaceOptionsFrame then ... end',
mirroring the guard already present around InterfaceOptionsCombatPanel
in Castbar.lua. SetCVars() is still called unconditionally afterwards.
TankMode.lua resolved the player's class at file scope with
select(2, UnitClass('player')), which on CoA can run before
PLAYER_LOGIN — UnitClass returns nil and 'class' stays nil for the
whole session, breaking IsTank/IsHealer/Toggle. Move the assignment
into mod:OnEnable() (where it is already re-assigned) and leave the
file-scope local as nil. Also document that IsTank/IsHealer only know
about the vanilla 3.3.5 classes; CoA custom classes fall through to
DAMAGER until a CoA-aware tank/healer table is available.