1
0

cProtocol add SendExperience() and debugging

This commit is contained in:
Daniel O'Brien
2013-11-15 08:35:02 +11:00
parent ea778c7027
commit f6e16ce150
8 changed files with 48 additions and 1 deletions

View File

@@ -72,6 +72,7 @@ enum
PACKET_ENT_STATUS = 0x26,
PACKET_ATTACH_ENTITY = 0x27,
PACKET_METADATA = 0x28,
PACKET_EXPERIENCE = 0x2b,
PACKET_PRE_CHUNK = 0x32,
PACKET_MAP_CHUNK = 0x33,
PACKET_MULTI_BLOCK = 0x34,
@@ -690,6 +691,20 @@ void cProtocol125::SendRespawn(void)
void cProtocol125::SendSetExperience(void)
{
cCSLock Lock(m_CSPacket);
WriteByte (PACKET_EXPERIENCE);
WriteFloat (m_Client->GetPlayer()->XpGetPercentage());
WriteShort (m_Client->GetPlayer()->XpGetLevel());
WriteShort (m_Client->GetPlayer()->XpGetTotal());
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