Merge pull request #238 from arxanas/no-overwrite-tokens-xml

Fix #231: tokens.xml no longer overwritten by cards.xml.
This commit is contained in:
Gavin Bisesi 2014-10-06 11:34:58 -04:00
commit 006451f402
3 changed files with 19 additions and 12 deletions

View file

@ -210,11 +210,13 @@ int OracleImporter::importTextSpoiler(CardSet *set, const QVariant &data)
}
}
CardInfo *card = addCard(set->getShortName(), cardName, cardIsToken, cardId, cardCost, cardType, cardPT, cardLoyalty, cardText.split("\n"));
if (!cardIsToken) {
CardInfo *card = addCard(set->getShortName(), cardName, cardIsToken, cardId, cardCost, cardType, cardPT, cardLoyalty, cardText.split("\n"));
if (!set->contains(card)) {
card->addToSet(set);
cards++;
if (!set->contains(card)) {
card->addToSet(set);
cards++;
}
}
}