#pragma once

#include "td/protocol/Protocol.h"

namespace td {
namespace protocol {

class PlayerLoginPacket : public Packet {
private:
	std::string m_PlayerName;
public:
	PlayerLoginPacket() {}
	PlayerLoginPacket(std::string playerName) : m_PlayerName(playerName) {}
	virtual ~PlayerLoginPacket() {}

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

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

	const std::string& GetPlayerName() const { return m_PlayerName; }
};

} // namespace protocol
} // namespace td
