|
|
@ -115,17 +115,14 @@ public class EffectsParser { |
|
|
|
EffectModifier effectModifier = new EffectModifier(); |
|
|
|
EffectModifier effectModifier = new EffectModifier(); |
|
|
|
ArrayList<String> modValues = new ArrayList<>(); |
|
|
|
ArrayList<String> modValues = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
Matcher matcher = STRSPLIT_REGEX.matcher(modData); |
|
|
|
String[] modEntries = modData.trim().split("\n"); |
|
|
|
|
|
|
|
|
|
|
|
while (matcher.find()) |
|
|
|
effectModifier.type = mbEnums.ModType.valueOf(modEntries[0]); |
|
|
|
modValues.add(matcher.group(1).trim()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
effectModifier.type = mbEnums.ModType.valueOf(modValues.get(0)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (effectModifier.type) { |
|
|
|
switch (effectModifier.type) { |
|
|
|
case AnimOverride: |
|
|
|
case AnimOverride: |
|
|
|
effectModifier.min = Integer.parseInt(modValues.get(1)); |
|
|
|
effectModifier.min = Integer.parseInt(modEntries[1]); |
|
|
|
effectModifier.max = Integer.parseInt(modValues.get(2)); |
|
|
|
effectModifier.max = Integer.parseInt(modEntries[2]); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
Logger.error("Unhandled type: " + effectModifier.type); |
|
|
|
Logger.error("Unhandled type: " + effectModifier.type); |
|
|
|