mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
card_ref.h
This commit is contained in:
parent
e05dad4267
commit
47c9a03bee
9 changed files with 66 additions and 45 deletions
|
|
@ -210,9 +210,7 @@ void Server_Player::setupZones()
|
|||
continue;
|
||||
}
|
||||
for (int k = 0; k < currentCard->getNumber(); ++k) {
|
||||
z->insertCard(
|
||||
new Server_Card(currentCard->getName(), currentCard->getCardProviderId(), nextCardId++, 0, 0, z),
|
||||
-1, 0);
|
||||
z->insertCard(new Server_Card(currentCard->toCardRef(), nextCardId++, 0, 0, z), -1, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1517,7 +1515,7 @@ Server_Player::cmdCreateToken(const Command_CreateToken &cmd, ResponseContainer
|
|||
yCoord = 0;
|
||||
}
|
||||
|
||||
auto *card = new Server_Card(cardName, cardProviderId, newCardId(), xCoord, yCoord);
|
||||
auto *card = new Server_Card({cardName, cardProviderId}, newCardId(), xCoord, yCoord);
|
||||
card->moveToThread(thread());
|
||||
// Client should already prevent face-down tokens from having attributes; this just an extra server-side check
|
||||
if (!cmd.face_down()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue