예제 #1
0
        public void Reset(bool resetStats = true)
        {
            Log.Info("-------- Reset ---------");

            ReplayMaker.Reset();
            Player.Reset();
            Opponent.Reset();
            Entities.Clear();
            SavedReplay         = false;
            OpponentSecretCount = 0;
            OpponentSecrets.ClearSecrets();
            _spectator       = null;
            _currentGameMode = GameMode.None;
            _currentFormat   = null;
            if (!IsInMenu && resetStats)
            {
                CurrentGameStats = new GameStats(GameResult.None, "", "")
                {
                    PlayerName = "", OpponentName = "", Region = CurrentRegion
                }
            }
            ;
            PowerLog.Clear();

            if (Core.Game != null && Core.Overlay != null)
            {
                Core.UpdatePlayerCards(true);
                Core.UpdateOpponentCards(true);
            }
        }
예제 #2
0
        public void Reset(bool resetStats = true)
        {
            Log.Info("-------- Reset ---------");

            ReplayMaker.Reset();
            Player.Reset();
            Opponent.Reset();

            Entities.Clear();
            SavedReplay         = false;
            OpponentSecretCount = 0;
            OpponentSecrets.ClearSecrets();

            if (!IsInMenu && resetStats)
            {
                if (CurrentGameMode == GameMode.Ranked)
                {
                    Log.Info("Resetting gamemode to casual");
                    CurrentGameMode = GameMode.Casual;
                }
                CurrentGameStats = new GameStats(GameResult.None, "", "")
                {
                    PlayerName = "", OpponentName = "", Region = CurrentRegion
                };
                _gameModeDetectionComplete = false;
            }
            PowerLog.Clear();

            if (Core.Game != null && Core.Overlay != null)
            {
                Core.UpdatePlayerCards(true);
                Core.UpdateOpponentCards(true);
            }
        }
예제 #3
0
        public void Reset(bool resetStats = true)
        {
            Log.Info("-------- Reset ---------");

            Player.Reset();
            Opponent.Reset();
            if (!_matchInfoCacheInvalid && MatchInfo?.LocalPlayer != null && MatchInfo.OpposingPlayer != null)
            {
                UpdatePlayers();
            }
            ProposedAttacker = 0;
            ProposedDefender = 0;
            Entities.Clear();
            SavedReplay = false;
            SecretsManager.Reset();
            _spectator       = null;
            _currentGameMode = GameMode.None;
            _currentGameType = GameType.GT_UNKNOWN;
            _currentFormat   = FormatType.FT_UNKNOWN;
            if (!IsInMenu && resetStats)
            {
                CurrentGameStats = new GameStats(GameResult.None, "", "")
                {
                    PlayerName = "", OpponentName = "", Region = CurrentRegion
                }
            }
            ;
            PowerLog.Clear();

            if (Core.Game != null && Core.Overlay != null)
            {
                Core.UpdatePlayerCards(true);
                Core.UpdateOpponentCards(true);
            }
        }
예제 #4
0
        public void Reset(bool resetStats = true)
        {
            Logger.WriteLine("-------- Reset ---------", "Game");

            ReplayMaker.Reset();
            Player.Reset();
            Opponent.Reset();

            Entities.Clear();
            SavedReplay         = false;
            OpponentSecretCount = 0;
            OpponentSecrets.ClearSecrets();
            NoMatchingDeck = false;

            if (!IsInMenu && resetStats)
            {
                if (CurrentGameMode == GameMode.Ranked)
                {
                    Logger.WriteLine("Resetting gamemode to casual", "Game");
                    CurrentGameMode = GameMode.Casual;
                }
                CurrentGameStats = new GameStats(GameResult.None, "", "")
                {
                    PlayerName = "", OpponentName = "", Region = CurrentRegion
                };
                _gameModeDetectionComplete = false;
            }
            HSLogLines.Clear();
            PowerLog.Clear();

            if (Core.Game != null && Core.Overlay != null)
            {
                Helper.UpdatePlayerCards();
                Helper.UpdateOpponentCards();
                Core.MainWindow.NeedToIncorrectDeckMessage = false;
            }
        }