diff options
author | madmaxoft <github@xoft.cz> | 2014-07-30 13:52:51 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-07-30 13:56:30 +0200 |
commit | 17a94b16ea6207fd5f38fbd309b4db0d92de0d31 (patch) | |
tree | 0109cd55e8cfa6058255d2fa82dfaa0d3c7e4bd2 /src/ClientHandle.h | |
parent | Exported cMojangAPI to Lua. (diff) | |
download | cuberite-17a94b16ea6207fd5f38fbd309b4db0d92de0d31.tar cuberite-17a94b16ea6207fd5f38fbd309b4db0d92de0d31.tar.gz cuberite-17a94b16ea6207fd5f38fbd309b4db0d92de0d31.tar.bz2 cuberite-17a94b16ea6207fd5f38fbd309b4db0d92de0d31.tar.lz cuberite-17a94b16ea6207fd5f38fbd309b4db0d92de0d31.tar.xz cuberite-17a94b16ea6207fd5f38fbd309b4db0d92de0d31.tar.zst cuberite-17a94b16ea6207fd5f38fbd309b4db0d92de0d31.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ClientHandle.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ClientHandle.h b/src/ClientHandle.h index 50ed596d5..f2183a5ca 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -66,7 +66,9 @@ public: cPlayer * GetPlayer(void) { return m_Player; } // tolua_export + /** Returns the player's UUID, as used by the protocol, in the short form (no dashes) */ const AString & GetUUID(void) const { return m_UUID; } // tolua_export + void SetUUID(const AString & a_UUID) { m_UUID = a_UUID; } const Json::Value & GetProperties(void) const { return m_Properties; } @@ -80,7 +82,7 @@ public: /** Generates an UUID based on the player name provided. This is used for the offline (non-auth) mode, when there's no UUID source. Each username generates a unique and constant UUID, so that when the player reconnects with the same name, their UUID is the same. - Returns a 36-char UUID (with dashes). */ + Returns a 32-char UUID (no dashes). */ static AString GenerateOfflineUUID(const AString & a_Username); // tolua_export /** Returns true if the UUID is generated by online auth, false if it is an offline-generated UUID. @@ -360,7 +362,11 @@ private: int m_NumBlockChangeInteractionsThisTick; static int s_ClientCount; + + /** ID used for identification during authenticating. Assigned sequentially for each new instance. */ int m_UniqueID; + + /** Contains the UUID used by Mojang to identify the player's account. Short UUID stored here (without dashes) */ AString m_UUID; /** Set to true when the chunk where the player is is sent to the client. Used for spawning the player */ |