added engine code to do a putinzone without sending events.

equipping no longer retriggers a copier.
retarget and newtarget no long send the events due to refreshing the cards.
This commit is contained in:
omegablast2002@yahoo.com
2013-02-01 04:21:08 +00:00
parent 94955088c8
commit 0bd769d3c0
3 changed files with 10 additions and 4 deletions
+4 -3
View File
@@ -303,7 +303,7 @@ MTGCardInstance * MTGPlayerCards::putInHand(MTGCardInstance * card)
// Moves a card from one zone to another
// If the card is not actually in the expected "from" zone, does nothing and returns null
MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone * from, MTGGameZone * to)
MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone * from, MTGGameZone * to,bool sendEvent)
{
MTGCardInstance * copy = NULL;
GameObserver *g = owner->getObserver();
@@ -369,10 +369,11 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
SAFE_DELETE(previous);
}
}
if(sendEvent)
{
WEvent * e = NEW WEventZoneChange(copy, from, to);
g->receiveEvent(e);
}
return ret;
}