diff options
author | Alexander Harkness <bearbin@gmail.com> | 2013-11-24 15:37:03 +0100 |
---|---|---|
committer | Alexander Harkness <bearbin@gmail.com> | 2013-11-24 15:37:03 +0100 |
commit | c3cd436ec3526962f0f0698ab2d75774247c340b (patch) | |
tree | af5fa89e891ede194f981399af8b830afc6dec97 /src/Protocol/Protocol125.cpp | |
parent | Removed pedantic build and added optimisation to debug builds. (diff) | |
parent | RCONClient: Initial implementation. (diff) | |
download | cuberite-c3cd436ec3526962f0f0698ab2d75774247c340b.tar cuberite-c3cd436ec3526962f0f0698ab2d75774247c340b.tar.gz cuberite-c3cd436ec3526962f0f0698ab2d75774247c340b.tar.bz2 cuberite-c3cd436ec3526962f0f0698ab2d75774247c340b.tar.lz cuberite-c3cd436ec3526962f0f0698ab2d75774247c340b.tar.xz cuberite-c3cd436ec3526962f0f0698ab2d75774247c340b.tar.zst cuberite-c3cd436ec3526962f0f0698ab2d75774247c340b.zip |
Diffstat (limited to 'src/Protocol/Protocol125.cpp')
-rw-r--r-- | src/Protocol/Protocol125.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Protocol/Protocol125.cpp b/src/Protocol/Protocol125.cpp index 9f2770815..54be65b12 100644 --- a/src/Protocol/Protocol125.cpp +++ b/src/Protocol/Protocol125.cpp @@ -72,6 +72,7 @@ enum PACKET_ENT_STATUS = 0x26, PACKET_ATTACH_ENTITY = 0x27, PACKET_METADATA = 0x28, + PACKET_EXPERIENCE = 0x2b, PACKET_PRE_CHUNK = 0x32, PACKET_MAP_CHUNK = 0x33, PACKET_MULTI_BLOCK = 0x34, @@ -690,6 +691,20 @@ void cProtocol125::SendRespawn(void) +void cProtocol125::SendExperience(void) +{ + cCSLock Lock(m_CSPacket); + WriteByte (PACKET_EXPERIENCE); + WriteFloat (m_Client->GetPlayer()->GetXpPercentage()); + WriteShort (m_Client->GetPlayer()->GetXpLevel()); + WriteShort (m_Client->GetPlayer()->GetCurrentXp()); + Flush(); +} + + + + + void cProtocol125::SendSoundEffect(const AString & a_SoundName, int a_SrcX, int a_SrcY, int a_SrcZ, float a_Volume, float a_Pitch) { // Not needed in this protocol version |