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()) {