diff --git a/projects/mtg/src/MTGGameZones.cpp b/projects/mtg/src/MTGGameZones.cpp index fc8411461..49eb28e65 100644 --- a/projects/mtg/src/MTGGameZones.cpp +++ b/projects/mtg/src/MTGGameZones.cpp @@ -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; } diff --git a/projects/mtg/src/MTGGuiPlay.cpp b/projects/mtg/src/MTGGuiPlay.cpp index c5de76244..ee8967075 100644 --- a/projects/mtg/src/MTGGuiPlay.cpp +++ b/projects/mtg/src/MTGGuiPlay.cpp @@ -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;