27 lines
632 B
C++
27 lines
632 B
C++
#pragma once
|
|
|
|
#include "td/protocol/Protocol.h"
|
|
|
|
namespace td {
|
|
namespace protocol {
|
|
|
|
class PlayerLeavePacket : public Packet {
|
|
private:
|
|
std::uint8_t m_PlayerID;
|
|
public:
|
|
PlayerLeavePacket() {}
|
|
PlayerLeavePacket(std::uint8_t playerID) : m_PlayerID(playerID) {}
|
|
virtual ~PlayerLeavePacket() {}
|
|
|
|
virtual DataBuffer Serialize(bool packetID = true) const;
|
|
virtual void Deserialize(DataBuffer& data);
|
|
virtual void Dispatch(PacketHandler* handler) const;
|
|
|
|
std::uint8_t GetPlayerID() const { return m_PlayerID; }
|
|
|
|
virtual PacketType GetType() const { return PacketType::PlayerLeave; }
|
|
};
|
|
|
|
} // namespace protocol
|
|
} // namespace td
|