Effectbase updated with new enum
This commit is contained in:
@@ -46,7 +46,7 @@ public class EffectsBase {
|
||||
public static HashMap<String, HashMap<String, ArrayList<String>>> NewEffectsMap = new HashMap<>();
|
||||
public static HashMap<String, HashMap<String, ArrayList<String>>> ChangedEffectsMap = new HashMap<>();
|
||||
public static HashMap<String, HashSet<PowerFailCondition>> EffectFailConditions = new HashMap<>();
|
||||
public static HashMap<Integer, HashSet<Enum.SourceType>> EffectDamageTypes = new HashMap<>();
|
||||
public static HashMap<Integer, HashSet<Enum.DamageType>> EffectDamageTypes = new HashMap<>();
|
||||
public static HashSet<AbstractEffectModifier> DefaultModifiers = new HashSet<>();
|
||||
private static ConcurrentHashMap<String, String> itemEffectsByName = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
||||
private static int NewID = 3000;
|
||||
@@ -224,14 +224,14 @@ public class EffectsBase {
|
||||
if (!EffectsBase.EffectDamageTypes.containsKey(eb.getToken()))
|
||||
EffectsBase.EffectDamageTypes.put(eb.getToken(), new HashSet<>());
|
||||
|
||||
Enum.SourceType dt = getDamageType(damageType1);
|
||||
Enum.DamageType dt = Enum.DamageType.getDamageType(damageType1);
|
||||
if (dt != null)
|
||||
EffectsBase.EffectDamageTypes.get(eb.token).add(dt);
|
||||
|
||||
dt = getDamageType(damageType2);
|
||||
dt = Enum.DamageType.getDamageType(damageType2);
|
||||
if (dt != null)
|
||||
EffectsBase.EffectDamageTypes.get(eb.token).add(dt);
|
||||
dt = getDamageType(damageType3);
|
||||
dt = Enum.DamageType.getDamageType(damageType3);
|
||||
if (dt != null)
|
||||
EffectsBase.EffectDamageTypes.get(eb.token).add(dt);
|
||||
break;
|
||||
@@ -277,15 +277,6 @@ public class EffectsBase {
|
||||
}
|
||||
}
|
||||
|
||||
private static Enum.SourceType getDamageType(String name) {
|
||||
|
||||
if (name.isEmpty())
|
||||
return null;
|
||||
else
|
||||
return Enum.SourceType.valueOf(name.toUpperCase());
|
||||
|
||||
}
|
||||
|
||||
public static String getItemEffectsByName(String string) {
|
||||
if (EffectsBase.itemEffectsByName.containsKey(string))
|
||||
return EffectsBase.itemEffectsByName.get(string);
|
||||
@@ -704,7 +695,7 @@ public class EffectsBase {
|
||||
String text = "";
|
||||
if (!EffectsBase.EffectDamageTypes.containsKey(this.token))
|
||||
return text;
|
||||
for (Enum.SourceType type : EffectsBase.EffectDamageTypes.get(this.token)) {
|
||||
for (Enum.DamageType type : EffectsBase.EffectDamageTypes.get(this.token)) {
|
||||
text += type.name() + ' ';
|
||||
}
|
||||
return text;
|
||||
|
||||
Reference in New Issue
Block a user