46 for (
auto val : a_UUID.
ToRaw())
138 return fmt::format(FMT_STRING(
"Unknown packet type: 0x{:02x}"), a_PacketType);
bool WriteBEUInt8(UInt8 a_Value)
void WriteUUID(const cUUID &a_UUID)
Writes the specified UUID as a 128-bit BigEndian integer.
void WriteBEInt32(Int32 a_Value)
static AString PacketTypeToStr(cProtocol::ePacketType a_PacketType)
Returns the human-readable representation of the packet type.
cProtocol & m_Protocol
The protocol instance in which the packet is being constructed.
~cPacketizer()
Sends the packet via the contained protocol's SendPacket() function.
void WriteFPInt(double a_Value)
Writes the double value as a 27:5 fixed-point integer.
void WriteByteAngle(double a_Angle)
Writes the specified angle using a single byte.
cByteBuffer & m_Out
The protocol's buffer for the constructed packet data.
void WriteBEInt8(Int8 a_Value)
virtual void SendPacket(cPacketizer &a_Packet)=0
Sends a single packet contained within the cPacketizer class.
ePacketType
Logical types of outgoing packets.
@ pktTabCompletionResults
@ pktPlayerListHeaderFooter
@ pktDisconnectDuringGame
@ pktDisconnectDuringLogin
std::array< Byte, 16 > ToRaw() const
Converts UUID to raw memory representation, respecting UUID variant.