[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:
VladimirMangos 2009-08-18 03:45:49 +04:00
parent 74d27294aa
commit 2b534cbc23
9 changed files with 77 additions and 41 deletions

View file

@ -610,11 +610,7 @@ void WorldSession::HandleAreaSpiritHealerQueueOpcode( WorldPacket & recv_data )
void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_BATTLEMASTER_JOIN_ARENA");
recv_data.hexlike();
// ignore if we already in BG or BG queue
if (_player->InBattleGround())
return;
//recv_data.hexlike();
uint64 guid; // arena Battlemaster guid
uint8 arenaslot; // 2v2, 3v3 or 5v5
@ -624,6 +620,10 @@ void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
recv_data >> guid >> arenaslot >> asGroup >> isRated;
// ignore if we already in BG or BG queue
if (_player->InBattleGround())
return;
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
return;