From 3622ad3fab214816d3af73a9751275a5ffb7491b Mon Sep 17 00:00:00 2001 From: myk Date: Thu, 28 Feb 2013 10:11:50 +0000 Subject: [PATCH] don't show non-traditional sets in unlock dialog --- src/main/java/forge/quest/QuestUtilUnlockSets.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/forge/quest/QuestUtilUnlockSets.java b/src/main/java/forge/quest/QuestUtilUnlockSets.java index 4363ca97083..2de5e3e16c1 100644 --- a/src/main/java/forge/quest/QuestUtilUnlockSets.java +++ b/src/main/java/forge/quest/QuestUtilUnlockSets.java @@ -135,6 +135,15 @@ public class QuestUtilUnlockSets { // get a number of sets between an excluded and any included set List> excludedWithDistances = new ArrayList>(); for (CardEdition ex : excludedSets) { + switch (ex.getType()) { + case CORE: case EXPANSION: case REPRINT: case STARTER: break; + case OTHER: case UNKNOWN: + // don't add non-traditional sets + continue; + + default: + throw new RuntimeException("unhandled card edition type: " + ex.getType()); + } int distance = Integer.MAX_VALUE; for (CardEdition in : allowedSets) { int d = Math.abs(ex.getIndex() - in.getIndex());