summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol125.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-12-14 23:40:24 +0100
committerMattes D <github@xoft.cz>2013-12-14 23:40:24 +0100
commit5e6a4c99a7509e480e4c2b31d66044ec1fa44559 (patch)
tree9815ee7865a445f45a31485225649f5e977ef339 /src/Protocol/Protocol125.cpp
parentAdded tolua++ redirection include. (diff)
parentExported E_EFFECTS_<Effect> to lua. Forgot to commit Globals.h. (diff)
downloadcuberite-5e6a4c99a7509e480e4c2b31d66044ec1fa44559.tar
cuberite-5e6a4c99a7509e480e4c2b31d66044ec1fa44559.tar.gz
cuberite-5e6a4c99a7509e480e4c2b31d66044ec1fa44559.tar.bz2
cuberite-5e6a4c99a7509e480e4c2b31d66044ec1fa44559.tar.lz
cuberite-5e6a4c99a7509e480e4c2b31d66044ec1fa44559.tar.xz
cuberite-5e6a4c99a7509e480e4c2b31d66044ec1fa44559.tar.zst
cuberite-5e6a4c99a7509e480e4c2b31d66044ec1fa44559.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol125.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Protocol/Protocol125.cpp b/src/Protocol/Protocol125.cpp
index 9334e6f2d..d4c1f0dd5 100644
--- a/src/Protocol/Protocol125.cpp
+++ b/src/Protocol/Protocol125.cpp
@@ -43,6 +43,8 @@ enum
PACKET_HANDSHAKE = 0x02,
PACKET_CHAT = 0x03,
PACKET_UPDATE_TIME = 0x04,
+ PACKET_ENTITY_EFFECT = 0x1D,
+ PACKET_REMOVE_ENTITY_EFFECT = 0x1E,
PACKET_ENTITY_EQUIPMENT = 0x05,
PACKET_USE_ENTITY = 0x07,
PACKET_UPDATE_HEALTH = 0x08,
@@ -300,6 +302,21 @@ void cProtocol125::SendEditSign(int a_BlockX, int a_BlockY, int a_BlockZ)
+void cProtocol125::SendEntityEffect(const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration)
+{
+ cCSLock Lock(m_CSPacket);
+ WriteByte (PACKET_ENTITY_EFFECT);
+ WriteInt (a_Entity.GetUniqueID());
+ WriteByte (a_EffectID);
+ WriteByte (a_Amplifier);
+ WriteShort(a_Duration);
+ Flush();
+}
+
+
+
+
+
void cProtocol125::SendEntityEquipment(const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item)
{
cCSLock Lock(m_CSPacket);
@@ -678,6 +695,19 @@ void cProtocol125::SendPlayerSpawn(const cPlayer & a_Player)
+void cProtocol125::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID)
+{
+ cCSLock Lock(m_CSPacket);
+ WriteByte (PACKET_REMOVE_ENTITY_EFFECT);
+ WriteInt (a_Entity.GetUniqueID());
+ WriteByte (a_EffectID);
+ Flush();
+}
+
+
+
+
+
void cProtocol125::SendRespawn(void)
{
cCSLock Lock(m_CSPacket);