summaryrefslogtreecommitdiffstats
path: root/source/Protocol/Protocol125.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Protocol/Protocol125.cpp')
-rw-r--r--source/Protocol/Protocol125.cpp18
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