Skip to content

Click-casting: resolve spec-replacement spell overrides at macro build time#64

Open
doug-w wants to merge 1 commit into
DanderBot:mainfrom
doug-w:dev/fix-spec-replacement
Open

Click-casting: resolve spec-replacement spell overrides at macro build time#64
doug-w wants to merge 1 commit into
DanderBot:mainfrom
doug-w:dev/fix-spec-replacement

Conversation

@doug-w
Copy link
Copy Markdown

@doug-w doug-w commented May 9, 2026

Summary

  • Fixes Click-cast macros use base spell name, breaking spec-replacement overrides (Nature's Cure, Cleanse Spirit, etc.) #63: click-cast macros for spec-replacement spells (e.g. Nature's Cure, Cleanse Spirit) silently failed because the macro contained the base spell name, which isn't in the replacement spec's spellbook.
  • At macro-build time, distinguish proc-style overrides (e.g. Flash of Light → Benediction; base stays in book) from spec-replacement overrides (only override is in book) using C_SpellBook.IsSpellInSpellBook(..., includeOverrides=false). Resolve to the override name only in the spec-replacement case so proc behavior is preserved.
  • ApplyBindings already runs on ACTIVE_PLAYER_SPECIALIZATION_CHANGED / TRAIT_CONFIG_UPDATED, so macros regenerate when the resolution would change.

Test plan

  • Resto Druid: bind Nature's Cure → click-cast fires Nature's Cure (not Remove Corruption).
  • Shaman with Cleanse Spirit talented: click-cast fires Cleanse Spirit.
  • Holy Paladin: bind Flash of Light, trigger Infusion of Light → click still casts (proc resolves Flash of Light → Holy Light/Benediction); after proc expires, base name still works.
  • Switch specs: macro regenerates and casts the correct spell for the new spec without re-binding.
  • Non-localized client / non-English locale: macro still resolves to the correct localized name.

🤖 Generated with Claude Code

…d time

When generating /cast macros, distinguish proc-style overrides (e.g. Flash
of Light -> Benediction) from spec-replacement overrides (e.g. Remove
Corruption -> Nature's Cure). For proc-style, keep the base name so /cast
remains valid when the proc expires; for spec replacements, use the
override name since the base spell is not in the spellbook for that spec.

Detect via C_SpellBook.IsSpellInSpellBook with includeOverrides=false:
if the base is directly in the book it's proc-style, otherwise resolve
through C_Spell.GetOverrideSpell. ApplyBindings already runs on
ACTIVE_PLAYER_SPECIALIZATION_CHANGED / TRAIT_CONFIG_UPDATED, so macros
regenerate when the resolution changes.

Fixes DanderBot#63

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

Click-cast macros use base spell name, breaking spec-replacement overrides (Nature's Cure, Cleanse Spirit, etc.)

1 participant