mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-25 23:07:50 +00:00
Fix elementless Traveler depotValue
This commit is contained in:
parent
36585840d3
commit
735f765320
@ -26,7 +26,7 @@ public enum ElementType {
|
|||||||
@Getter private final int teamResonanceId;
|
@Getter private final int teamResonanceId;
|
||||||
@Getter private final FightProperty curEnergyProp;
|
@Getter private final FightProperty curEnergyProp;
|
||||||
@Getter private final FightProperty maxEnergyProp;
|
@Getter private final FightProperty maxEnergyProp;
|
||||||
@Getter private int depotValue;
|
@Getter private final int depotValue;
|
||||||
@Getter private final int configHash;
|
@Getter private final int configHash;
|
||||||
private static final Int2ObjectMap<ElementType> map = new Int2ObjectOpenHashMap<>();
|
private static final Int2ObjectMap<ElementType> map = new Int2ObjectOpenHashMap<>();
|
||||||
private static final Map<String, ElementType> stringMap = new HashMap<>();
|
private static final Map<String, ElementType> stringMap = new HashMap<>();
|
||||||
@ -39,14 +39,19 @@ public enum ElementType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ElementType(int value, FightProperty curEnergyProp, FightProperty maxEnergyProp) {
|
private ElementType(int value, FightProperty curEnergyProp, FightProperty maxEnergyProp) {
|
||||||
this(value, curEnergyProp, maxEnergyProp, 0, null);
|
this(value, curEnergyProp, maxEnergyProp, 0, null, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ElementType(int value, FightProperty curEnergyProp, FightProperty maxEnergyProp, int teamResonanceId, String configName) {
|
private ElementType(int value, FightProperty curEnergyProp, FightProperty maxEnergyProp, int teamResonanceId, String configName) {
|
||||||
|
this(value, curEnergyProp, maxEnergyProp, teamResonanceId, configName, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ElementType(int value, FightProperty curEnergyProp, FightProperty maxEnergyProp, int teamResonanceId, String configName, int depotValue) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
this.curEnergyProp = curEnergyProp;
|
this.curEnergyProp = curEnergyProp;
|
||||||
this.maxEnergyProp = maxEnergyProp;
|
this.maxEnergyProp = maxEnergyProp;
|
||||||
this.teamResonanceId = teamResonanceId;
|
this.teamResonanceId = teamResonanceId;
|
||||||
|
this.depotValue = depotValue;
|
||||||
if (configName != null) {
|
if (configName != null) {
|
||||||
this.configHash = Utils.abilityHash(configName);
|
this.configHash = Utils.abilityHash(configName);
|
||||||
} else {
|
} else {
|
||||||
@ -54,11 +59,6 @@ public enum ElementType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private ElementType(int value, FightProperty curEnergyProp, FightProperty maxEnergyProp, int teamResonanceId, String configName, int depotValue) {
|
|
||||||
this(value, curEnergyProp, maxEnergyProp, teamResonanceId, configName);
|
|
||||||
this.depotValue = depotValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ElementType getTypeByValue(int value) {
|
public static ElementType getTypeByValue(int value) {
|
||||||
return map.getOrDefault(value, None);
|
return map.getOrDefault(value, None);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user