mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
crash fix; weird behaviour fix
This commit is contained in:
parent
6253d92053
commit
1b286973dd
3 changed files with 10 additions and 3 deletions
|
|
@ -518,6 +518,9 @@ ResponseCode Server_ProtocolHandler::moveCard(Server_Game *game, Server_Player *
|
|||
return RespNameNotFound;
|
||||
|
||||
if (startzone != targetzone) {
|
||||
if (card->getParentCard())
|
||||
card->setParentCard(0);
|
||||
|
||||
const QList<Server_Card *> &attachedCards = card->getAttachedCards();
|
||||
for (int i = 0; i < attachedCards.size(); ++i)
|
||||
unattachCard(game, attachedCards[i]->getZone()->getPlayer(), cont, attachedCards[i]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue