Combine card legalities in Oracle (#5370)

- Some printings have different legalities, which cause Oracle to bug out
- Fix #4783
This commit is contained in:
Zach H 2024-12-28 21:23:39 -05:00 committed by GitHub
parent 5e62069444
commit 32dd18998d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 19 additions and 0 deletions

View file

@ -304,6 +304,17 @@ void CardInfo::addToSet(const CardSetPtr &_set, const CardInfoPerSet _info)
refreshCachedSetNames();
}
void CardInfo::combineLegalities(const QVariantHash &props)
{
QHashIterator<QString, QVariant> it(props);
while (it.hasNext()) {
it.next();
if (it.key().startsWith("format-")) {
smartThis->setProperty(it.key(), it.value().toString());
}
}
}
void CardInfo::refreshCachedSetNames()
{
QStringList setList;