Commit 42e806c5 authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

attach bug fix

parent eff0c0cc
......@@ -774,14 +774,19 @@ void Player::eventAttachCard(Event_AttachCard *event)
if (!startCard)
return;
CardItem *oldParent = startCard->getAttachedTo();
if (targetZone)
startCard->setParentItem(targetZone);
else
startCard->setParentItem(startZone);
startCard->setAttachedTo(targetCard);
startZone->reorganizeCards();
if ((startZone != targetZone) && targetZone)
targetZone->reorganizeCards();
if (oldParent)
oldParent->getZone()->reorganizeCards();
if (targetCard)
emit logAttachCard(this, startCard->getName(), targetPlayer, targetCard->getName());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment