From 4d28bdd925b709f90c3c84654133c199d4e149d7 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Tue, 8 Feb 2011 19:20:04 +0000 Subject: [PATCH] fixed a bug where mana icons were not being removed from mana pool when using extracost types...this happened during the refactor..the mana was changed from engaging the players mana pool which sends those events, into a sort of "bypass everything and just subtract the mana from the pool" you actually WANT to engage the players mana pool, as its directly tied to the events which remove those mana from the pool. --- projects/mtg/src/MTGRules.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index 287c9accd..ed635c006 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -347,9 +347,8 @@ int MTGAlternativeCostRule::reactToClick(MTGCardInstance * card, ManaCost *alter } } //------------------------------------------------------------------------ - ManaCost * previousManaPool = NEW ManaCost(playerMana); - int payResult = playerMana->pay(alternateCost); - alternateCost->doPayExtra(); + ManaCost * previousManaPool = NEW ManaCost(player->getManaPool()); + int payResult = player->getManaPool()->pay(alternateCost); payResult = alternateCostType; //if alternate cost has a extra payment thats set, this code pays it. // the if statement is 100% needed as it would cause a crash on cards that dont have the BuyBack cost.