- Fixed some segfaults in Test suite
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-08-23 10:22:54 +00:00
parent de8404df97
commit 846f3b2ffc
8 changed files with 29 additions and 19 deletions

View File

@@ -1890,7 +1890,7 @@ int ActivatedAbility::reactToClick(MTGCardInstance * card){
game->currentlyActing()->getManaPool()->pay(cost);
cost->doPayExtra();
}
if (needsTapping) source->tap();
if (needsTapping && source->isInPlay()) source->tap();
fireAbility();
return 1;
@@ -1899,7 +1899,6 @@ int ActivatedAbility::reactToClick(MTGCardInstance * card){
int ActivatedAbility::reactToTargetClick(Targetable * object){
if (!isReactingToTargetClick(object)) return 0;
if (needsTapping) source->tap();
if (cost){
if (object->typeAsTarget() == TARGET_CARD) cost->setExtraCostsAction(this, (MTGCardInstance *) object);
OutputDebugString("React To click 2\n");
@@ -1911,6 +1910,7 @@ int ActivatedAbility::reactToTargetClick(Targetable * object){
game->currentlyActing()->getManaPool()->pay(cost);
cost->doPayExtra();
}
if (needsTapping && source->isInPlay()) source->tap();
fireAbility();
return 1;
@@ -2407,8 +2407,8 @@ void AManaProducer::Render(){
{
for (int cost = output->getCost(i); cost > 0; --cost)
{
WEventEngageMana e(i, source);
GameObserver::GetInstance()->receiveEvent(&e);
WEvent * e = NEW WEventEngageMana(i, source);
GameObserver::GetInstance()->receiveEvent(e);
}
}