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:17:38 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-18 10:17:38 +0200
commit5d62d8158cc79013e4e8ff3c620708c90313d069 (patch)
tree58c13805dfd889e412040a4a8bda9906435e5fd7 /ProtoProxy/Connection.cpp
parentProtoProxy: added the CHANGE_GAME_STATE packet handling (diff)
downloadcuberite-5d62d8158cc79013e4e8ff3c620708c90313d069.tar
cuberite-5d62d8158cc79013e4e8ff3c620708c90313d069.tar.gz
cuberite-5d62d8158cc79013e4e8ff3c620708c90313d069.tar.bz2
cuberite-5d62d8158cc79013e4e8ff3c620708c90313d069.tar.lz
cuberite-5d62d8158cc79013e4e8ff3c620708c90313d069.tar.xz
cuberite-5d62d8158cc79013e4e8ff3c620708c90313d069.tar.zst
cuberite-5d62d8158cc79013e4e8ff3c620708c90313d069.zip
Diffstat (limited to 'ProtoProxy/Connection.cpp')
-rw-r--r--ProtoProxy/Connection.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/ProtoProxy/Connection.cpp b/ProtoProxy/Connection.cpp
index 69bbcf66d..4d87888c2 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_SET_EXPERIENCE = 0x2b,
PACKET_MAP_CHUNK = 0x33,
PACKET_MULTI_BLOCK_CHANGE = 0x34,
PACKET_BLOCK_CHANGE = 0x35,
@@ -551,6 +552,7 @@ bool cConnection::DecodeServersPackets(const char * a_Data, int a_Size)
case PACKET_PLAYER_ABILITIES: HANDLE_SERVER_READ(HandleServerPlayerAbilities); break;
case PACKET_PLAYER_LIST_ITEM: HANDLE_SERVER_READ(HandleServerPlayerListItem); break;
case PACKET_PLAYER_POSITION_LOOK: HANDLE_SERVER_READ(HandleServerPlayerPositionLook); break;
+ case PACKET_SET_EXPERIENCE: HANDLE_SERVER_READ(HandleServerSetExperience); break;
case PACKET_SET_SLOT: HANDLE_SERVER_READ(HandleServerSetSlot); break;
case PACKET_TIME_UPDATE: HANDLE_SERVER_READ(HandleServerTimeUpdate); break;
case PACKET_UPDATE_HEALTH: HANDLE_SERVER_READ(HandleServerUpdateHealth); break;
@@ -1219,6 +1221,23 @@ bool cConnection::HandleServerPlayerPositionLook(void)
+bool cConnection::HandleServerSetExperience(void)
+{
+ HANDLE_SERVER_PACKET_READ(ReadBEFloat, float, ExperienceBar);
+ HANDLE_SERVER_PACKET_READ(ReadBEShort, short, Level);
+ HANDLE_SERVER_PACKET_READ(ReadBEShort, short, TotalExperience);
+ Log("Received a PACKET_SET_EXPERIENCE from the server:");
+ Log(" ExperienceBar = %.05f", ExperienceBar);
+ Log(" Level = %d", Level);
+ Log(" TotalExperience = %d", TotalExperience);
+ COPY_TO_CLIENT();
+ return true;
+}
+
+
+
+
+
bool cConnection::HandleServerSetSlot(void)
{
HANDLE_SERVER_PACKET_READ(ReadChar, char, WindowID);