fixed direct chat, fixed in-game attachment bugs

This commit is contained in:
Max-Wilhelm Bruker 2011-01-25 00:12:35 +01:00
parent c39539b73a
commit 92e842bb74
18 changed files with 127 additions and 96 deletions

View file

@ -886,6 +886,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();