diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2013-11-25 20:04:01 +0100 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2013-11-25 20:04:01 +0100 |
commit | b93d1b5027afc55be3a5e1c882c023d400f2bbfa (patch) | |
tree | 88e014865ae23e3f95d2ed70a7dce8330ac26253 /source/Protocol/Protocol125.cpp | |
parent | AnvilStats: Fixed compilation. (diff) | |
download | cuberite-b93d1b5027afc55be3a5e1c882c023d400f2bbfa.tar cuberite-b93d1b5027afc55be3a5e1c882c023d400f2bbfa.tar.gz cuberite-b93d1b5027afc55be3a5e1c882c023d400f2bbfa.tar.bz2 cuberite-b93d1b5027afc55be3a5e1c882c023d400f2bbfa.tar.lz cuberite-b93d1b5027afc55be3a5e1c882c023d400f2bbfa.tar.xz cuberite-b93d1b5027afc55be3a5e1c882c023d400f2bbfa.tar.zst cuberite-b93d1b5027afc55be3a5e1c882c023d400f2bbfa.zip |
Diffstat (limited to 'source/Protocol/Protocol125.cpp')
-rw-r--r-- | source/Protocol/Protocol125.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp index 54be65b12..3b753479d 100644 --- a/source/Protocol/Protocol125.cpp +++ b/source/Protocol/Protocol125.cpp @@ -17,6 +17,7 @@ Documentation: #include "../World.h" #include "ChunkDataSerializer.h" #include "../Entities/Entity.h" +#include "../Entities/ExpOrb.h" #include "../Mobs/Monster.h" #include "../Entities/Pickup.h" #include "../Entities/Player.h" @@ -72,6 +73,7 @@ enum PACKET_ENT_STATUS = 0x26, PACKET_ATTACH_ENTITY = 0x27, PACKET_METADATA = 0x28, + PACKET_SPAWN_EXPERIENCE_ORB = 0x1A, PACKET_EXPERIENCE = 0x2b, PACKET_PRE_CHUNK = 0x32, PACKET_MAP_CHUNK = 0x33, @@ -705,6 +707,22 @@ void cProtocol125::SendExperience(void) +void cProtocol125::SendExperienceOrb(const cEntity & a_Entity) +{ + cCSLock Lock(m_CSPacket); + WriteByte(PACKET_SPAWN_EXPERIENCE_ORB); + WriteInt(a_Entity.GetUniqueID()); + WriteInt((int) a_Entity.GetPosX()); + WriteInt((int) a_Entity.GetPosY()); + WriteInt((int) a_Entity.GetPosZ()); + WriteShort(((cExpOrb &)a_Entity).GetReward()); + 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 |