Files

26 lines
645 B
C
Raw Permalink Normal View History

2026-03-01 12:16:08 +08:00
#pragma once
using namespace std;
#include "Packet.h"
class LevelEventPacket : public Packet, public enable_shared_from_this<LevelEventPacket>
{
public:
int type;
int data;
int x, y, z;
bool globalEvent;
2026-03-01 12:16:08 +08:00
LevelEventPacket();
LevelEventPacket(int type, int x, int y, int z, int data, bool globalEvent);
2026-03-01 12:16:08 +08:00
virtual void read(DataInputStream *dis);
virtual void write(DataOutputStream *dos);
virtual void handle(PacketListener *listener);
virtual int getEstimatedSize();
bool isGlobalEvent();
2026-03-01 12:16:08 +08:00
public:
static shared_ptr<Packet> create() { return shared_ptr<Packet>(new LevelEventPacket()); }
2026-03-01 12:16:08 +08:00
virtual int getId() { return 61; }
};