Skip to content

CDM: fix Sacred Weapon / Holy Bulwark duration missing until you cast at login - #1306

Merged
EllesmereGaming merged 2 commits into
EllesmereGaming:mainfrom
dfrisone:cdm-armament-duration-login
Aug 11, 2026
Merged

CDM: fix Sacred Weapon / Holy Bulwark duration missing until you cast at login#1306
EllesmereGaming merged 2 commits into
EllesmereGaming:mainfrom
dfrisone:cdm-armament-duration-login

Conversation

@dfrisone

@dfrisone dfrisone commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Cause: the learned variant->base map was in-memory only, so it was empty at every login. A transforming slot only names its base and the form live right now, so the first RebuildSpellRouteMap of a session can never observe the pairing for an assigned variant that is not the live one. The claim was missing from the first build and the base fell through to whatever a repopulate had assigned, until a cast transformed the slot and a later rebuild finally saw it.

Fix: persist the pairs on the SV root (_variantBase) and seed them before the first StoreDirect, keyed by spec since GetBaseSpell answers per spec. Adds ns.ResetVariantBaseStore, called from the CDM reset, because nothing else reaches the SV root. There is no API route: GetBaseSpell on a non-live variant, GetOverrideSpell + ignoreOverrideSpellID on the base, and GetOverrideSpell on the variant were all measured and all refuse to name a form the client is not in.

Test: Holy paladin (Lightsmith). Three consecutive full logouts returned the same pairs, and post-login with no input Holy Bulwark renders its recharge countdown immediately. Also covers other override spells (Blessed Hammer, Avenging Crusader, Judgment variants). Note the per-spec scoping was added in review follow-up, after that in-game pass, so the spec-change reload path is not yet exercised live.

sugar glider eating GIF

… at login

A transforming cooldown slot only ever names its base and the form that is
live right now, so a fresh session can never observe the pairing for an
assigned variant that is not the live form. The claim was therefore missing
from the first RebuildSpellRouteMap of the session and the base fell through
to whatever a repopulate had assigned, so Sacred Weapon / Holy Bulwark routed
old-style until a cast transformed the slot and a later rebuild finally saw
the pair.

variant->base is static game data, identical on every character and profile,
and only its observability is state dependent. Persist the pairs on the SV
root beside _capturedOnce_CDM and seed the live table before the first
StoreDirect, so a login starts with what earlier sessions learned.
StripDefaults only walks keys present in DEFAULTS, so the new root key
survives logout untouched.
Review follow-up on the previous commit.

GetBaseSpell takes a `spec` argument documented as "overrides may vary by
Spec" and we call it without one, so every answer describes the current spec
only. EllesmereGaming#842 also saw it tie SV Kill Command to a different ability entirely, so
these links are not always a tidy same-ability pair. Persisting them
account-wide meant one spec's answer was seeded at login into every other spec
and character, where StoreDirect turns it into a varMap claim -- and
ResolveCDIDToBar consults varBaseMap before directMap[info.spellID], so a
bogus pair would outrank that spell's own explicit assignment. Key the store
by spec so each pair stays confined to the state it was measured in, and
reload it on spec change.

The store also had no way back: StripDefaults never walks the SV root and no
profile operation touches the key, so a pair learned wrong was permanent. Add
ns.ResetVariantBaseStore and call it from the CDM reset beside the
_capturedOnce_CDM clear, and drop pre-release flat-format entries on load.
@EllesmereGaming
EllesmereGaming merged commit 36a4ee7 into EllesmereGaming:main Aug 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants