예제 #1
0
        internal static async void GameStart()
        {
            if (!Core.Game.Spectator)
            {
                //_console.SetConsoleText("Game with the ID " + Core.Game.CurrentGameStats.GameId + " started.");
                if (String.IsNullOrEmpty(_config.player))
                {
                    _config.player = Core.Game.Player.Name;
                }

                IsMissingTribeRetrieved = false;
                _tribeImgSize           = _config.tribeSize;


                int waitTime = 6000;

                while (!IsMissingTribeRetrieved && waitTime > 0)
                {
                    Thread.Sleep(3000);
                    waitTime -= 3000;
                    IsMissingTribeRetrieved = SetMissingRace();
                }



                //var avaiableHeroes = await SetPersonalHeroRating();

                //_console.SetConsoleText("Getting Game Informations");



                try {
                    _peak = GameRecord.GetPeak(_recordList, Core.Game.CurrentRegion);
                    //GameRecord.GetHeroWinRating(_recordList, avaiableHeroes, _avaiableTribes, _console);
                }
                catch { }

                _view.SetPeak(_peak);

                if (_rating > 0)
                {
                    _view.SetMMR(_rating);
                }
                else
                {
                    _view.SetMMR(_ratingStart);
                }
            }
        }