mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
[8382] Implement ByteArray functions for skip read of fields not needed for server in received packets. Author: VladimirMangos
* 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.
--HG--
branch : trunk
This commit is contained in:
@@ -495,8 +495,8 @@ void WorldSession::HandleSetSelectionOpcode( WorldPacket & recv_data )
|
||||
|
||||
void WorldSession::HandleStandStateChangeOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
sLog.outDebug( "WORLD: Received CMSG_STAND_STATE_CHANGE" );
|
||||
uint8 animstate;
|
||||
// sLog.outDebug( "WORLD: Received CMSG_STANDSTATECHANGE" ); -- too many spam in log at lags/debug stop
|
||||
uint32 animstate;
|
||||
recv_data >> animstate;
|
||||
|
||||
_player->SetStandState(animstate);
|
||||
@@ -1035,11 +1035,12 @@ void WorldSession::HandleNextCinematicCamera( WorldPacket & /*recv_data*/ )
|
||||
DEBUG_LOG( "WORLD: Which movie to play" );
|
||||
}
|
||||
|
||||
void WorldSession::HandleMoveTimeSkippedOpcode( WorldPacket & /*recv_data*/ )
|
||||
void WorldSession::HandleMoveTimeSkippedOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
/* WorldSession::Update( getMSTime() );*/
|
||||
DEBUG_LOG( "WORLD: Time Lag/Synchronization Resent/Update" );
|
||||
|
||||
recv_data.read_skip2<uint64,uint32>();
|
||||
/*
|
||||
uint64 guid;
|
||||
uint32 time_skipped;
|
||||
@@ -1060,19 +1061,20 @@ void WorldSession::HandleFeatherFallAck(WorldPacket &/*recv_data*/)
|
||||
DEBUG_LOG("WORLD: CMSG_MOVE_FEATHER_FALL_ACK");
|
||||
}
|
||||
|
||||
void WorldSession::HandleMoveUnRootAck(WorldPacket&/* recv_data*/)
|
||||
void WorldSession::HandleMoveUnRootAck(WorldPacket& recv_data)
|
||||
{
|
||||
/*
|
||||
sLog.outDebug( "WORLD: CMSG_FORCE_MOVE_UNROOT_ACK" );
|
||||
|
||||
sLog.outDebug( "WORLD: CMSG_FORCE_MOVE_UNROOT_ACK" );
|
||||
recv_data.read_skip<uint64>(); // guid
|
||||
recv_data.read_skip<uint64>(); // unknown1
|
||||
recv_data.read_skip<uint32>(); // unknown2
|
||||
recv_data.read_skip<float>(); // PositionX
|
||||
recv_data.read_skip<float>(); // PositionY
|
||||
recv_data.read_skip<float>(); // PositionZ
|
||||
recv_data.read_skip<float>(); // Orientation
|
||||
|
||||
/*
|
||||
recv_data.hexlike();
|
||||
uint64 guid;
|
||||
uint64 unknown1;
|
||||
uint32 unknown2;
|
||||
float PositionX;
|
||||
float PositionY;
|
||||
float PositionZ;
|
||||
float Orientation;
|
||||
|
||||
recv_data >> guid;
|
||||
recv_data >> unknown1;
|
||||
@@ -1093,8 +1095,16 @@ void WorldSession::HandleMoveUnRootAck(WorldPacket&/* recv_data*/)
|
||||
*/
|
||||
}
|
||||
|
||||
void WorldSession::HandleMoveRootAck(WorldPacket&/* recv_data*/)
|
||||
void WorldSession::HandleMoveRootAck(WorldPacket& recv_data)
|
||||
{
|
||||
recv_data.read_skip<uint64>(); // guid
|
||||
recv_data.read_skip<uint64>(); // unknown1
|
||||
recv_data.read_skip<uint32>(); // unknown2
|
||||
recv_data.read_skip<float>(); // PositionX
|
||||
recv_data.read_skip<float>(); // PositionY
|
||||
recv_data.read_skip<float>(); // PositionZ
|
||||
recv_data.read_skip<float>(); // Orientation
|
||||
|
||||
/*
|
||||
sLog.outDebug( "WORLD: CMSG_FORCE_MOVE_ROOT_ACK" );
|
||||
recv_data.hexlike();
|
||||
@@ -1141,8 +1151,9 @@ void WorldSession::HandleSetActionBarToggles(WorldPacket& recv_data)
|
||||
GetPlayer()->SetByteValue(PLAYER_FIELD_BYTES, 2, ActionBar);
|
||||
}
|
||||
|
||||
void WorldSession::HandleWardenDataOpcode(WorldPacket& /*recv_data*/)
|
||||
void WorldSession::HandleWardenDataOpcode(WorldPacket& recv_data)
|
||||
{
|
||||
recv_data.read_skip<uint8>();
|
||||
/*
|
||||
uint8 tmp;
|
||||
recv_data >> tmp;
|
||||
|
||||
Reference in New Issue
Block a user