This commit is contained in:
ebbit1q 2026-08-23 02:42:49 +02:00 • committed by ZeldaZach
parent 98ecad9cc5
commit e3dab108f4
No known key found for this signature in database

View file

@ -150,12 +150,12 @@ int InnerDecklistNode::readElement(QXmlStreamReader *xml, int limit)
auto *newZone = new InnerDecklistNode(xml->attributes().value("name").toString(), this); auto *newZone = new InnerDecklistNode(xml->attributes().value("name").toString(), this);
totalCards += newZone->readElement(xml, limit - totalCards); totalCards += newZone->readElement(xml, limit - totalCards);
} else if (childName == "card") { } else if (childName == "card") {
int amount = xml->attributes().value("number").toString().toInt(); int amount = xml->attributes().value("number").toString().toInt();
amount = qMin(amount, limit - totalCards); amount = qMin(amount, limit - totalCards);
auto *newCard = new DecklistCardNode( auto *newCard = new DecklistCardNode(xml->attributes().value("name").toString(), amount, this, -1,
xml->attributes().value("name").toString(), amount, xml->attributes().value("setShortName").toString(),
this, -1, xml->attributes().value("setShortName").toString(), xml->attributes().value("collectorNumber").toString(),
xml->attributes().value("collectorNumber").toString(), xml->attributes().value("uuid").toString()); xml->attributes().value("uuid").toString());
totalCards += amount; totalCards += amount;
totalCards += newCard->readElement(xml, limit - totalCards); totalCards += newCard->readElement(xml, limit - totalCards);
} }