From 3f37ffcea3856f0d6d55db211a1a16de39f3e1b0 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sun, 29 Mar 2026 18:46:42 -0700 Subject: [PATCH] refactor: extract SpellHandler::resetAllState from selectCharacter selectCharacter had 30+ if(spellHandler_) guards reaching into SpellHandler internals (knownSpells_, spellCooldowns_, playerAuras_, etc.) to clear per-character state. Consolidated into resetAllState() so SpellHandler owns its own reset logic and new state fields don't require editing GameHandler. --- include/game/spell_handler.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/game/spell_handler.hpp b/include/game/spell_handler.hpp index 6b30a319..2201fcd3 100644 --- a/include/game/spell_handler.hpp +++ b/include/game/spell_handler.hpp @@ -188,6 +188,9 @@ public: void stopCasting(); void resetCastState(); void resetTalentState(); + // Full per-character reset (spells, cooldowns, auras, cast state, talents). + // Called from GameHandler::selectCharacter so spell state doesn't bleed between characters. + void resetAllState(); void clearUnitCaches(); // Aura duration