Exemple #1
0
 public void _setAccountName(string nAccountName)
 {
     mAccountId   = _accountId(nAccountName);
     mClusterID   = HashString._runClusterID(nAccountName);
     mServerID    = HashString._runServerID(nAccountName);
     mDatabaseId  = HashString._runDatabaseId(nAccountName);
     mTableId     = HashString._runTableId(nAccountName);
     mAccountName = nAccountName;
 }
Exemple #2
0
        public ErrorCode_ _createAccount(string nAccountName, string nNickname, string nPassward)
        {
            uint          hashName_      = HashString._runServerID(nAccountName);
            AccountConfig accountConfig_ = __singleton <AccountConfig> ._instance();

            uint       accountMgrCount_ = accountConfig_._getAccountMgrCount();
            uint       accountMgrIndex_ = hashName_ % accountMgrCount_;
            AccountMgr accountMgr_      = mAccountMgrs[accountMgrIndex_];

            return(accountMgr_._createAccount(nAccountName, nNickname, nPassward));
        }
Exemple #3
0
        public Account _getAccount(string nAccountName, uint nDeviceId, uint nDeviceType)
        {
            uint          hashName_      = HashString._runServerID(nAccountName);
            AccountConfig accountConfig_ = __singleton <AccountConfig> ._instance();

            uint       accountMgrCount_ = accountConfig_._getAccountMgrCount();
            uint       accountMgrIndex_ = hashName_ % accountMgrCount_;
            AccountMgr accountMgr_      = mAccountMgrs[accountMgrIndex_];

            return(accountMgr_._getAccount(nAccountName, nDeviceId, nDeviceType));
        }
Exemple #4
0
        public __tuple <ErrorCode_, Account> _loginAccount(string nAccountName, string nPassward, uint nDeviceType)
        {
            uint          hashName_      = HashString._runServerID(nAccountName);
            AccountConfig accountConfig_ = __singleton <AccountConfig> ._instance();

            uint       accountMgrCount_ = accountConfig_._getAccountMgrCount();
            uint       accountMgrIndex_ = hashName_ % accountMgrCount_;
            AccountMgr accountMgr_      = mAccountMgrs[accountMgrIndex_];

            return(accountMgr_._loginAccount(nAccountName, nPassward, nDeviceType));
        }