mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
feat: show kick target name and reason in LFG vote-kick UI
Parse the optional reason and target name strings from SMSG_LFG_BOOT_PROPOSAL_UPDATE and display them in the Dungeon Finder vote-kick section. Strings are cleared when the vote ends.
This commit is contained in:
parent
d8d59dcdc8
commit
c1a090a17c
3 changed files with 30 additions and 5 deletions
|
|
@ -13111,11 +13111,19 @@ void GameHandler::handleLfgBootProposalUpdate(network::Packet& packet) {
|
|||
lfgBootTimeLeft_ = timeLeft;
|
||||
lfgBootNeeded_ = votesNeeded;
|
||||
|
||||
// Optional: reason string and target name (null-terminated) follow the fixed fields
|
||||
if (packet.getSize() - packet.getReadPos() > 0)
|
||||
lfgBootReason_ = packet.readString();
|
||||
if (packet.getSize() - packet.getReadPos() > 0)
|
||||
lfgBootTargetName_ = packet.readString();
|
||||
|
||||
if (inProgress) {
|
||||
lfgState_ = LfgState::Boot;
|
||||
} else {
|
||||
// Boot vote ended — return to InDungeon state regardless of outcome
|
||||
lfgBootVotes_ = lfgBootTotal_ = lfgBootTimeLeft_ = lfgBootNeeded_ = 0;
|
||||
lfgBootTargetName_.clear();
|
||||
lfgBootReason_.clear();
|
||||
lfgState_ = LfgState::InDungeon;
|
||||
if (myAnswer) {
|
||||
addSystemChatMessage("Dungeon Finder: Vote kick passed — member removed.");
|
||||
|
|
@ -13125,7 +13133,8 @@ void GameHandler::handleLfgBootProposalUpdate(network::Packet& packet) {
|
|||
}
|
||||
|
||||
LOG_INFO("SMSG_LFG_BOOT_PROPOSAL_UPDATE: inProgress=", inProgress,
|
||||
" bootVotes=", bootVotes, "/", totalVotes);
|
||||
" bootVotes=", bootVotes, "/", totalVotes,
|
||||
" target=", lfgBootTargetName_, " reason=", lfgBootReason_);
|
||||
}
|
||||
|
||||
void GameHandler::handleLfgTeleportDenied(network::Packet& packet) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue