- fix bug eventBlocker
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-08-23 10:48:06 +00:00
parent 846f3b2ffc
commit a2149131fb
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -521,13 +521,16 @@ int MTGCardInstance::setDefenser(MTGCardInstance * opponent){
defenser->blockers.remove(this);
}
}
WEvent * e = NEW WEventCreatureBlocker(this, defenser, opponent);
WEvent * e = NULL;
if (defenser != opponent){
e = NEW WEventCreatureBlocker(this, defenser, opponent);
}
defenser = opponent;
if (defenser){
defenser->blockers.push_back(this);
}
g->blockersSorted = false;
g->receiveEvent(e);
if (e) g->receiveEvent(e);
//delete e;
return 1;
}