mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-27 05:03:36 +00:00
26 lines
678 B
C++
26 lines
678 B
C++
#pragma once
|
|
#include <cstdint>
|
|
|
|
#include "Packet.h"
|
|
|
|
class TexturePacket : public Packet, public std::enable_shared_from_this<TexturePacket>
|
|
{
|
|
public:
|
|
std::wstring textureName;
|
|
std::uint8_t *pbData;
|
|
std::uint32_t dataBytes;
|
|
|
|
TexturePacket();
|
|
~TexturePacket();
|
|
TexturePacket(const std::wstring &textureName, std::uint8_t *pbData, std::uint32_t dataBytes);
|
|
|
|
virtual void handle(PacketListener *listener);
|
|
virtual void read(DataInputStream *dis);
|
|
virtual void write(DataOutputStream *dos);
|
|
virtual int getEstimatedSize();
|
|
|
|
public:
|
|
static std::shared_ptr<Packet> create() { return std::shared_ptr<Packet>(new TexturePacket()); }
|
|
virtual int getId() { return 154; }
|
|
};
|