Simple fix for issue where the case of lifeloss for afflict creatures did not match apiType case, causing crashes

This commit is contained in:
elliot
2018-03-25 23:08:06 -04:00
parent a8ebd94e88
commit b40f460c59

View File

@@ -168,7 +168,7 @@ public enum ApiType {
static { static {
for(ApiType t : ApiType.values()) { for(ApiType t : ApiType.values()) {
allValues.put(t.name(), t); allValues.put(t.name().toLowerCase(), t);
} }
} }
@@ -179,7 +179,7 @@ public enum ApiType {
} }
public static ApiType smartValueOf(String value) { public static ApiType smartValueOf(String value) {
ApiType v = allValues.get(value); ApiType v = allValues.get(value.toLowerCase());
if ( v == null ) if ( v == null )
throw new RuntimeException("Element " + value + " not found in ApiType enum"); throw new RuntimeException("Element " + value + " not found in ApiType enum");
return v; return v;