mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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.
This commit is contained in:
parent
1988e778c7
commit
1fd220de29
1 changed files with 4 additions and 1 deletions
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue