ProtoProxy: added the CHANGE_GAME_STATE packet handling
git-svn-id: http://mc-server.googlecode.com/svn/trunk@860 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
049557e60c
commit
e32a85f752
@ -117,6 +117,7 @@ enum
|
||||
PACKET_MAP_CHUNK = 0x33,
|
||||
PACKET_MULTI_BLOCK_CHANGE = 0x34,
|
||||
PACKET_BLOCK_CHANGE = 0x35,
|
||||
PACKET_CHANGE_GAME_STATE = 0x46,
|
||||
PACKET_WINDOW_CLOSE = 0x65,
|
||||
PACKET_WINDOW_CLICK = 0x66,
|
||||
PACKET_SET_SLOT = 0x67,
|
||||
@ -536,6 +537,7 @@ bool cConnection::DecodeServersPackets(const char * a_Data, int a_Size)
|
||||
switch (PacketType)
|
||||
{
|
||||
case PACKET_BLOCK_CHANGE: HANDLE_SERVER_READ(HandleServerBlockChange); break;
|
||||
case PACKET_CHANGE_GAME_STATE: HANDLE_SERVER_READ(HandleServerChangeGameState); break;
|
||||
case PACKET_CHAT_MESSAGE: HANDLE_SERVER_READ(HandleServerChatMessage); break;
|
||||
case PACKET_COMPASS: HANDLE_SERVER_READ(HandleServerCompass); break;
|
||||
case PACKET_ENCRYPTION_KEY_REQUEST: HANDLE_SERVER_READ(HandleServerEncryptionKeyRequest); break;
|
||||
@ -940,6 +942,21 @@ bool cConnection::HandleServerBlockChange(void)
|
||||
|
||||
|
||||
|
||||
bool cConnection::HandleServerChangeGameState(void)
|
||||
{
|
||||
HANDLE_SERVER_PACKET_READ(ReadChar, char, Reason);
|
||||
HANDLE_SERVER_PACKET_READ(ReadChar, char, Data);
|
||||
Log("Received a PACKET_CHANGE_GAME_STATE from the server:");
|
||||
Log(" Reason = %d", Reason);
|
||||
Log(" Data = %d", Data);
|
||||
COPY_TO_CLIENT();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool cConnection::HandleServerChatMessage(void)
|
||||
{
|
||||
HANDLE_SERVER_PACKET_READ(ReadBEUTF16String16, AString, Message);
|
||||
|
@ -119,6 +119,7 @@ protected:
|
||||
|
||||
// Packet handling, server-side:
|
||||
bool HandleServerBlockChange(void);
|
||||
bool HandleServerChangeGameState(void);
|
||||
bool HandleServerChatMessage(void);
|
||||
bool HandleServerCompass(void);
|
||||
bool HandleServerEncryptionKeyRequest(void);
|
||||
|
Loading…
Reference in New Issue
Block a user