Merge branch 'master' of git://cockatrice.git.sourceforge.net/gitroot/cockatrice/cockatrice

This commit is contained in:
Max-Wilhelm Bruker 2011-01-26 14:34:34 +01:00
commit 7200b5be0e
23 changed files with 141 additions and 108 deletions

View file

@ -888,6 +888,11 @@ void Player::eventDestroyCard(Event_DestroyCard *event)
if (!card)
return;
QList<CardItem *> attachedCards = card->getAttachedCards();
// This list is always empty except for buggy server implementations.
for (int i = 0; i < attachedCards.size(); ++i)
attachedCards[i]->setAttachedTo(0);
emit logDestroyCard(this, card->getName());
zone->takeCard(-1, event->getCardId(), true);
card->deleteLater();