mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 00:20:16 +00:00
lfg: implement CMSG_LFG_SET_BOOT_VOTE and vote-to-kick UI
CMSG_LFG_SET_BOOT_VOTE was defined in the opcode table but never sent. - Add GameHandler::lfgSetBootVote(bool) which sends the packet - Fix handleLfgBootProposalUpdate() to set lfgState_=Boot while the vote is in progress and return to InDungeon when it ends - Add Yes/No vote buttons to the Dungeon Finder window when in Boot state
This commit is contained in:
parent
acbfe99401
commit
8856af6b2d
3 changed files with 35 additions and 3 deletions
|
|
@ -11952,13 +11952,18 @@ void GameHandler::handleLfgBootProposalUpdate(network::Packet& packet) {
|
|||
(void)myVote; (void)totalVotes; (void)bootVotes; (void)timeLeft; (void)votesNeeded;
|
||||
|
||||
if (inProgress) {
|
||||
lfgState_ = LfgState::Boot;
|
||||
addSystemChatMessage(
|
||||
std::string("Dungeon Finder: Vote to kick in progress (") +
|
||||
std::to_string(timeLeft) + "s remaining).");
|
||||
} else if (myAnswer) {
|
||||
addSystemChatMessage("Dungeon Finder: Vote kick passed — member removed.");
|
||||
} else {
|
||||
addSystemChatMessage("Dungeon Finder: Vote kick failed.");
|
||||
// Boot vote ended — return to InDungeon state regardless of outcome
|
||||
lfgState_ = LfgState::InDungeon;
|
||||
if (myAnswer) {
|
||||
addSystemChatMessage("Dungeon Finder: Vote kick passed — member removed.");
|
||||
} else {
|
||||
addSystemChatMessage("Dungeon Finder: Vote kick failed.");
|
||||
}
|
||||
}
|
||||
|
||||
LOG_INFO("SMSG_LFG_BOOT_PROPOSAL_UPDATE: inProgress=", inProgress,
|
||||
|
|
@ -12027,6 +12032,18 @@ void GameHandler::lfgTeleport(bool toLfgDungeon) {
|
|||
LOG_INFO("Sent CMSG_LFG_TELEPORT: toLfgDungeon=", toLfgDungeon);
|
||||
}
|
||||
|
||||
void GameHandler::lfgSetBootVote(bool vote) {
|
||||
if (!socket) return;
|
||||
uint16_t wireOp = wireOpcode(Opcode::CMSG_LFG_SET_BOOT_VOTE);
|
||||
if (wireOp == 0xFFFF) return;
|
||||
|
||||
network::Packet pkt(wireOp);
|
||||
pkt.writeUInt8(vote ? 1 : 0);
|
||||
|
||||
socket->send(pkt);
|
||||
LOG_INFO("Sent CMSG_LFG_SET_BOOT_VOTE: vote=", vote);
|
||||
}
|
||||
|
||||
void GameHandler::loadAreaTriggerDbc() {
|
||||
if (areaTriggerDbcLoaded_) return;
|
||||
areaTriggerDbcLoaded_ = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue