mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-23 23:23:55 -07:00
fix cards attaching/transforming to the wrong card across players (#6909)
* fix cards attaching/transforming to the wrong card across players * move comment
This commit is contained in:
parent
40cef0e436
commit
40b947c1e7
1 changed files with 8 additions and 1 deletions
|
|
@ -1069,7 +1069,14 @@ bool PlayerActions::createRelatedFromRelation(const CardItem *sourceCard, const
|
||||||
createCard(sourceCard, dbName, CardRelationType::DoesNotAttach, persistent);
|
createCard(sourceCard, dbName, CardRelationType::DoesNotAttach, persistent);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
auto attachType = cardRelation->getAttachType();
|
CardRelationType attachType;
|
||||||
|
// do not attempt to attach to another player's cards, this causes the card to attempt to attach to the same
|
||||||
|
// cardid on the local player's field instead, which is an entirely different card!
|
||||||
|
if (player->getPlayerInfo()->getLocalOrJudge()) {
|
||||||
|
attachType = cardRelation->getAttachType();
|
||||||
|
} else {
|
||||||
|
attachType = CardRelationType::DoesNotAttach;
|
||||||
|
}
|
||||||
|
|
||||||
// move card onto table first if attaching from some other zone
|
// move card onto table first if attaching from some other zone
|
||||||
// we only do this for AttachTo because cross-zone TransformInto is already handled server-side
|
// we only do this for AttachTo because cross-zone TransformInto is already handled server-side
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue