#pragma once

#include "td/protocol/Protocol.h"
#include "td/game/BaseGame.h"

namespace td {
namespace protocol {

struct MobSend { // represents a mob send
	game::MobType mobType : 4;
	game::MobLevel mobLevel : 4;
	std::uint8_t mobCount; // the max is 12
};

class SendMobsPacket : public Packet {
private:
	std::vector<MobSend> m_MobSends;
public:
	SendMobsPacket() {}
	SendMobsPacket(const std::vector<MobSend>& mobSends) : m_MobSends(mobSends) {}
	virtual ~SendMobsPacket() {}

	virtual DataBuffer Serialize(bool packetID = true) const;
	virtual void Deserialize(DataBuffer& data);
	virtual void Dispatch(PacketHandler* handler) const;

	const std::vector<MobSend>& GetMobSends() const { return m_MobSends; }

	virtual PacketType GetType() const { return PacketType::SendMobs; }
};

} // namespace protocol
} // namespace td
