feat: add quest watch/tracking and selection Lua API for WatchFrame

Implement the quest tracking functions needed by WatchFrame.lua:
- SelectQuestLogEntry/GetQuestLogSelection — quest log selection state
- GetNumQuestWatches — count of tracked quests
- GetQuestIndexForWatch(watchIdx) — map Nth watched quest to log index
- AddQuestWatch/RemoveQuestWatch — toggle quest tracking by log index
- IsQuestWatched — check if a quest log entry is tracked
- GetQuestLink — generate colored quest link string

Backed by existing trackedQuestIds_ set and questLog_ vector.
Adds selectedQuestLogIndex_ state to GameHandler for quest selection.
This commit is contained in:
Kelsi 2026-03-22 15:36:25 -07:00
parent 6d72228f66
commit f29ebbdd71
2 changed files with 108 additions and 0 deletions

View file

@ -1674,6 +1674,8 @@ public:
std::array<QuestRewardItem, 6> rewardChoiceItems{}; // player picks one of these
};
const std::vector<QuestLogEntry>& getQuestLog() const { return questLog_; }
int getSelectedQuestLogIndex() const { return selectedQuestLogIndex_; }
void setSelectedQuestLogIndex(int idx) { selectedQuestLogIndex_ = idx; }
void abandonQuest(uint32_t questId);
void shareQuestWithParty(uint32_t questId); // CMSG_PUSHQUESTTOPARTY
bool requestQuestQuery(uint32_t questId, bool force = false);
@ -3187,6 +3189,7 @@ private:
// Quest log
std::vector<QuestLogEntry> questLog_;
int selectedQuestLogIndex_ = 0;
std::unordered_set<uint32_t> pendingQuestQueryIds_;
std::unordered_set<uint32_t> trackedQuestIds_;
bool pendingLoginQuestResync_ = false;