mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 04:23:55 -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 &_name,
|
||||||
const QString &_providerId,
|
const QString &_providerId,
|
||||||
int _cardid,
|
int _cardid,
|
||||||
bool _revealedCard,
|
|
||||||
CardZone *_zone)
|
CardZone *_zone)
|
||||||
: AbstractCardItem(parent, _name, _providerId, _owner, _cardid), zone(_zone), revealedCard(_revealedCard),
|
: AbstractCardItem(parent, _name, _providerId, _owner, _cardid), zone(_zone), attacking(false),
|
||||||
attacking(false), destroyOnZoneChange(false), doesntUntap(false), dragItem(nullptr), attachedTo(nullptr)
|
destroyOnZoneChange(false), doesntUntap(false), dragItem(nullptr), attachedTo(nullptr)
|
||||||
{
|
{
|
||||||
owner->addCard(this);
|
owner->addCard(this);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ class CardItem : public AbstractCardItem
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
CardZone *zone;
|
CardZone *zone;
|
||||||
bool revealedCard;
|
|
||||||
bool attacking;
|
bool attacking;
|
||||||
QMap<int, int> counters;
|
QMap<int, int> counters;
|
||||||
QString annotation;
|
QString annotation;
|
||||||
|
|
@ -55,7 +54,6 @@ public:
|
||||||
const QString &_name = QString(),
|
const QString &_name = QString(),
|
||||||
const QString &_providerId = QString(),
|
const QString &_providerId = QString(),
|
||||||
int _cardid = -1,
|
int _cardid = -1,
|
||||||
bool revealedCard = false,
|
|
||||||
CardZone *_zone = nullptr);
|
CardZone *_zone = nullptr);
|
||||||
~CardItem() override;
|
~CardItem() override;
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
|
|
@ -85,10 +83,6 @@ public:
|
||||||
{
|
{
|
||||||
owner = _owner;
|
owner = _owner;
|
||||||
}
|
}
|
||||||
bool getRevealedCard() const
|
|
||||||
{
|
|
||||||
return revealedCard;
|
|
||||||
}
|
|
||||||
bool getAttacking() const
|
bool getAttacking() const
|
||||||
{
|
{
|
||||||
return attacking;
|
return attacking;
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ void ZoneViewZone::initializeCards(const QList<const ServerInfo_Card *> &cardLis
|
||||||
if (!cardList.isEmpty()) {
|
if (!cardList.isEmpty()) {
|
||||||
for (int i = 0; i < cardList.size(); ++i)
|
for (int i = 0; i < cardList.size(); ++i)
|
||||||
addCard(new CardItem(player, this, QString::fromStdString(cardList[i]->name()),
|
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);
|
false, i);
|
||||||
reorganizeCards();
|
reorganizeCards();
|
||||||
} else if (!origZone->contentsKnown()) {
|
} 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());
|
int number = numberCards == -1 ? c.size() : (numberCards < c.size() ? numberCards : c.size());
|
||||||
for (int i = 0; i < number; i++) {
|
for (int i = 0; i < number; i++) {
|
||||||
CardItem *card = c.at(i);
|
CardItem *card = c.at(i);
|
||||||
addCard(new CardItem(player, this, card->getName(), card->getProviderId(), card->getId(), revealZone),
|
addCard(new CardItem(player, this, card->getName(), card->getProviderId(), card->getId()), false, i);
|
||||||
false, i);
|
|
||||||
}
|
}
|
||||||
reorganizeCards();
|
reorganizeCards();
|
||||||
}
|
}
|
||||||
|
|
@ -103,7 +102,7 @@ void ZoneViewZone::zoneDumpReceived(const Response &r)
|
||||||
const ServerInfo_Card &cardInfo = resp.zone_info().card_list(i);
|
const ServerInfo_Card &cardInfo = resp.zone_info().card_list(i);
|
||||||
auto cardName = QString::fromStdString(cardInfo.name());
|
auto cardName = QString::fromStdString(cardInfo.name());
|
||||||
auto cardProviderId = QString::fromStdString(cardInfo.provider_id());
|
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);
|
cards.insert(i, card);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue