mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
changed card hover handling
This commit is contained in:
parent
5b7dd037c1
commit
92d40515f2
12 changed files with 66 additions and 18 deletions
|
|
@ -791,6 +791,11 @@ ResponseCode Server_ProtocolHandler::cmdAttachCard(Command_AttachCard *cmd, Comm
|
|||
}
|
||||
|
||||
if (targetCard) {
|
||||
// Unattach all cards attached to the card being attached.
|
||||
const QList<Server_Card *> &attachedList = card->getAttachedCards();
|
||||
for (int i = 0; i < attachedList.size(); ++i)
|
||||
unattachCard(game, player, cont, attachedList[i]);
|
||||
|
||||
card->setParentCard(targetCard);
|
||||
card->setCoords(-1, card->getY());
|
||||
cont->enqueueGameEventPrivate(new Event_AttachCard(player->getPlayerId(), startzone->getName(), card->getId(), targetPlayer->getPlayerId(), targetzone->getName(), targetCard->getId()), game->getGameId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue