AlwaysRevealTopCard done, issue #31 fixed

This commit is contained in:
Max-Wilhelm Bruker 2012-04-01 11:45:01 +02:00
parent 840b577f42
commit c835a827b0
6 changed files with 20 additions and 5 deletions

View file

@ -1297,12 +1297,19 @@ void Player::eventRevealCards(const Event_RevealCards &event)
emit logRevealCards(this, zone, cardList.at(i)->id(), cardName, this, true);
}
} else {
if (!cardList.isEmpty())
bool showZoneView = true;
QString cardName;
if (cardList.size() == 1) {
cardName = QString::fromStdString(cardList.first()->name());
if ((event.card_id() == 0) && dynamic_cast<PileZone *>(zone)) {
zone->getCards().first()->setName(cardName);
zone->update();
showZoneView = false;
}
}
if (showZoneView && !cardList.isEmpty())
static_cast<GameScene *>(scene())->addRevealedZoneView(this, zone, cardList, event.grant_write_access());
QString cardName;
if (cardList.size() == 1)
cardName = QString::fromStdString(cardList.first()->name());
emit logRevealCards(this, zone, event.card_id(), cardName, otherPlayer, false);
}
}