Log number of cards revealed to other players. (#3555)
This commit is contained in:
parent
2bf444e4b7
commit
a719e3b306
3 changed files with 4 additions and 1 deletions
|
@ -1854,7 +1854,8 @@ void Player::eventRevealCards(const Event_RevealCards &event)
|
|||
static_cast<GameScene *>(scene())->addRevealedZoneView(this, zone, cardList, event.grant_write_access());
|
||||
}
|
||||
|
||||
emit logRevealCards(this, zone, event.card_id(), cardName, otherPlayer, false, cardList.size());
|
||||
emit logRevealCards(this, zone, event.card_id(), cardName, otherPlayer, false,
|
||||
event.has_number_of_cards() ? event.number_of_cards() : cardList.size());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,4 +11,5 @@ message Event_RevealCards {
|
|||
optional sint32 other_player_id = 3 [default = -1];
|
||||
repeated ServerInfo_Card cards = 4;
|
||||
optional bool grant_write_access = 5;
|
||||
optional uint32 number_of_cards = 6;
|
||||
}
|
||||
|
|
|
@ -1660,6 +1660,7 @@ Server_Player::cmdRevealCards(const Command_RevealCards &cmd, ResponseContainer
|
|||
Event_RevealCards eventOthers;
|
||||
eventOthers.set_grant_write_access(cmd.grant_write_access());
|
||||
eventOthers.set_zone_name(zone->getName().toStdString());
|
||||
eventOthers.set_number_of_cards(cardsToReveal.size());
|
||||
if (cmd.has_card_id())
|
||||
eventOthers.set_card_id(cmd.card_id());
|
||||
if (cmd.has_player_id())
|
||||
|
|
Loading…
Reference in a new issue