mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
Remove revealedCard flag from CardItem (#5723)
It is no longer used since #5254.
This commit is contained in:
parent
e4f40a82a2
commit
1851f71850
3 changed files with 5 additions and 13 deletions
|
|
@ -22,10 +22,9 @@ CardItem::CardItem(Player *_owner,
|
|||
const QString &_name,
|
||||
const QString &_providerId,
|
||||
int _cardid,
|
||||
bool _revealedCard,
|
||||
CardZone *_zone)
|
||||
: AbstractCardItem(parent, _name, _providerId, _owner, _cardid), zone(_zone), revealedCard(_revealedCard),
|
||||
attacking(false), destroyOnZoneChange(false), doesntUntap(false), dragItem(nullptr), attachedTo(nullptr)
|
||||
: AbstractCardItem(parent, _name, _providerId, _owner, _cardid), zone(_zone), attacking(false),
|
||||
destroyOnZoneChange(false), doesntUntap(false), dragItem(nullptr), attachedTo(nullptr)
|
||||
{
|
||||
owner->addCard(this);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ class CardItem : public AbstractCardItem
|
|||
Q_OBJECT
|
||||
private:
|
||||
CardZone *zone;
|
||||
bool revealedCard;
|
||||
bool attacking;
|
||||
QMap<int, int> counters;
|
||||
QString annotation;
|
||||
|
|
@ -55,7 +54,6 @@ public:
|
|||
const QString &_name = QString(),
|
||||
const QString &_providerId = QString(),
|
||||
int _cardid = -1,
|
||||
bool revealedCard = false,
|
||||
CardZone *_zone = nullptr);
|
||||
~CardItem() override;
|
||||
void retranslateUi();
|
||||
|
|
@ -85,10 +83,6 @@ public:
|
|||
{
|
||||
owner = _owner;
|
||||
}
|
||||
bool getRevealedCard() const
|
||||
{
|
||||
return revealedCard;
|
||||
}
|
||||
bool getAttacking() const
|
||||
{
|
||||
return attacking;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ void ZoneViewZone::initializeCards(const QList<const ServerInfo_Card *> &cardLis
|
|||
if (!cardList.isEmpty()) {
|
||||
for (int i = 0; i < cardList.size(); ++i)
|
||||
addCard(new CardItem(player, this, QString::fromStdString(cardList[i]->name()),
|
||||
QString::fromStdString(cardList[i]->provider_id()), cardList[i]->id(), revealZone),
|
||||
QString::fromStdString(cardList[i]->provider_id()), cardList[i]->id()),
|
||||
false, i);
|
||||
reorganizeCards();
|
||||
} else if (!origZone->contentsKnown()) {
|
||||
|
|
@ -88,8 +88,7 @@ void ZoneViewZone::initializeCards(const QList<const ServerInfo_Card *> &cardLis
|
|||
int number = numberCards == -1 ? c.size() : (numberCards < c.size() ? numberCards : c.size());
|
||||
for (int i = 0; i < number; i++) {
|
||||
CardItem *card = c.at(i);
|
||||
addCard(new CardItem(player, this, card->getName(), card->getProviderId(), card->getId(), revealZone),
|
||||
false, i);
|
||||
addCard(new CardItem(player, this, card->getName(), card->getProviderId(), card->getId()), false, i);
|
||||
}
|
||||
reorganizeCards();
|
||||
}
|
||||
|
|
@ -103,7 +102,7 @@ void ZoneViewZone::zoneDumpReceived(const Response &r)
|
|||
const ServerInfo_Card &cardInfo = resp.zone_info().card_list(i);
|
||||
auto cardName = QString::fromStdString(cardInfo.name());
|
||||
auto cardProviderId = QString::fromStdString(cardInfo.provider_id());
|
||||
auto *card = new CardItem(player, this, cardName, cardProviderId, cardInfo.id(), revealZone, this);
|
||||
auto *card = new CardItem(player, this, cardName, cardProviderId, cardInfo.id(), this);
|
||||
cards.insert(i, card);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue