feat: fire BAG_UPDATE and PLAYER_MONEY events after selling items

SMSG_SELL_ITEM success now fires BAG_UPDATE so bag addons refresh
their display, and PLAYER_MONEY so gold tracking addons see the
sell price income immediately.
This commit is contained in:
Kelsi 2026-03-21 06:52:41 -07:00
parent b407d5d632
commit 12fb8f73f7

View file

@ -4808,6 +4808,10 @@ void GameHandler::handlePacket(network::Packet& packet) {
if (auto* sfx = renderer->getUiSoundManager()) if (auto* sfx = renderer->getUiSoundManager())
sfx->playDropOnGround(); sfx->playDropOnGround();
} }
if (addonEventCallback_) {
addonEventCallback_("BAG_UPDATE", {});
addonEventCallback_("PLAYER_MONEY", {});
}
} else { } else {
bool removedPending = false; bool removedPending = false;
auto it = pendingSellToBuyback_.find(itemGuid); auto it = pendingSellToBuyback_.find(itemGuid);