From 7dc12bb35e759d9654fcc36475284fe5dd474747 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 13 Mar 2026 05:42:24 -0700 Subject: [PATCH] fix: persist action bar config after superceded spell slot upgrade After automatically upgrading action bar slots to the new spell rank in handleSupercededSpell, save the character config so the upgraded slot IDs persist across sessions. --- src/game/game_handler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 61189a95..fcd899f4 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -16562,14 +16562,17 @@ void GameHandler::handleSupercededSpell(network::Packet& packet) { // Update all action bar slots that reference the old spell rank to the new rank. // This matches the WoW client behaviour: the action bar automatically upgrades // to the new rank when you train it. + bool barChanged = false; for (auto& slot : actionBar) { if (slot.type == ActionBarSlot::SPELL && slot.id == oldSpellId) { slot.id = newSpellId; slot.cooldownRemaining = 0.0f; slot.cooldownTotal = 0.0f; + barChanged = true; LOG_DEBUG("Action bar slot upgraded: spell ", oldSpellId, " -> ", newSpellId); } } + if (barChanged) saveCharacterConfig(); const std::string& newName = getSpellName(newSpellId); if (!newName.empty()) {