mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 17:14:52 -07:00
Merge pull request #5703 from RickyRister/5699-fix-printing
Show correct printing for top card of library
This commit is contained in:
commit
badfb483b2
1 changed files with 6 additions and 2 deletions
|
|
@ -2594,8 +2594,12 @@ void Player::eventRevealCards(const Event_RevealCards &event, EventProcessingOpt
|
||||||
auto cardId = event.card_id_size() == 0 ? -1 : event.card_id(0);
|
auto cardId = event.card_id_size() == 0 ? -1 : event.card_id(0);
|
||||||
if (cardList.size() == 1) {
|
if (cardList.size() == 1) {
|
||||||
cardName = QString::fromStdString(cardList.first()->name());
|
cardName = QString::fromStdString(cardList.first()->name());
|
||||||
if ((cardId == 0) && dynamic_cast<PileZone *>(zone)) {
|
|
||||||
zone->getCards().first()->setName(cardName);
|
// Handle case of revealing top card of library in-place
|
||||||
|
if (cardId == 0 && dynamic_cast<PileZone *>(zone)) {
|
||||||
|
auto card = zone->getCards().first();
|
||||||
|
card->setName(cardName);
|
||||||
|
card->setProviderId(QString::fromStdString(cardList.first()->provider_id()));
|
||||||
zone->update();
|
zone->update();
|
||||||
showZoneView = false;
|
showZoneView = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue