From dfce9595e9cd3cdd9043805de5dfd3b16abfc868 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 13 Oct 2012 09:40:55 +0000 Subject: ProtoProxy: Added the PACKET_ENTITY_ACTION packet handling git-svn-id: http://mc-server.googlecode.com/svn/trunk@954 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- ProtoProxy/Connection.cpp | 17 +++++++++++++++++ ProtoProxy/Connection.h | 1 + 2 files changed, 18 insertions(+) (limited to 'ProtoProxy') diff --git a/ProtoProxy/Connection.cpp b/ProtoProxy/Connection.cpp index ec6886242..b0f63493b 100644 --- a/ProtoProxy/Connection.cpp +++ b/ProtoProxy/Connection.cpp @@ -114,6 +114,7 @@ enum PACKET_BLOCK_PLACE = 0x0f, PACKET_SLOT_SELECT = 0x10, PACKET_ANIMATION = 0x12, + PACKET_ENTITY_ACTION = 0x13, PACKET_SPAWN_PICKUP = 0x15, PACKET_COLLECT_PICKUP = 0x16, PACKET_SPAWN_OBJECT_VEHICLE = 0x17, @@ -508,6 +509,7 @@ bool cConnection::DecodeClientsPackets(const char * a_Data, int a_Size) case PACKET_CLIENT_STATUSES: HANDLE_CLIENT_READ(HandleClientClientStatuses); break; case PACKET_CREATIVE_INVENTORY_ACTION: HANDLE_CLIENT_READ(HandleClientCreativeInventoryAction); break; case PACKET_ENCRYPTION_KEY_RESPONSE: HANDLE_CLIENT_READ(HandleClientEncryptionKeyResponse); break; + case PACKET_ENTITY_ACTION: HANDLE_CLIENT_READ(HandleClientEntityAction); break; case PACKET_HANDSHAKE: HANDLE_CLIENT_READ(HandleClientHandshake); break; case PACKET_KEEPALIVE: HANDLE_CLIENT_READ(HandleClientKeepAlive); break; case PACKET_LOCALE_AND_VIEW: HANDLE_CLIENT_READ(HandleClientLocaleAndView); break; @@ -777,6 +779,21 @@ bool cConnection::HandleClientEncryptionKeyResponse(void) +bool cConnection::HandleClientEntityAction(void) +{ + HANDLE_CLIENT_PACKET_READ(ReadBEInt, int, PlayerID); + HANDLE_CLIENT_PACKET_READ(ReadByte, Byte, ActionType); + Log("Received a PACKET_ENTITY_ACTION from the client:"); + Log(" PlayerID = %d", PlayerID); + Log(" ActionType = %d", ActionType); + COPY_TO_SERVER(); + return true; +} + + + + + bool cConnection::HandleClientHandshake(void) { // Read the packet from the client: diff --git a/ProtoProxy/Connection.h b/ProtoProxy/Connection.h index cc132bca2..307076ed8 100644 --- a/ProtoProxy/Connection.h +++ b/ProtoProxy/Connection.h @@ -103,6 +103,7 @@ protected: bool HandleClientClientStatuses(void); bool HandleClientCreativeInventoryAction(void); bool HandleClientEncryptionKeyResponse(void); + bool HandleClientEntityAction(void); bool HandleClientHandshake(void); bool HandleClientKeepAlive(void); bool HandleClientLocaleAndView(void); -- cgit v1.2.3