the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 32 lines 945 B view raw
1#pragma once 2using namespace std; 3#include "Packet.h" 4 5class ServerPlayer; 6 7class PlayerInfoPacket : public Packet, public enable_shared_from_this<PlayerInfoPacket> 8{ 9 public: 10 // 4J Stu - I have re-purposed this packet for our uses 11 //wstring name; 12 //bool add; 13 //int latency; 14 short m_networkSmallId; 15 short m_playerColourIndex; 16 unsigned int m_playerPrivileges; 17 int m_entityId; 18 19 PlayerInfoPacket(); 20 //PlayerInfoPacket(const wstring &name, bool add, int latency); 21 PlayerInfoPacket(BYTE networkSmallId, short playerColourIndex, unsigned int playerPrivileges = 0); 22 PlayerInfoPacket(shared_ptr<ServerPlayer> player); 23 24 virtual void read(DataInputStream *dis); 25 virtual void write(DataOutputStream *dos); 26 virtual void handle(PacketListener *listener); 27 virtual int getEstimatedSize(); 28 29public: 30 static shared_ptr<Packet> create() { return shared_ptr<Packet>(new PlayerInfoPacket()); } 31 virtual int getId() { return 201; } 32};