ERwan
- bug fix for zone changes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user