mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-02 03:23:56 -07:00
[Client] Support face-down cards in all public zones (#6602)
* [Server] Support face-down cards in all public zones * add null check * Check using zone names instead * add comment * Rename properties and only pass forceFaceDown * [Game] Refactor CardDragItem faceDown logic * revert refactor * leave face_down unset unless forced * [Client] Support face-down cards in all public zones * leave face_down unset unless forced * log face down * update remaining logs
This commit is contained in:
parent
2fba5dcd20
commit
846ecb7e8d
6 changed files with 55 additions and 15 deletions
|
|
@ -43,8 +43,10 @@ void CardZoneLogic::addCard(CardItem *card, const bool reorganize, const int x,
|
|||
|
||||
for (auto *view : views) {
|
||||
if (qobject_cast<ZoneViewZoneLogic *>(view->getLogic())->prepareAddCard(x)) {
|
||||
view->getLogic()->addCard(new CardItem(player, nullptr, card->getCardRef(), card->getId()), reorganize, x,
|
||||
y);
|
||||
auto copy = new CardItem(player, nullptr, card->getCardRef(), card->getId());
|
||||
copy->setFaceDown(card->getFaceDown());
|
||||
|
||||
view->getLogic()->addCard(copy, reorganize, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue