From 60c29274d38c652d26b5c71955daef7d66114c7b Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 23 Sep 2012 15:57:25 +0000 Subject: Fixed entity equipment packet in the 1.3.2 protocol. git-svn-id: http://mc-server.googlecode.com/svn/trunk@874 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Protocol132.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/Protocol132.cpp') diff --git a/source/Protocol132.cpp b/source/Protocol132.cpp index 32fd4b63c..2b8d4c19c 100644 --- a/source/Protocol132.cpp +++ b/source/Protocol132.cpp @@ -53,6 +53,7 @@ enum { PACKET_KEEP_ALIVE = 0x00, PACKET_LOGIN = 0x01, + PACKET_ENTITY_EQUIPMENT = 0x05, PACKET_COMPASS = 0x06, PACKET_PLAYER_SPAWN = 0x14, PACKET_SPAWN_MOB = 0x18, @@ -256,6 +257,20 @@ void cProtocol132::SendDestroyEntity(const cEntity & a_Entity) +void cProtocol132::SendEntityEquipment(const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) +{ + cCSLock Lock(m_CSPacket); + WriteByte (PACKET_ENTITY_EQUIPMENT); + WriteInt (a_Entity.GetUniqueID()); + WriteShort(a_SlotNum); + WriteItem (a_Item); + Flush(); +} + + + + + void cProtocol132::SendKeepAlive(int a_PingID) { cCSLock Lock(m_CSPacket); -- cgit v1.2.3