From 1fd220de29456e9e1ebaf7f47b62b27dba1c11e0 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 21 Mar 2026 11:13:36 -0700 Subject: [PATCH] feat: fire QUEST_TURNED_IN event when quest rewards are received Fire QUEST_TURNED_IN with questId from SMSG_QUESTGIVER_QUEST_COMPLETE when a quest is successfully completed and removed from the quest log. Used by quest tracking addons (Questie, QuestHelper) and achievement tracking addons. --- src/game/game_handler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 035d738c..113b3545 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -5424,11 +5424,14 @@ void GameHandler::handlePacket(network::Packet& packet) { } questLog_.erase(it); LOG_INFO(" Removed quest ", questId, " from quest log"); + if (addonEventCallback_) + addonEventCallback_("QUEST_TURNED_IN", {std::to_string(questId)}); break; } } } - if (addonEventCallback_) addonEventCallback_("QUEST_LOG_UPDATE", {}); + if (addonEventCallback_) + addonEventCallback_("QUEST_LOG_UPDATE", {}); // Re-query all nearby quest giver NPCs so markers refresh if (socket) { for (const auto& [guid, entity] : entityManager.getEntities()) {