mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[8382] Implement ByteArray functions for skip read of fields not needed for server in received packets.
* Use this fucntions in some case. * Change some packets to form: read fields first check later for better control recieved packets structure. * Fix CMSG_STAND_STATE_CHANGE packet structure to more correct.
This commit is contained in:
parent
74d27294aa
commit
2b534cbc23
9 changed files with 77 additions and 41 deletions
|
|
@ -26,8 +26,7 @@
|
|||
|
||||
void WorldSession::HandleCalendarGetCalendar(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_GET_CALENDAR");
|
||||
recv_data.hexlike();
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_GET_CALENDAR"); // empty
|
||||
|
||||
time_t cur_time = time(NULL);
|
||||
|
||||
|
|
@ -74,27 +73,23 @@ void WorldSession::HandleCalendarGetEvent(WorldPacket &recv_data)
|
|||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_GET_EVENT");
|
||||
recv_data.hexlike();
|
||||
//uint64 unk1;
|
||||
//recv_data >> (uint64)unk1;
|
||||
recv_data.read_skip<uint64>(); // unk
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarGuildFilter(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_GUILD_FILTER");
|
||||
recv_data.hexlike();
|
||||
//uint32 unk1, unk2, unk3;
|
||||
//recv_data >> (uint32)unk1;
|
||||
//recv_data >> (uint32)unk2;
|
||||
//recv_data >> (uint32)unk3;
|
||||
recv_data.read_skip<uint32>(); // unk1
|
||||
recv_data.read_skip<uint32>(); // unk2
|
||||
recv_data.read_skip<uint32>(); // unk3
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarArenaTeam(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_ARENA_TEAM");
|
||||
recv_data.hexlike();
|
||||
//uint32 unk;
|
||||
//recv_data >> (uint32)unk;
|
||||
|
||||
recv_data.read_skip<uint32>(); // unk
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarAddEvent(WorldPacket &recv_data)
|
||||
|
|
@ -241,10 +236,9 @@ void WorldSession::HandleCalendarComplain(WorldPacket &recv_data)
|
|||
//recv_data >> uint64
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarGetNumPending(WorldPacket &recv_data)
|
||||
void WorldSession::HandleCalendarGetNumPending(WorldPacket & /*recv_data*/)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_GET_NUM_PENDING");
|
||||
recv_data.hexlike();
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_GET_NUM_PENDING"); // empty
|
||||
|
||||
WorldPacket data(SMSG_CALENDAR_SEND_NUM_PENDING, 4);
|
||||
data << uint32(0); // 0 - no pending invites, 1 - some pending invites
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue