restructure project
This commit is contained in:
26
include/td/protocol/packets/PlayerLeavePacket.h
Normal file
26
include/td/protocol/packets/PlayerLeavePacket.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user