mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: fire BAG_UPDATE and UNIT_INVENTORY_CHANGED on item received
Fire BAG_UPDATE and UNIT_INVENTORY_CHANGED from SMSG_ITEM_PUSH_RESULT when any item is received (loot, quest reward, trade, mail). Bag addons (Bagnon, AdiBags) immediately show new items, and equipment tracking addons detect inventory changes.
This commit is contained in:
parent
c6a6849c86
commit
774f9bf214
1 changed files with 5 additions and 0 deletions
|
|
@ -2010,6 +2010,11 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
pendingItemPushNotifs_.push_back({itemId, count});
|
||||
}
|
||||
}
|
||||
// Fire bag/inventory events for all item receipts (not just chat-visible ones)
|
||||
if (addonEventCallback_) {
|
||||
addonEventCallback_("BAG_UPDATE", {});
|
||||
addonEventCallback_("UNIT_INVENTORY_CHANGED", {"player"});
|
||||
}
|
||||
LOG_INFO("Item push: itemId=", itemId, " count=", count,
|
||||
" showInChat=", static_cast<int>(showInChat));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue