ProtoProxy: Added the PACKET_MAP_CHUNK_BULK packet handling
git-svn-id: http://mc-server.googlecode.com/svn/trunk@862 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
5d62d8158c
commit
13e5ee887c
@ -118,6 +118,7 @@ enum
|
||||
PACKET_MAP_CHUNK = 0x33,
|
||||
PACKET_MULTI_BLOCK_CHANGE = 0x34,
|
||||
PACKET_BLOCK_CHANGE = 0x35,
|
||||
PACKET_MAP_CHUNK_BULK = 0x38,
|
||||
PACKET_CHANGE_GAME_STATE = 0x46,
|
||||
PACKET_WINDOW_CLOSE = 0x65,
|
||||
PACKET_WINDOW_CLICK = 0x66,
|
||||
@ -548,6 +549,7 @@ bool cConnection::DecodeServersPackets(const char * a_Data, int a_Size)
|
||||
case PACKET_KICK: HANDLE_SERVER_READ(HandleServerKick); break;
|
||||
case PACKET_LOGIN: HANDLE_SERVER_READ(HandleServerLogin); break;
|
||||
case PACKET_MAP_CHUNK: HANDLE_SERVER_READ(HandleServerMapChunk); break;
|
||||
case PACKET_MAP_CHUNK_BULK: HANDLE_SERVER_READ(HandleServerMapChunkBulk); break;
|
||||
case PACKET_MULTI_BLOCK_CHANGE: HANDLE_SERVER_READ(HandleServerMultiBlockChange); break;
|
||||
case PACKET_PLAYER_ABILITIES: HANDLE_SERVER_READ(HandleServerPlayerAbilities); break;
|
||||
case PACKET_PLAYER_LIST_ITEM: HANDLE_SERVER_READ(HandleServerPlayerListItem); break;
|
||||
@ -1145,6 +1147,34 @@ bool cConnection::HandleServerMapChunk(void)
|
||||
|
||||
|
||||
|
||||
bool cConnection::HandleServerMapChunkBulk(void)
|
||||
{
|
||||
HANDLE_SERVER_PACKET_READ(ReadBEShort, short, ChunkCount);
|
||||
HANDLE_SERVER_PACKET_READ(ReadBEInt, int, CompressedSize);
|
||||
AString CompressedData;
|
||||
if (!m_ServerBuffer.ReadString(CompressedData, CompressedSize))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AString Meta;
|
||||
if (!m_ServerBuffer.ReadString(Meta, ChunkCount * 12))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Log("Received a PACKET_MAP_CHUNK_BULK from the server:");
|
||||
Log(" ChunkCount = %d", ChunkCount);
|
||||
Log(" Compressed size = %d (0x%x)", CompressedSize, CompressedSize);
|
||||
|
||||
// TODO: Save the compressed data into a file for later analysis
|
||||
|
||||
COPY_TO_CLIENT();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool cConnection::HandleServerMultiBlockChange(void)
|
||||
{
|
||||
HANDLE_SERVER_PACKET_READ(ReadBEInt, int, ChunkX);
|
||||
|
@ -129,6 +129,7 @@ protected:
|
||||
bool HandleServerKick(void);
|
||||
bool HandleServerLogin(void);
|
||||
bool HandleServerMapChunk(void);
|
||||
bool HandleServerMapChunkBulk(void);
|
||||
bool HandleServerMultiBlockChange(void);
|
||||
bool HandleServerPlayerAbilities(void);
|
||||
bool HandleServerPlayerListItem(void);
|
||||
|
Loading…
Reference in New Issue
Block a user