コード例 #1
0
        public async Task <EResult> EasyIdling()
        {
            var res = await _loginHandler.Login(SteamServerList.GetServerRecord());

            if (res == EResult.OK)
            {
                _steamAccount.LastRun = DateTime.UtcNow;
                _steamAccount.IdleNow = true;
                _steamAccount.Save();

                var appId = _steamAccount.AppIds;

                if (appId.Any())
                {
                    PlayGames(appId);
                    await CheckTimeItemsList(_steamAccount.DropConfig);

                    Thread.Sleep(1000 * 60 * 30);
                    PlayGames(appId);
                    Thread.Sleep(1000 * 60 * 30);
                    await CheckTimeItemsList(_steamAccount.DropConfig);

                    StopGame();
                }

                _steamAccount.IdleNow = false;
                _steamAccount.Save();
            }

            return(res);
        }
コード例 #2
0
        private void CreateAccountPlayerAndConfig(IAccount account)
        {
            AccountConfig newAccountConfig = new AccountConfig(account);

            IEnumerable <IUIModule> uiModules = TemplateCache.GetAll <IUIModule>().Where(uim => uim.SystemDefault > 0);

            foreach (IUIModule module in uiModules)
            {
                newAccountConfig.UIModules = uiModules.Select(uim => new Tuple <IUIModule, int>(uim, uim.SystemDefault));
            }

            //Save the new config
            newAccountConfig.Save(account, StaffRank.Player);
        }
コード例 #3
0
 private void OnKeyCallback(SteamUser.LoginKeyCallback obj)
 {
     _steamAccount.LoginKey = obj.LoginKey;
     _steamAccount.Save();
 }