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:
Kelsi 2026-03-22 20:46:53 -07:00
parent 3b4909a140
commit abe5cc73df

View file

@ -2265,6 +2265,8 @@ void GameHandler::handlePacket(network::Packet& packet) {
comboTarget_ = target;
LOG_DEBUG("SMSG_UPDATE_COMBO_POINTS: target=0x", std::hex, target,
std::dec, " points=", static_cast<int>(comboPoints_));
if (addonEventCallback_)
addonEventCallback_("PLAYER_COMBO_POINTS", {});
break;
}
@ -22652,7 +22654,10 @@ void GameHandler::handleLootResponse(network::Packet& packet) {
return;
}
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
pendingGameObjectLootOpens_.erase(
std::remove_if(pendingGameObjectLootOpens_.begin(), pendingGameObjectLootOpens_.end(),