summaryrefslogtreecommitdiffstats
path: root/ProtoProxy/Connection.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-18 10:13:12 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-18 10:13:12 +0200
commite32a85f752819d9fdc0f2325fb2a752dfa11b5df (patch)
tree39e70a1205556e15179ba00d8a483aba6cd2b289 /ProtoProxy/Connection.cpp
parentProtoProxy: added more packets, mostly windowing-related (diff)
downloadcuberite-e32a85f752819d9fdc0f2325fb2a752dfa11b5df.tar
cuberite-e32a85f752819d9fdc0f2325fb2a752dfa11b5df.tar.gz
cuberite-e32a85f752819d9fdc0f2325fb2a752dfa11b5df.tar.bz2
cuberite-e32a85f752819d9fdc0f2325fb2a752dfa11b5df.tar.lz
cuberite-e32a85f752819d9fdc0f2325fb2a752dfa11b5df.tar.xz
cuberite-e32a85f752819d9fdc0f2325fb2a752dfa11b5df.tar.zst
cuberite-e32a85f752819d9fdc0f2325fb2a752dfa11b5df.zip
Diffstat (limited to 'ProtoProxy/Connection.cpp')
-rw-r--r--ProtoProxy/Connection.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/ProtoProxy/Connection.cpp b/ProtoProxy/Connection.cpp
index bdf735199..69bbcf66d 100644
--- a/ProtoProxy/Connection.cpp
+++ b/ProtoProxy/Connection.cpp
@@ -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);