From d9ab1c82978b39b1065ec685949c2beab32845dd Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 20 Mar 2026 09:44:41 -0700 Subject: [PATCH] feat: persist tracked quest IDs across sessions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quest tracking choices (right-click → Track on the quest objective tracker) were lost on logout because trackedQuestIds_ was not saved in the character config. Now saves tracked quest IDs as a comma- separated list and restores them on login, so the quest tracker shows the same quests the player chose to track in their previous session. --- src/game/game_handler.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 71e4da73..ae16f868 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -24225,6 +24225,16 @@ void GameHandler::saveCharacterConfig() { out << "quest_" << i << "_complete=" << (quest.complete ? 1 : 0) << "\n"; } + // Save tracked quest IDs so the quest tracker restores on login + if (!trackedQuestIds_.empty()) { + std::string ids; + for (uint32_t qid : trackedQuestIds_) { + if (!ids.empty()) ids += ','; + ids += std::to_string(qid); + } + out << "tracked_quests=" << ids << "\n"; + } + LOG_INFO("Character config saved to ", path); } @@ -24278,6 +24288,21 @@ void GameHandler::loadCharacterConfig() { } macros_[macroId] = std::move(unescaped); } + } else if (key == "tracked_quests" && !val.empty()) { + // Parse comma-separated quest IDs + trackedQuestIds_.clear(); + size_t tqPos = 0; + while (tqPos <= val.size()) { + size_t comma = val.find(',', tqPos); + std::string idStr = (comma != std::string::npos) + ? val.substr(tqPos, comma - tqPos) : val.substr(tqPos); + try { + uint32_t qid = static_cast(std::stoul(idStr)); + if (qid != 0) trackedQuestIds_.insert(qid); + } catch (...) {} + if (comma == std::string::npos) break; + tqPos = comma + 1; + } } else if (key.rfind("action_bar_", 0) == 0) { // Parse action_bar_N_type or action_bar_N_id size_t firstUnderscore = 11; // length of "action_bar_"