mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
refactor(Core/Packets): Rewrite various calendar and complaint packets to modern class. (#22884)
This commit is contained in:
@@ -1138,45 +1138,18 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
|
||||
LOG_DEBUG("network", "Received whois command from player {} for character {}", GetPlayer()->GetName(), charname);
|
||||
}
|
||||
|
||||
void WorldSession::HandleComplainOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleComplainOpcode(WorldPackets::Misc::Complain& packet)
|
||||
{
|
||||
LOG_DEBUG("network", "WORLD: CMSG_COMPLAIN");
|
||||
|
||||
uint8 spam_type; // 0 - mail, 1 - chat
|
||||
ObjectGuid spammer_guid;
|
||||
uint32 unk1 = 0;
|
||||
uint32 unk2 = 0;
|
||||
uint32 unk3 = 0;
|
||||
uint32 unk4 = 0;
|
||||
std::string description = "";
|
||||
recv_data >> spam_type; // unk 0x01 const, may be spam type (mail/chat)
|
||||
recv_data >> spammer_guid; // player guid
|
||||
switch (spam_type)
|
||||
{
|
||||
case 0:
|
||||
recv_data >> unk1; // const 0
|
||||
recv_data >> unk2; // probably mail id
|
||||
recv_data >> unk3; // const 0
|
||||
break;
|
||||
case 1:
|
||||
recv_data >> unk1; // probably language
|
||||
recv_data >> unk2; // message type?
|
||||
recv_data >> unk3; // probably channel id
|
||||
recv_data >> unk4; // unk random value
|
||||
recv_data >> description; // spam description string (messagetype, channel name, player name, message)
|
||||
break;
|
||||
}
|
||||
|
||||
// NOTE: all chat messages from this spammer automatically ignored by spam reporter until logout in case chat spam.
|
||||
// if it's mail spam - ALL mails from this spammer automatically removed by client
|
||||
|
||||
// Complaint Received message
|
||||
WorldPacket data(SMSG_COMPLAIN_RESULT, 1);
|
||||
data << uint8(0);
|
||||
SendPacket(&data);
|
||||
SendPacket(WorldPackets::Misc::ComplainResult().Write());
|
||||
|
||||
LOG_DEBUG("network", "REPORT SPAM: type {}, {}, unk1 {}, unk2 {}, unk3 {}, unk4 {}, message {}",
|
||||
spam_type, spammer_guid.ToString(), unk1, unk2, unk3, unk4, description);
|
||||
packet.SpamType, packet.SpammerGuid.ToString(), packet.Unk1, packet.Unk2, packet.Unk3, packet.Unk4, packet.Description);
|
||||
}
|
||||
|
||||
void WorldSession::HandleRealmSplitOpcode(WorldPacket& recv_data)
|
||||
|
||||
Reference in New Issue
Block a user