Skip to content

Commit

Permalink
remove stats from default deck is gamemode is not supposed to be saved (
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Zeier committed Dec 3, 2015
1 parent d0a8f2a commit 27855bb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Hearthstone Deck Tracker/GameEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,13 @@ private void SaveAndUpdateStats()
//game was not supposed to be recorded, remove from deck again.
_assignedDeck.DeckStats.Games.Remove(_game.CurrentGameStats);
statsControl.Refresh();
Logger.WriteLine(string.Format("Gamemode {0} is not supposed to be saved. Removed game from {1}.", _game.CurrentGameMode, _assignedDeck), "GameEventHandler");
}
else if(_assignedDeck == null && DefaultDeckStats.Instance.GetDeckStats(_game.Player.Class).Games.Contains(_game.CurrentGameStats))
{
DefaultDeckStats.Instance.GetDeckStats(_game.Player.Class).Games.Remove(_game.CurrentGameStats);
statsControl.Refresh();
Logger.WriteLine(string.Format("Gamemode {0} is not supposed to be saved. Removed game from default {1}.", _game.CurrentGameMode, _game.Player.Class), "GameEventHandler");
}
}

Expand Down

0 comments on commit 27855bb

Please sign in to comment.