Three fixes addressing the reported 'auras silently vanish on next save'
bug, plus collateral robustness in the same code path:
1. WeakAuras.lua PLAYER_LOGIN handler (~L1297-1308): the downgrade branch
fired StaticPopup_Show('WEAKAURAS_CONFIRM_REPAIR', ...) synchronously
inside the event handler. On the CoA reworked StaticPopup system this
fires too early and silently fails to show the dialog, which means
neither OnAccept nor OnCancel ever runs, so Private.Login() is never
called. With no displays loaded, the next PLAYER_LOGOUT serializes an
empty table over WeakAurasSaved and the user loses all their auras.
Wrap the call in C_Timer.After(0, ...) so it fires after the event
frame stack has unwound and the popup system is ready.
This is the most likely root cause of the user report 'my auras don't
save anymore' that surfaced on the PTR last week.
2. WeakAuras.lua WEAKAURAS_CONFIRM_REPAIR popup (~L2263-2277): OnShow and
OnCancel both unconditionally dereferenced self.data.reason. If the
popup is ever fired with nil or malformed data this throws and blocks
Private.Login() from running via the OnCancel fallback. Guard with a
nil check and default reason to 'unknown' (treated as the automatic /
downgrade path, which is the safe default that still invokes Login).
3. Types.lua WeakAuras.class_types (~L1187): only populated from
CLASS_SORT_ORDER, which on CoA contains only the 11 vanilla classes.
The 21 custom CoA classes were silently missing from every class
filter dropdown in the options UI. Add a fallback loop over
LOCALIZED_CLASS_NAMES_MALE for anything CLASS_SORT_ORDER didn't
already register, mirroring the pattern the spec builder uses at
~L3829.
Same CoA client issue as coa-details: GetAllSpecs(class) returns items
that GetSpecInfo rejects with 'Expected string' at arg #2. Wrap the
addSpec(class, GetSpecInfo(class, spec)) call in pcall so bad iterations
skip silently rather than spamming Error.txt.
WeakAuras reads class colours inline at two call sites with the
whole-table-pick pattern — no per-key fallback:
WeakAuras/Types.lua:15
local color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[classFilename]
WeakAuras/AuraEnvironment.lua:108
local classData = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[class]
local coloredName = ("|c%s%s|r"):format(classData.colorStr, name)
When !ClassColors is loaded it injects a vanilla-10-only
CUSTOM_CLASS_COLORS, so the 22 CoA tokens silently miss. Types.lua
returns the white fallback; AuraEnvironment.lua:109 *hard-crashes* on
classData.colorStr.
New file mirrors any RAID_CLASS_COLORS entry that CUSTOM_CLASS_COLORS
is missing, when !ClassColors is loaded. Idempotent — only fills nil
keys, so user customisations win. Loaded after Compatibility.lua and
ahead of every Types/AuraEnvironment call site. !ClassColors added to
OptionalDeps so it loads first when installed.
Same pattern as coa-omen, coa-kui-nameplates, and
coa-shadowedunitframes.
Fixes#93
Also normalize SetDesaturated calls to use booleans instead of numeric flags.
(cherry picked from commit 47dce3a9d5ba23c170f002b323a11ed2a5c5e206)
Switches frame level assignment to depth-based ordering to avoid overflow
and ensure deterministic ordering. WeakAurasFrame now correctly lives on
FrameStrata MEDIUM without interfering with Blizzard UI elements.
(cherry picked from commit e92edf5700ad70587a71c3a403e5cc672dbc9e8e)
#85
Implemented a hard cap for frame level assignments (max 126) across multiple modules, including WeakAuras core logic and AceGUI widget prototypes.
The WotLK engine utilizes a signed 8-bit integer for frame levels. Values exceeding 127 cause an overflow. Previously, many frames were inadvertently stacked at or beyond 128, which remained largely unnoticed but caused significant rendering overhead. This got introduced on WeakAuras 4.0 with nested groups, years ago. On newer Clients the FrameLevels are capped at 10000 which makes this system operate smoothly on those clients. A larger fix will be needed in the future.
This change prevents the renderer from becoming overwhelmed at maximum depth, particularly when Blizzard UI frames with SetTopLevel(true) are toggled. Capping the values at 126 ensures that there is always a 1-bit buffer before the overflow point, allowing high-priority frames to render smoothly without depth conflicts.
(cherry picked from commit 629a45095b10b801573b2cc84d64b6b5a6c1a890)
This ensures proper fallback to BigWigs when DBM is not supported. So it can't fail.
(cherry picked from commit 8a70954db0a57217ab28badaae1e1d025f23bb01)
Restores correct fallback behavior on 3.3.5 where BossMods.Generic
remained nil if no boss mod was present during initialization.
This caused errors when Boss Mod Timer or Stage triggers attempted
to call methods on Generic.
Outdated restriction logic was removed as it no longer applies and
was only warning users unnecessarily.
Fixes#82
(cherry picked from commit 12c007969cb28ab869ef8691bd72bdf7e59445e8)
- Fixes#80
Replaces the nameplate overlay texture with the border texture in nameplate detection logic to improve compatibility.
(cherry picked from commit a39f956b11a624da84d802871b7476b8bad55d8d)