void _loginAccount(AccountLoginB nAccountLoginB, uint nDeviceType, AccountLoginC nAccountLoginC) { Account account_ = this._loginAccount(nAccountLoginB, nDeviceType); nAccountLoginC.m_tAccountId = (int)nAccountLoginB._getAccountId(); nAccountLoginC.m_tNickName = nAccountLoginB._getNick(); nAccountLoginC.m_tTicks = nAccountLoginB._getTicks(); DeviceStatus deviceStatus_ = account_._getDeviceStatus(nDeviceType); nAccountLoginC.m_tDeviceId = deviceStatus_._getId(); nAccountLoginC.m_tDeviceType = (int)deviceStatus_._getType(); }
void _loginAccountLoginB(string nAccountName, string nPassward, uint nDeviceType, AccountLoginC nAccountLoginC) { SqlCommand sqlCommand_ = new SqlCommand(); AccountLoginB accountLoginB_ = new AccountLoginB(nAccountName, mId); sqlCommand_._addHeadstream(accountLoginB_); SqlService sqlService_ = __singleton <SqlService> ._instance(); if (!sqlService_._runSqlCommand(sqlCommand_, accountLoginB_)) { nAccountLoginC.m_tErrorCode = AccountError_.mSql_; } if (AccountError_.mSucess_ == nAccountLoginC.m_tErrorCode) { nAccountLoginC.m_tErrorCode = accountLoginB_._checkPassward(nPassward); } if (AccountError_.mSucess_ == nAccountLoginC.m_tErrorCode) { this._loginAccount(accountLoginB_, nDeviceType, nAccountLoginC); } }
Account _loginAccount(AccountLoginB nAccountLoginB, uint nDeviceType) { Account result_ = null; uint accountId = nAccountLoginB._getAccountId(); if (mAccounts.ContainsKey(accountId)) { result_ = mAccounts[accountId]; } if (null == result_) { result_ = nAccountLoginB._createAccount(); result_._addDeviceType(nDeviceType); result_._setAccountMgr(this); AccountCreator accountCreator_ = __singleton <AccountCreator> ._instance(); accountCreator_._runCreate(result_); result_.m_tRunLogin(); mAccounts[accountId] = result_; } return(result_); }