- Fixed quest draft tournament generation using a token for formats that allow all sets (Vintage, Legacy, etc.).

This commit is contained in:
Agetian
2016-02-02 05:42:34 +00:00
parent 10eae00a14
commit 52ee3ceb2c

View File

@@ -740,10 +740,17 @@ public class QuestEventDraft {
if (quest.getFormat() != null) {
final List<String> allowedSetCodes = quest.getFormat().getAllowedSetCodes();
List<String> allowedSetCodes = quest.getFormat().getAllowedSetCodes();
for (final String setCode : allowedSetCodes) {
allowedQuestSets.add(FModel.getMagicDb().getEditions().get(setCode));
if (!allowedSetCodes.isEmpty()) {
for (final String setCode : allowedSetCodes) {
allowedQuestSets.add(FModel.getMagicDb().getEditions().get(setCode));
}
} else {
// Vintage or Legacy or another format that allows all sets
for (CardEdition ce : FModel.getMagicDb().getEditions()) {
allowedQuestSets.add(ce);
}
}
}