mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 00:03:50 +00:00
feat: fire PLAYER_COMBO_POINTS and LOOT_READY events
PLAYER_COMBO_POINTS now fires from the existing SMSG_UPDATE_COMBO_POINTS handler — the handler already updated comboPoints_ but never notified Lua addons. Rogue/druid combo point displays and DPS rotation addons register for this event. LOOT_READY fires alongside LOOT_OPENED when a loot window opens. Some addons register for this WoW 5.x+ event name instead of LOOT_OPENED.
This commit is contained in:
parent
3b4909a140
commit
abe5cc73df
1 changed files with 6 additions and 1 deletions
|
|
@ -2265,6 +2265,8 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
comboTarget_ = target;
|
comboTarget_ = target;
|
||||||
LOG_DEBUG("SMSG_UPDATE_COMBO_POINTS: target=0x", std::hex, target,
|
LOG_DEBUG("SMSG_UPDATE_COMBO_POINTS: target=0x", std::hex, target,
|
||||||
std::dec, " points=", static_cast<int>(comboPoints_));
|
std::dec, " points=", static_cast<int>(comboPoints_));
|
||||||
|
if (addonEventCallback_)
|
||||||
|
addonEventCallback_("PLAYER_COMBO_POINTS", {});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -22652,7 +22654,10 @@ void GameHandler::handleLootResponse(network::Packet& packet) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lootWindowOpen = true;
|
lootWindowOpen = true;
|
||||||
if (addonEventCallback_) addonEventCallback_("LOOT_OPENED", {});
|
if (addonEventCallback_) {
|
||||||
|
addonEventCallback_("LOOT_OPENED", {});
|
||||||
|
addonEventCallback_("LOOT_READY", {});
|
||||||
|
}
|
||||||
lastInteractedGoGuid_ = 0; // loot opened — no need to re-send in handleSpellGo
|
lastInteractedGoGuid_ = 0; // loot opened — no need to re-send in handleSpellGo
|
||||||
pendingGameObjectLootOpens_.erase(
|
pendingGameObjectLootOpens_.erase(
|
||||||
std::remove_if(pendingGameObjectLootOpens_.begin(), pendingGameObjectLootOpens_.end(),
|
std::remove_if(pendingGameObjectLootOpens_.begin(), pendingGameObjectLootOpens_.end(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue