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); } }
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); } }
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); } }
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; } }