mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-25 16:13:54 -07:00
fix: Use isRebalanced to detect Arena cards (#5778)
* fix: Use isRebalanced to detect Arena cards In #5759 we introduced a setting (off by default) to disable the use of Arena cards. This was done by checking the `isOnlineOnly` property of the card, which accidentally also disabled online *printings* of cards that otherwise exist in paper (e.g. Vintage Masters). This PR does the same thing but uses the `isRebalanced` property instead, which is `true` for Arena cards only and should have been used from the start. This setting does not impact online-only printings such as Vintage Masters. The settings is still on by default. * Update setting to mention Alchemy rather than Arena
This commit is contained in:
parent
70f2a32fad
commit
2fcdb52157
9 changed files with 31 additions and 26 deletions
|
|
@ -126,7 +126,7 @@ QVariantHash CockatriceXml4Parser::loadCardPropertiesFromXml(QXmlStreamReader &x
|
|||
|
||||
void CockatriceXml4Parser::loadCardsFromXml(QXmlStreamReader &xml)
|
||||
{
|
||||
bool includeOnlineOnlyCards = SettingsCache::instance().getIncludeOnlineOnlyCards();
|
||||
bool includeRebalancedCards = SettingsCache::instance().getIncludeRebalancedCards();
|
||||
while (!xml.atEnd()) {
|
||||
if (xml.readNext() == QXmlStreamReader::EndElement) {
|
||||
break;
|
||||
|
|
@ -194,7 +194,7 @@ void CockatriceXml4Parser::loadCardsFromXml(QXmlStreamReader &xml)
|
|||
// However, this is also true of the `set->getEnabled()`
|
||||
// check above (which is currently bugged as well), so
|
||||
// we'll fix both at the same time.
|
||||
if (includeOnlineOnlyCards || setInfo.getProperty("isOnlineOnly") != "true") {
|
||||
if (includeRebalancedCards || setInfo.getProperty("isRebalanced") != "true") {
|
||||
_sets[setName].append(setInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue