From 665f533ac840fd4c0dc2155004e40841c6067aad Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Fri, 8 Jul 2011 17:43:19 +0000 Subject: [PATCH] fixed a bug where altercost would cause extracost payments like PMana to lose their source, because the source for the cost is set after the card is placed in hand, and altercost resets the cost of cards to the new cost. --- projects/mtg/src/GameObserver.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index e5a690ccf..aaccb2665 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -689,6 +689,13 @@ void GameObserver::Affinity() if(card->getReducedManaCost()->getConvertedCost()) original->remove(card->getReducedManaCost()); card->getManaCost()->copy(original); + if(card->getManaCost()->extraCosts) + { + for(unsigned int i = 0; i < card->getManaCost()->extraCosts->costs.size();i++) + { + card->getManaCost()->extraCosts->costs[i]->setSource(card); + } + } } if(card->has(Constants::AFFINITYARTIFACTS)|| card->has(Constants::AFFINITYFOREST)||