Skip to content

#1984 Restore GSE.PlayerSpellsLoaded so the editor opens in combat again - #1985

Closed
LarryThiessen wants to merge 1 commit into
TimothyLuke:masterfrom
LarryThiessen:fix-1984-combat-open-playerspellsloaded
Closed

#1984 Restore GSE.PlayerSpellsLoaded so the editor opens in combat again#1985
LarryThiessen wants to merge 1 commit into
TimothyLuke:masterfrom
LarryThiessen:fix-1984-combat-open-playerspellsloaded

Conversation

@LarryThiessen

Copy link
Copy Markdown
Contributor

Fixes #1984

Problem

GSE.ShowSequences() blocks in combat, while GSE.ShowKeyBindings() opens the same editor window in combat with no error. The combat-open feature from #1752 (e2c2355) regressed: its gate calls GSE.PlayerSpellsLoaded(), whose GSE_QoL definition was deleted in a later refactor — the reference now resolves to nil, so the escape hatch never fires and the editor always refuses in combat.

Fix

Reimplement GSE.PlayerSpellsLoaded() in GSE_QoL/QoL.lua where it originally lived, but stateless — ask the spellbook directly instead of maintaining the old scanned playerSpells cache:

  • Retail: C_SpellBook.GetNumSpellBookSkillLines() > 0
  • Classic fallback: GetNumSpellTabs() > 0

Editor.lua is untouched (its gate already calls the function when present). Builds without GSE_QoL keep the current block-in-combat behaviour, matching how #1752 originally shipped.

Verified

In-game: with the fix, opening Sequences during combat works with no Lua error — identical to the Keybindings path. luac -p clean. 1 file, +19.

🤖 Generated with Claude Code

…n combat again

e2c2355 (TimothyLuke#1752) allowed GSE.ShowSequences to open during combat when
GSE.PlayerSpellsLoaded() reported the spellbook ready, with the function
defined in GSE_QoL. A later refactor deleted the definition, leaving the
Editor.lua call dangling on nil -- the gate silently collapsed back to
"always block in combat", while the ungated Keybindings button kept
opening the very same editor window in combat without error.

Reimplement PlayerSpellsLoaded in GSE_QoL as a stateless spellbook
check (C_SpellBook.GetNumSpellBookSkillLines on Retail, GetNumSpellTabs
fallback on Classic) -- no cache to maintain, same semantics the old
scanned playerSpells table answered. Editor.lua is untouched; builds
without GSE_QoL keep the existing block-in-combat behaviour.

Fixes TimothyLuke#1984

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@TimothyLuke

Copy link
Copy Markdown
Owner

This has failed build checks and needs corrections before it can be merged.

@TimothyLuke

Copy link
Copy Markdown
Owner

ixed this a different way

@LarryThiessen
LarryThiessen deleted the fix-1984-combat-open-playerspellsloaded branch August 21, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants