summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.h
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-02-05 22:45:45 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-02-05 22:50:18 +0100
commitca6ef58b1ee8521e4b940ee4883dee714960e413 (patch)
tree8532add455224b07c07a759e3d906f50c0695888 /src/Protocol/Protocol17x.h
parentMerge pull request #2972 from marvinkopf/PlayerAutoComplete (diff)
downloadcuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.gz
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.bz2
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.lz
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.xz
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.zst
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol17x.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/Protocol/Protocol17x.h b/src/Protocol/Protocol17x.h
index 747ffe186..24d8f8898 100644
--- a/src/Protocol/Protocol17x.h
+++ b/src/Protocol/Protocol17x.h
@@ -52,11 +52,11 @@ class cProtocol172 :
public cProtocol
{
typedef cProtocol super;
-
+
public:
cProtocol172(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State);
-
+
/** Called when client sends some data: */
virtual void DataReceived(const char * a_Data, size_t a_Size) override;
@@ -147,30 +147,30 @@ public:
protected:
AString m_ServerAddress;
-
+
UInt16 m_ServerPort;
-
+
AString m_AuthServerID;
-
+
/** State of the protocol. 1 = status, 2 = login, 3 = game */
UInt32 m_State;
/** Buffer for the received data */
cByteBuffer m_ReceivedData;
-
+
bool m_IsEncrypted;
-
+
cAesCfb128Decryptor m_Decryptor;
cAesCfb128Encryptor m_Encryptor;
/** The logfile where the comm is logged, when g_ShouldLogComm is true */
cFile m_CommLogFile;
-
+
/** The dimension that was last sent to a player in a Respawn or Login packet.
Used to avoid Respawning into the same dimension, which confuses the client. */
eDimension m_LastSentDimension;
-
-
+
+
/** Adds the received (unencrypted) data to m_ReceivedData, parses complete packets */
void AddReceivedData(const char * a_Data, size_t a_Size);
@@ -186,7 +186,7 @@ protected:
// Packet handlers while in the Login state (m_State == 2):
void HandlePacketLoginEncryptionResponse(cByteBuffer & a_ByteBuffer);
void HandlePacketLoginStart(cByteBuffer & a_ByteBuffer);
-
+
// Packet handlers while in the Game state (m_State == 3):
void HandlePacketAnimation (cByteBuffer & a_ByteBuffer);
void HandlePacketBlockDig (cByteBuffer & a_ByteBuffer);
@@ -211,11 +211,11 @@ protected:
void HandlePacketEnchantItem (cByteBuffer & a_ByteBuffer);
void HandlePacketWindowClick (cByteBuffer & a_ByteBuffer);
void HandlePacketWindowClose (cByteBuffer & a_ByteBuffer);
-
+
/** Parses Vanilla plugin messages into specific ClientHandle calls.
The message payload is still in the bytebuffer, to be read by this function. */
void HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, const AString & a_Channel, UInt16 a_PayloadLength);
-
+
/** Sends the data to the client, encrypting them if needed. */
virtual void SendData(const char * a_Data, size_t a_Size) override;
@@ -223,13 +223,13 @@ protected:
virtual void SendPacket(cPacketizer & a_Packet) override;
void SendCompass(const cWorld & a_World);
-
+
/** Reads an item out of the received data, sets a_Item to the values read. Returns false if not enough received data */
virtual bool ReadItem(cByteBuffer & a_ByteBuffer, cItem & a_Item);
-
+
/** Parses item metadata as read by ReadItem(), into the item enchantments. */
void ParseItemMetadata(cItem & a_Item, const AString & a_Metadata);
-
+
void StartEncryption(const Byte * a_Key);
/** Converts the BlockFace received by the protocol into eBlockFace constants.
@@ -261,10 +261,10 @@ class cProtocol176 :
public cProtocol172
{
typedef cProtocol172 super;
-
+
public:
cProtocol176(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State);
-
+
// cProtocol172 overrides:
virtual void SendPlayerSpawn(const cPlayer & a_Player) override;
virtual void HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer) override;