forked from External/mage
Rework Mystery Booster and adjust some set classifications (#12138)
Mystery Booster rework: * added images download support from scryfall (closes #11806); * added virtual sets support (remix); * fixed Commander set name (closes #12110);
This commit is contained in:
parent
9f52c8946e
commit
9566e23d0b
23 changed files with 1939 additions and 3684 deletions
|
|
@ -675,4 +675,13 @@ public abstract class ExpansionSet implements Serializable {
|
|||
return numBoosterDoubleFaced;
|
||||
}
|
||||
|
||||
protected static void addCardInfoToList(List<CardInfo> boosterList, String name, String expansion, String cardNumber) {
|
||||
CardInfo cardInfo = CardRepository.instance.findCardWithPreferredSetAndNumber(name, expansion, cardNumber);
|
||||
if (cardInfo != null && cardInfo.getSetCode().equals(expansion) && cardInfo.getCardNumber().equals(cardNumber)) {
|
||||
boosterList.add(cardInfo);
|
||||
} else {
|
||||
throw new IllegalStateException("CardInfo not found: " + name + " (" + expansion + ":" + cardNumber + ")");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue