mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: fire READY_CHECK, READY_CHECK_CONFIRM, READY_CHECK_FINISHED events
Fire addon events for the raid ready check system: - READY_CHECK fires when a ready check is initiated, with initiator name - READY_CHECK_CONFIRM fires for each player's response, with GUID and ready state (1=ready, 0=not ready) - READY_CHECK_FINISHED fires when the ready check period ends These events are used by raid frame addons (Grid, VuhDo, Healbot) to show ready check status on unit frames, and by raid management addons to track responsiveness.
This commit is contained in:
parent
70a5d3240c
commit
8e51754615
1 changed files with 9 additions and 0 deletions
|
|
@ -3776,6 +3776,8 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
? "Ready check initiated!"
|
||||
: readyCheckInitiator_ + " initiated a ready check!");
|
||||
LOG_INFO("MSG_RAID_READY_CHECK: initiator=", readyCheckInitiator_);
|
||||
if (addonEventCallback_)
|
||||
addonEventCallback_("READY_CHECK", {readyCheckInitiator_});
|
||||
break;
|
||||
}
|
||||
case Opcode::MSG_RAID_READY_CHECK_CONFIRM: {
|
||||
|
|
@ -3804,6 +3806,11 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
std::snprintf(rbuf, sizeof(rbuf), "%s is %s.", rname.c_str(), isReady ? "Ready" : "Not Ready");
|
||||
addSystemChatMessage(rbuf);
|
||||
}
|
||||
if (addonEventCallback_) {
|
||||
char guidBuf[32];
|
||||
snprintf(guidBuf, sizeof(guidBuf), "0x%016llX", (unsigned long long)respGuid);
|
||||
addonEventCallback_("READY_CHECK_CONFIRM", {guidBuf, isReady ? "1" : "0"});
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Opcode::MSG_RAID_READY_CHECK_FINISHED: {
|
||||
|
|
@ -3816,6 +3823,8 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
readyCheckReadyCount_ = 0;
|
||||
readyCheckNotReadyCount_ = 0;
|
||||
readyCheckResults_.clear();
|
||||
if (addonEventCallback_)
|
||||
addonEventCallback_("READY_CHECK_FINISHED", {});
|
||||
break;
|
||||
}
|
||||
case Opcode::SMSG_RAID_INSTANCE_INFO:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue