mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
set p/t, set annotation, multiple counters per card
This commit is contained in:
parent
7553251baf
commit
df7bcf179d
25 changed files with 891 additions and 385 deletions
|
|
@ -275,7 +275,15 @@ QList<ServerInfo_Player *> Server_Game::getGameState(Server_Player *playerWhosAs
|
|||
while (cardIterator.hasNext()) {
|
||||
Server_Card *card = cardIterator.next();
|
||||
QString displayedName = card->getFaceDown() ? QString() : card->getName();
|
||||
cardList.append(new ServerInfo_Card(card->getId(), displayedName, card->getX(), card->getY(), card->getCounters(), card->getTapped(), card->getAttacking(), card->getAnnotation()));
|
||||
|
||||
QList<ServerInfo_CardCounter *> cardCounterList;
|
||||
QMapIterator<int, int> cardCounterIterator(card->getCounters());
|
||||
while (cardCounterIterator.hasNext()) {
|
||||
cardCounterIterator.next();
|
||||
cardCounterList.append(new ServerInfo_CardCounter(cardCounterIterator.key(), cardCounterIterator.value()));
|
||||
}
|
||||
|
||||
cardList.append(new ServerInfo_Card(card->getId(), displayedName, card->getX(), card->getY(), card->getTapped(), card->getAttacking(), card->getPT(), card->getAnnotation(), cardCounterList));
|
||||
}
|
||||
}
|
||||
zoneList.append(new ServerInfo_Zone(zone->getName(), zone->getType(), zone->hasCoords(), zone->cards.size(), cardList));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue