#include "td/protocol/packets/SpawnMobPacket.h"

namespace td {
namespace protocol {

DataBuffer SpawnMobPacket::Serialize(bool packetID) const {
	DataBuffer data;

	WritePacketID(data, packetID);
	data << m_MobID << m_MobType << m_MobLevel << m_MobDirection
		<< m_Sender << m_MobX << m_MobY;
	return data;
}

void SpawnMobPacket::Deserialize(DataBuffer& data) {
	data >> m_MobID >> m_MobType >> m_MobLevel >> m_MobDirection
		>> m_Sender >> m_MobX >> m_MobY;
}

} // namespace protocol
} // namespace td
