mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: fire MERCHANT_UPDATE and BAG_UPDATE events after purchase
Fire MERCHANT_UPDATE after a successful SMSG_BUY_ITEM so vendor addons refresh their stock display. Also fire BAG_UPDATE so bag addons show the newly purchased item immediately.
This commit is contained in:
parent
a02e021730
commit
b5f7659db5
1 changed files with 4 additions and 0 deletions
|
|
@ -5063,6 +5063,10 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
}
|
||||
pendingBuyItemId_ = 0;
|
||||
pendingBuyItemSlot_ = 0;
|
||||
if (addonEventCallback_) {
|
||||
addonEventCallback_("MERCHANT_UPDATE", {});
|
||||
addonEventCallback_("BAG_UPDATE", {});
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue