Deleted commented parts as suggested

This commit is contained in:
Seravy
2018-02-09 10:43:43 +01:00
parent 36917c0d18
commit 42f79630e6

View File

@@ -789,29 +789,13 @@ public class QuestEventDraft implements IQuestEvent {
if (!allowedQuestSets.isEmpty()) {
for (final CardBlock block : blocks) {
boolean blockAllowed = false;
boolean largeSetUnlocked = false;
int unlockedSets = 0;
final boolean allBlocksSanctioned = quest.getFormat().getAllowedSetCodes().isEmpty();
// New code : all sets must be unlocked
boolean blockAllowed = true;
for (final CardEdition set : block.getSets()) {
if (!allowedQuestSets.contains(set) && !allBlocksSanctioned) {
continue;
for (CardEdition set : block.getSets()) {
if (!allowedQuestSets.contains(set)) {
blockAllowed = false;
}
unlockedSets++;
if (set.isLargeSet()) {
largeSetUnlocked = true;
}
}
//Allow partially unlocked blocks if they contain at least one large and one small unlocked set.
if (largeSetUnlocked && unlockedSets > 1) {
blockAllowed = true;
}
if (largeSetUnlocked && block.getSets().size() == 1) {
blockAllowed = true;
singleSets.add(block.getSets().get(0).getCode());
}
if (blockAllowed) {