32 lines
654 B
C++
32 lines
654 B
C++
#pragma once
|
|
|
|
#include "blitz/protocol/Protocol.h"
|
|
|
|
namespace blitz {
|
|
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 blitz
|