mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-05 00:33:51 +00:00
feat: fire CHAT_MSG_LOOT event when items are looted
Fire CHAT_MSG_LOOT addon event from SMSG_ITEM_PUSH_RESULT with the loot message text, item ID, and count. Used by loot tracking addons (AutoLootPlus, Loot Appraiser) and damage meters that track loot distribution.
This commit is contained in:
parent
0885f885e8
commit
44d2b80998
1 changed files with 3 additions and 0 deletions
|
|
@ -2002,6 +2002,9 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
sfx->playLootItem();
|
sfx->playLootItem();
|
||||||
}
|
}
|
||||||
if (itemLootCallback_) itemLootCallback_(itemId, count, quality, itemName);
|
if (itemLootCallback_) itemLootCallback_(itemId, count, quality, itemName);
|
||||||
|
// Fire CHAT_MSG_LOOT for loot tracking addons
|
||||||
|
if (addonEventCallback_)
|
||||||
|
addonEventCallback_("CHAT_MSG_LOOT", {msg, "", std::to_string(itemId), std::to_string(count)});
|
||||||
} else {
|
} else {
|
||||||
// Item info not yet cached; defer until SMSG_ITEM_QUERY_SINGLE_RESPONSE.
|
// Item info not yet cached; defer until SMSG_ITEM_QUERY_SINGLE_RESPONSE.
|
||||||
pendingItemPushNotifs_.push_back({itemId, count});
|
pendingItemPushNotifs_.push_back({itemId, count});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue