show deck hash even when its invalid (#4595)
* show deck hash even when its invalid * remove invalid deck hashes entirely --------- Co-authored-by: ebbit1q <ebbit1q@gmail.com>
This commit is contained in:
parent
b33246b29f
commit
87462398d8
1 changed files with 1 additions and 5 deletions
|
@ -799,7 +799,6 @@ bool DeckList::deleteNode(AbstractDecklistNode *node, InnerDecklistNode *rootNod
|
|||
void DeckList::updateDeckHash()
|
||||
{
|
||||
QStringList cardList;
|
||||
bool isValidDeckList = true;
|
||||
QSet<QString> hashZones, optionalZones;
|
||||
|
||||
hashZones << DECK_ZONE_MAIN << DECK_ZONE_SIDE; // Zones in deck to be included in hashing process
|
||||
|
@ -814,9 +813,6 @@ void DeckList::updateDeckHash()
|
|||
for (int k = 0; k < card->getNumber(); ++k) {
|
||||
cardList.append((node->getName() == DECK_ZONE_SIDE ? "SB:" : "") + card->getName().toLower());
|
||||
}
|
||||
} else if (!optionalZones.contains(node->getName())) // Not a valid zone -> cheater?
|
||||
{
|
||||
isValidDeckList = false; // Deck is invalid
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -826,7 +822,7 @@ void DeckList::updateDeckHash()
|
|||
(((quint64)(unsigned char)deckHashArray[1]) << 24) +
|
||||
(((quint64)(unsigned char)deckHashArray[2] << 16)) +
|
||||
(((quint64)(unsigned char)deckHashArray[3]) << 8) + (quint64)(unsigned char)deckHashArray[4];
|
||||
deckHash = (isValidDeckList) ? QString::number(number, 32).rightJustified(8, '0') : "INVALID";
|
||||
deckHash = QString::number(number, 32).rightJustified(8, '0');
|
||||
|
||||
emit deckHashChanged();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue