summaryrefslogtreecommitdiffstats
path: root/source/Protocol
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/Protocol/Protocol.h3
-rw-r--r--source/Protocol/Protocol125.cpp12
-rw-r--r--source/Protocol/Protocol125.h2
-rw-r--r--source/Protocol/Protocol17x.cpp12
-rw-r--r--source/Protocol/Protocol17x.h2
-rw-r--r--source/Protocol/ProtocolRecognizer.cpp4
-rw-r--r--source/Protocol/ProtocolRecognizer.h2
7 files changed, 19 insertions, 18 deletions
diff --git a/source/Protocol/Protocol.h b/source/Protocol/Protocol.h
index 18cf3676a..9d8183361 100644
--- a/source/Protocol/Protocol.h
+++ b/source/Protocol/Protocol.h
@@ -16,6 +16,7 @@
+class cExpOrb;
class cPlayer;
class cEntity;
class cWindow;
@@ -86,7 +87,7 @@ public:
virtual void SendPlayerSpawn (const cPlayer & a_Player) = 0;
virtual void SendRespawn (void) = 0;
virtual void SendExperience (void) = 0;
- virtual void SendExperienceOrb (const cEntity & a_Entity) = 0;
+ virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) = 0;
virtual void SendSoundEffect (const AString & a_SoundName, int a_SrcX, int a_SrcY, int a_SrcZ, float a_Volume, float a_Pitch) = 0; // a_Src coords are Block * 8
virtual void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data) = 0;
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) = 0;
diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp
index 3b753479d..b1dd17ea1 100644
--- a/source/Protocol/Protocol125.cpp
+++ b/source/Protocol/Protocol125.cpp
@@ -707,15 +707,15 @@ void cProtocol125::SendExperience(void)
-void cProtocol125::SendExperienceOrb(const cEntity & a_Entity)
+void cProtocol125::SendExperienceOrb(const cExpOrb & a_ExpOrb)
{
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());
+ WriteInt(a_ExpOrb.GetUniqueID());
+ WriteInt((int) a_ExpOrb.GetPosX());
+ WriteInt((int) a_ExpOrb.GetPosY());
+ WriteInt((int) a_ExpOrb.GetPosZ());
+ WriteShort(a_ExpOrb.GetReward());
Flush();
}
diff --git a/source/Protocol/Protocol125.h b/source/Protocol/Protocol125.h
index 2182ea356..5a9218f5b 100644
--- a/source/Protocol/Protocol125.h
+++ b/source/Protocol/Protocol125.h
@@ -63,7 +63,7 @@ public:
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
virtual void SendRespawn (void) override;
virtual void SendExperience (void) override;
- virtual void SendExperienceOrb (const cEntity & a_Entity) override;
+ virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) override;
virtual void SendSoundEffect (const AString & a_SoundName, int a_SrcX, int a_SrcY, int a_SrcZ, float a_Volume, float a_Pitch) override; // a_Src coords are Block * 8
virtual void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data) override;
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) override;
diff --git a/source/Protocol/Protocol17x.cpp b/source/Protocol/Protocol17x.cpp
index cf5c84599..746e1c127 100644
--- a/source/Protocol/Protocol17x.cpp
+++ b/source/Protocol/Protocol17x.cpp
@@ -610,14 +610,14 @@ void cProtocol172::SendExperience (void)
-void cProtocol172::SendExperienceOrb(const cEntity & a_Entity)
+void cProtocol172::SendExperienceOrb(const cExpOrb & a_ExpOrb)
{
cPacketizer Pkt(*this, 0x11);
- Pkt.WriteVarInt(a_Entity.GetUniqueID());
- Pkt.WriteInt((int) a_Entity.GetPosX());
- Pkt.WriteInt((int) a_Entity.GetPosY());
- Pkt.WriteInt((int) a_Entity.GetPosZ());
- Pkt.WriteShort(((cExpOrb &)a_Entity).GetReward());
+ Pkt.WriteVarInt(a_ExpOrb.GetUniqueID());
+ Pkt.WriteInt((int) a_ExpOrb.GetPosX());
+ Pkt.WriteInt((int) a_ExpOrb.GetPosY());
+ Pkt.WriteInt((int) a_ExpOrb.GetPosZ());
+ Pkt.WriteShort(a_ExpOrb.GetReward());
}
diff --git a/source/Protocol/Protocol17x.h b/source/Protocol/Protocol17x.h
index 6b8d2ce79..255cb4ef5 100644
--- a/source/Protocol/Protocol17x.h
+++ b/source/Protocol/Protocol17x.h
@@ -73,7 +73,7 @@ public:
virtual void SendRespawn (void) override;
virtual void SendSoundEffect (const AString & a_SoundName, int a_SrcX, int a_SrcY, int a_SrcZ, float a_Volume, float a_Pitch) override; // a_Src coords are Block * 8
virtual void SendExperience (void) override;
- virtual void SendExperienceOrb (const cEntity & a_Entity) override;
+ virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) override;
virtual void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data) override;
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) override;
virtual void SendSpawnMob (const cMonster & a_Mob) override;
diff --git a/source/Protocol/ProtocolRecognizer.cpp b/source/Protocol/ProtocolRecognizer.cpp
index ad00e8d38..489149d74 100644
--- a/source/Protocol/ProtocolRecognizer.cpp
+++ b/source/Protocol/ProtocolRecognizer.cpp
@@ -476,10 +476,10 @@ void cProtocolRecognizer::SendExperience(void)
-void cProtocolRecognizer::SendExperienceOrb(const cEntity & a_Entity)
+void cProtocolRecognizer::SendExperienceOrb(const cExpOrb & a_ExpOrb)
{
ASSERT(m_Protocol != NULL);
- m_Protocol->SendExperienceOrb(a_Entity);
+ m_Protocol->SendExperienceOrb(a_ExpOrb);
}
diff --git a/source/Protocol/ProtocolRecognizer.h b/source/Protocol/ProtocolRecognizer.h
index 62e624980..9ca0c1c88 100644
--- a/source/Protocol/ProtocolRecognizer.h
+++ b/source/Protocol/ProtocolRecognizer.h
@@ -98,7 +98,7 @@ public:
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
virtual void SendRespawn (void) override;
virtual void SendExperience (void) override;
- virtual void SendExperienceOrb (const cEntity & a_Entity) override;
+ virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) override;
virtual void SendSoundEffect (const AString & a_SoundName, int a_SrcX, int a_SrcY, int a_SrcZ, float a_Volume, float a_Pitch) override;
virtual void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data) override;
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) override;