mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
fixed direct chat, fixed in-game attachment bugs
This commit is contained in:
parent
c39539b73a
commit
92e842bb74
18 changed files with 127 additions and 96 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue