2026-03-01 12:16:08 +08:00
|
|
|
#pragma once
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
#include "Packet.h"
|
|
|
|
|
|
|
|
|
|
class SetTimePacket : public Packet, public enable_shared_from_this<SetTimePacket>
|
|
|
|
|
{
|
|
|
|
|
public:
|
2026-03-03 03:04:10 +08:00
|
|
|
__int64 gameTime;
|
|
|
|
|
__int64 dayTime;
|
2026-03-01 12:16:08 +08:00
|
|
|
|
|
|
|
|
SetTimePacket();
|
2026-03-03 03:04:10 +08:00
|
|
|
SetTimePacket(__int64 gameTime, __int64 dayTime, bool tickDayTime);
|
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();
|
|
|
|
|
virtual bool canBeInvalidated();
|
2026-03-02 17:37:16 +07:00
|
|
|
virtual bool isInvalidatedBy(shared_ptr<Packet> packet);
|
2026-03-01 12:16:08 +08:00
|
|
|
virtual bool isAync();
|
|
|
|
|
|
|
|
|
|
public:
|
2026-03-02 17:37:16 +07:00
|
|
|
static shared_ptr<Packet> create() { return shared_ptr<Packet>(new SetTimePacket()); }
|
2026-03-01 12:16:08 +08:00
|
|
|
virtual int getId() { return 4; }
|
|
|
|
|
};
|