Implented Spawn Experience Orb packet.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user