summaryrefslogtreecommitdiff
path: root/src/main/java/tlIItools/AffixSet.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/tlIItools/AffixSet.java')
-rw-r--r--src/main/java/tlIItools/AffixSet.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/tlIItools/AffixSet.java b/src/main/java/tlIItools/AffixSet.java
index 91c0dcd9..fa5c8d19 100644
--- a/src/main/java/tlIItools/AffixSet.java
+++ b/src/main/java/tlIItools/AffixSet.java
@@ -9,8 +9,7 @@ public class AffixSet {
private static class AffixComparator implements Comparator<Affix> {
@Override
public int compare(Affix a1, Affix a2) {
- if (a1.minLevel == a2.minLevel) return a1.maxLevel - a2.maxLevel;
- else return a1.minLevel - a2.minLevel;
+ return a1.spawnRange.compareTo(a2.spawnRange);
}
}
@@ -29,14 +28,14 @@ public class AffixSet {
ungroupedAffixes = new TreeSet<>(new AffixComparator());
}
-
+
/** Add an affix to this set.
*
* @param afx The affix to add. */
public void addAffixByContents(Affix afx) {
AffixGroup group = afx.toAffixGroup();
- String afxGroup = group.toString();
-
+ String afxGroup = group.toString();
+
if (afxGroup.equals("")) {
ungroupedAffixes.add(afx);
} else {