- Fix a bug when a token would be removed from game while being an attacker or a blocker. Potentially fix issue 42
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-10-16 14:41:27 +00:00
parent cdd8c4579e
commit 8c50e71b33
4 changed files with 73 additions and 2 deletions

View File

@@ -373,7 +373,7 @@ int GuiCombat::receiveEventMinus(WEvent* e)
if (go->players[0]->game->inPlay == event->from || go->players[1]->game->inPlay == event->from)
{
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
if ((*it)->card == event->card->previous)
if ((*it)->card == event->card->previous || (*it)->card == event->card )
{
AttackerDamaged* d = *it;
if (activeAtk == *it) activeAtk = NULL;
@@ -383,7 +383,7 @@ int GuiCombat::receiveEventMinus(WEvent* e)
}
else
for (vector<DefenserDamaged*>::iterator q = (*it)->blockers.begin(); q != (*it)->blockers.end(); ++q)
if ((*q)->card == event->card->previous)
if ((*q)->card == event->card->previous || (*q)->card == event->card)
{
DefenserDamaged* d = *q;
(*it)->blockers.erase(q);