Exemple #1
0
 /// <summary>
 /// create a new instance of the <see cref="UID"/>,
 /// with the server value.
 /// </summary>
 /// <param name="_server_value"></param>
 /// <param name="_socket_"></param>
 private UID(IStringProvider <StrongString> _value_, bool logInMode = false)
 {
     if (logInMode)
     {
         SetParams(_value_.GetStrong());
         _uid_server_index_ = _value.Substring(START_INDEX, LENGTH_INDEX).ToInt32() -
                              BASE_UID_SERVER_INDEX_SHOW;
         IsLoaded = true;
     }
     else
     {
         _uid_server_index_ = _value_.Substring(START_INDEX, LENGTH_INDEX).ToInt32() -
                              BASE_UID_SERVER_INDEX_SHOW;
         _value   = _value_.GetStrong();
         IsLoaded = false;
     }
 }
Exemple #2
0
 //-------------------------------------------------
 #region Constructor's Region
 /// <summary>
 /// create a new instance of the UID,
 /// which is for creating mode.
 /// in fact, you can create a new UID with this constructor.
 /// </summary>
 /// <param name="_index_"></param>
 /// <param name="_value_"></param>
 /// <param name="_socket_"></param>
 /// <param name="_username_"></param>
 private UID(int _index_, ulong _value_, IPlayerSocket _socket_, IStringProvider <StrongString> _username_)
 {
     _uid_server_index_ = _index_;
     _value             = _value_.ToString();
     TheSocket          = _socket_;
     PlayerUserName     = _username_.GetStrong();
     IsLoaded           = true;
 }