mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
Merge branch 'master' of git://cockatrice.git.sourceforge.net/gitroot/cockatrice/cockatrice
This commit is contained in:
commit
7200b5be0e
23 changed files with 141 additions and 108 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue