- bug fix for zone changes
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-06-13 05:39:18 +00:00
parent 54b8aab96b
commit 35214a2f7e
2 changed files with 10 additions and 3 deletions

View File

@@ -93,12 +93,20 @@ void MTGPlayerCards::showHand(){
MTGCardInstance * MTGPlayerCards::putInPlay(MTGCardInstance * card){
MTGGameZone * from = hand;
MTGCardInstance * copy = hand->removeCard(card);
if(!copy) copy = stack->removeCard(card); //Which one is it ???
if(!copy){
copy = stack->removeCard(card); //Which one is it ???
from = stack;
}
inPlay->addCard(copy);
copy->summoningSickness = 1;
copy->changedZoneRecently = 1.f;
GameObserver *g = GameObserver::GetInstance();
WEvent * e = NEW WEventZoneChange(copy, from, inPlay);
g->receiveEvent(e);
return copy;
}

View File

@@ -200,7 +200,6 @@ void MTGGuiPlay::forceUpdateCards(){
}
int MTGGuiPlay::receiveEvent(WEvent *event){
return 0;
if (event->type == WEvent::CHANGE_ZONE){
WEventZoneChange * e = (WEventZoneChange *) event;
int ok = 0;