Skip to content

Commit

Permalink
remove redundant GameEventHandler logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Zeier committed Mar 7, 2016
1 parent 4cd90a5 commit 7e54b68
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions Hearthstone Deck Tracker/GameEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,6 @@ public void HandlePlayerGetToDeck(Entity entity, string cardId, int turn)
{
if(string.IsNullOrEmpty(cardId))
return;
LogEvent("PlayerGetToDeck", cardId);
_game.Player.CreateInDeck(entity, turn);
Helper.UpdatePlayerCards();
_game.AddPlayToCurrentGame(PlayType.PlayerGetToDeck, turn, cardId);
Expand All @@ -900,7 +899,6 @@ public void HandlePlayerGet(Entity entity, string cardId, int turn)
{
if(string.IsNullOrEmpty(cardId))
return;
LogEvent("PlayerGet", cardId);
_game.Player.CreateInHand(entity, turn);
if(cardId == "GAME_005" && _game.CurrentGameStats != null)
{
Expand All @@ -916,7 +914,6 @@ public void HandlePlayerBackToHand(Entity entity, string cardId, int turn)
{
if(string.IsNullOrEmpty(cardId))
return;
LogEvent("PlayerBackToHand", cardId);
Helper.UpdatePlayerCards();
_game.Player.BoardToHand(entity, turn);
_game.AddPlayToCurrentGame(PlayType.PlayerBackToHand, turn, cardId);
Expand Down Expand Up @@ -950,7 +947,6 @@ public void HandlePlayerMulligan(Entity entity, string cardId)
{
if(string.IsNullOrEmpty(cardId))
return;
LogEvent("PlayerMulligan", cardId);
_game.Player.Mulligan(entity);
Helper.UpdatePlayerCards();

Expand All @@ -962,7 +958,6 @@ public void HandlePlayerSecretPlayed(Entity entity, string cardId, int turn, boo
{
if(string.IsNullOrEmpty(cardId))
return;
LogEvent("PlayerSecretPlayed", cardId);
if(fromDeck)
_game.Player.SecretPlayedFromDeck(entity, turn);
else
Expand All @@ -976,7 +971,6 @@ public void HandlePlayerHandDiscard(Entity entity, string cardId, int turn)
{
if(string.IsNullOrEmpty(cardId))
return;
LogEvent("PlayerHandDiscard", cardId);
_game.Player.HandDiscard(entity, turn);
Helper.UpdatePlayerCards();
_game.AddPlayToCurrentGame(PlayType.PlayerHandDiscard, turn, cardId);
Expand All @@ -987,7 +981,6 @@ public void HandlePlayerPlay(Entity entity, string cardId, int turn)
{
if(string.IsNullOrEmpty(cardId))
return;
LogEvent("PlayerPlay", cardId);
_game.Player.Play(entity, turn);
Helper.UpdatePlayerCards();

Expand Down Expand Up @@ -1024,7 +1017,6 @@ public async void HandleSecretsOnPlay(Entity entity)

public void HandlePlayerDeckDiscard(Entity entity, string cardId, int turn)
{
LogEvent("PlayerDeckDiscard", cardId);
_game.Player.DeckDiscard(entity, turn);
if(!_game.Player.DrawnCardsMatchDeck && Config.Instance.AutoDeckDetection && !Core.MainWindow.NeedToIncorrectDeckMessage
&& !Core.MainWindow.IsShowingIncorrectDeckMessage && _game.IsUsingPremade && _game.CurrentGameMode != Spectator)
Expand All @@ -1042,7 +1034,6 @@ public void HandlePlayerPlayToDeck(Entity entity, string cardId, int turn)
{
if(string.IsNullOrEmpty(cardId))
return;
LogEvent("PlayerPlayToDeck", cardId);
_game.Player.BoardToDeck(entity, turn);

Helper.UpdatePlayerCards();
Expand All @@ -1057,7 +1048,6 @@ public void HandlePlayerPlayToDeck(Entity entity, string cardId, int turn)

public void HandleOpponentGetToDeck(Entity entity, int turn)
{
LogEvent("OpponentGetToDeck", turn: turn);
_game.Opponent.CreateInDeck(entity, turn);
_game.AddPlayToCurrentGame(PlayType.OpponentGetToDeck, turn, string.Empty);
Helper.UpdateOpponentCards();
Expand Down Expand Up @@ -1132,7 +1122,6 @@ public void HandleOpponentRemoveFromDeck(Entity entity, int turn)

public void HandlePlayerStolen(Entity entity, string cardId, int turn)
{
LogEvent("PlayerStolen");
_game.Player.StolenByOpponent(entity, turn);
_game.Opponent.StolenFromOpponent(entity, turn);
if(entity.IsSecret)
Expand Down Expand Up @@ -1161,7 +1150,6 @@ public void HandlePlayerStolen(Entity entity, string cardId, int turn)

public void HandleOpponentStolen(Entity entity, string cardId, int turn)
{
LogEvent("OpponentStolen");
_game.Opponent.StolenByOpponent(entity, turn);
_game.Player.StolenFromOpponent(entity, turn);
if(entity.IsSecret)
Expand Down Expand Up @@ -1230,7 +1218,6 @@ public void SetRank(int rank)

public void HandleOpponentPlay(Entity entity, string cardId, int from, int turn)
{
LogEvent("OpponentPlay", cardId, turn, from);
_game.Opponent.Play(entity, turn);
Helper.UpdateOpponentCards();
_game.AddPlayToCurrentGame(PlayType.OpponentPlay, turn, cardId);
Expand All @@ -1247,7 +1234,6 @@ public void HandleOpponentJoust(Entity entity, string cardId, int turn)

public void HandleOpponentHandDiscard(Entity entity, string cardId, int from, int turn)
{
LogEvent("OpponentHandDiscard", cardId, turn, from);
try
{
_game.Opponent.Play(entity, turn);
Expand All @@ -1263,23 +1249,20 @@ public void HandleOpponentHandDiscard(Entity entity, string cardId, int from, in

public void HandlOpponentDraw(Entity entity, int turn)
{
LogEvent("OpponentDraw", turn: turn);
_game.Opponent.Draw(entity, turn);
_game.AddPlayToCurrentGame(PlayType.OpponentDraw, turn, string.Empty);
GameEvents.OnOpponentDraw.Execute();
}

public void HandleOpponentMulligan(Entity entity, int from)
{
LogEvent("OpponentMulligan", from: from);
_game.Opponent.Mulligan(entity);
_game.AddPlayToCurrentGame(PlayType.OpponentMulligan, 0, string.Empty);
GameEvents.OnOpponentMulligan.Execute();
}

public void HandleOpponentGet(Entity entity, int turn, int id)
{
LogEvent("OpponentGet", turn: turn);
_game.Opponent.CreateInHand(entity, turn);
_game.AddPlayToCurrentGame(PlayType.OpponentGet, turn, string.Empty);
Helper.UpdateOpponentCards();
Expand All @@ -1288,7 +1271,6 @@ public void HandleOpponentGet(Entity entity, int turn, int id)

public void HandleOpponentSecretPlayed(Entity entity, string cardId, int from, int turn, bool fromDeck, int otherId)
{
LogEvent("OpponentSecretPlayed");
_game.OpponentSecretCount++;
if(fromDeck)
_game.Opponent.SecretPlayedFromDeck(entity, turn);
Expand Down Expand Up @@ -1316,7 +1298,6 @@ public void HandleOpponentSecretPlayed(Entity entity, string cardId, int from, i

public void HandleOpponentPlayToHand(Entity entity, string cardId, int turn, int id)
{
LogEvent("OpponentBackToHand", cardId, turn);
_game.Opponent.BoardToHand(entity, turn);
Helper.UpdateOpponentCards();
_game.AddPlayToCurrentGame(PlayType.OpponentBackToHand, turn, cardId);
Expand All @@ -1326,7 +1307,6 @@ public void HandleOpponentPlayToHand(Entity entity, string cardId, int turn, int

public void HandleOpponentPlayToDeck(Entity entity, string cardId, int turn)
{
LogEvent("OpponentPlayToDeck", cardId, turn);
_game.Opponent.BoardToDeck(entity, turn);
_game.AddPlayToCurrentGame(PlayType.OpponentPlayToDeck, turn, cardId);
Helper.UpdateOpponentCards();
Expand All @@ -1335,7 +1315,6 @@ public void HandleOpponentPlayToDeck(Entity entity, string cardId, int turn)

public void HandleOpponentSecretTrigger(Entity entity, string cardId, int turn, int otherId)
{
LogEvent("OpponentSecretTrigger", cardId);
_game.Opponent.SecretTriggered(entity, turn);
_game.OpponentSecretCount--;
_game.OpponentSecrets.SecretRemoved(otherId, cardId);
Expand All @@ -1355,7 +1334,6 @@ public void HandleOpponentSecretTrigger(Entity entity, string cardId, int turn,

public void HandleOpponentDeckDiscard(Entity entity, string cardId, int turn)
{
LogEvent("OpponentDeckDiscard", cardId);
_game.Opponent.DeckDiscard(entity, turn);

//there seems to be an issue with the overlay not updating here.
Expand Down

0 comments on commit 7e54b68

Please sign in to comment.