the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2using namespace std;
3
4#include "Packet.h"
5
6class DisconnectPacket : public Packet, public enable_shared_from_this<DisconnectPacket>
7{
8public:
9
10 enum eDisconnectReason
11 {
12 eDisconnect_None = 0,
13 eDisconnect_Quitting,
14 eDisconnect_Closed,
15
16 eDisconnect_LoginTooLong,
17 eDisconnect_IllegalStance,
18 eDisconnect_IllegalPosition,
19 eDisconnect_MovedTooQuickly,
20 eDisconnect_NoFlying,
21 eDisconnect_Kicked,
22
23 eDisconnect_TimeOut,
24 eDisconnect_Overflow,
25 eDisconnect_EndOfStream,
26 eDisconnect_ServerFull,
27 eDisconnect_OutdatedServer,
28 eDisconnect_OutdatedClient,
29 eDisconnect_UnexpectedPacket,
30
31 eDisconnect_ConnectionCreationFailed,
32 eDisconnect_NoMultiplayerPrivilegesHost,
33 eDisconnect_NoMultiplayerPrivilegesJoin,
34
35 eDisconnect_NoUGC_AllLocal,
36 eDisconnect_NoUGC_Single_Local,
37 eDisconnect_ContentRestricted_AllLocal,
38 eDisconnect_ContentRestricted_Single_Local,
39#ifndef __PS3__
40 eDisconnect_NoUGC_Remote,
41#endif
42
43 eDisconnect_NoFriendsInGame,
44 eDisconnect_Banned,
45 eDisconnect_NotFriendsWithHost,
46 eDisconnect_NATMismatch,
47#ifdef __ORBIS__
48 eDisconnect_NetworkError,
49#endif
50#ifdef _XBOX_ONE
51 eDisconnect_ExitedGame,
52#endif
53 };
54
55 // 4J Stu - The reason was a string, but we need to send a non-locale specific reason
56 eDisconnectReason reason;
57
58 DisconnectPacket();
59 DisconnectPacket(eDisconnectReason reason);
60
61 virtual void read(DataInputStream *dis);
62 virtual void write(DataOutputStream *dos);
63 virtual void handle(PacketListener *listener);
64 virtual int getEstimatedSize();
65 virtual bool canBeInvalidated();
66 virtual bool isInvalidatedBy(shared_ptr<Packet> packet);
67
68public:
69 static shared_ptr<Packet> create() { return shared_ptr<Packet>(new DisconnectPacket()); }
70 virtual int getId() { return 255; }
71};
72
73