GameFramework.UserProcessScheduler.OnAccountLogout C# (CSharp) Method

OnAccountLogout() private method

private OnAccountLogout ( string accountId ) : void
accountId string
return void
        internal void OnAccountLogout(string accountId)
        {
            AccountInfo accountInfo = m_AccountSystem.FindAccountById(accountId);
            if (accountInfo != null) {
                //检查当前账号是否有角色在线
                bool isAccountKickable = true;
                UserInfo ui = GetUserInfo(accountInfo.UserGuid);
                if (ui != null) {
                    isAccountKickable = false;
                }
                if (isAccountKickable) {
                    //踢掉账号
                    accountInfo.CurrentState = AccountState.Offline;
                    m_AccountSystem.RemoveAccountById(accountInfo.AccountId);
                    LogSys.Log(LOG_TYPE.INFO, ConsoleColor.Green, "LogoutStep: Account LOGOUT directly. AccountId:{0}",
                      accountInfo.AccountId);
                } else {
                    //AccountInfo设置为离线状态
                    accountInfo.CurrentState = AccountState.Dropped;
                    LogSys.Log(LOG_TYPE.INFO, ConsoleColor.Green, "LogoutStep: Account dropped. AccountId:{0}",
                      accountInfo.AccountId);
                }
                m_NicknameSystem.RevertAccountNicknames(accountId);
            }
        }