#pragma once #include "Packet.h" #include using namespace std; class AuthResultPacket : public Packet, public enable_shared_from_this { public: bool success; wstring assignedUuid; // final UUID assigned by server (dashed) wstring assignedUsername; // final username wstring errorMessage; // empty if success wstring skinKey; // memory-texture key (e.g. "mojang_skin_{uuid}.png") std::vector skinData; // raw PNG bytes of the Mojang skin (already cropped to 64x32) AuthResultPacket(); AuthResultPacket(bool success, const wstring& assignedUuid, const wstring& assignedUsername, const wstring& errorMessage, const wstring& skinKey = L"", std::vector skinData = {}); virtual void read(DataInputStream *dis); virtual void write(DataOutputStream *dos); virtual void handle(PacketListener *listener); virtual int getEstimatedSize(); static shared_ptr create() { return make_shared(); } virtual int getId() { return 172; } };