From 964437cdf469f4463b286229c0f15dc3b330845a Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 21 Mar 2026 10:27:43 -0700 Subject: [PATCH] feat: fire TRAINER_UPDATE and SPELLS_CHANGED after trainer purchase Fire TRAINER_UPDATE from SMSG_TRAINER_BUY_SUCCEEDED so trainer UI addons refresh the spell list (marking learned spells as unavailable). Also fire SPELLS_CHANGED so spellbook and action bar addons detect the newly learned spell. --- src/game/game_handler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 0e2d5117..067c5d53 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -4127,6 +4127,10 @@ void GameHandler::handlePacket(network::Packet& packet) { if (auto* sfx = renderer->getUiSoundManager()) sfx->playQuestActivate(); } + if (addonEventCallback_) { + addonEventCallback_("TRAINER_UPDATE", {}); + addonEventCallback_("SPELLS_CHANGED", {}); + } break; } case Opcode::SMSG_TRAINER_BUY_FAILED: {