From 735f765320aada0e0a2749344253a4f58c1688b3 Mon Sep 17 00:00:00 2001
From: AnimeGitB <AnimeGitB@bigblueball.in>
Date: Fri, 2 Sep 2022 21:54:55 +0930
Subject: [PATCH] Fix elementless Traveler depotValue

---
 .../emu/grasscutter/game/props/ElementType.java    | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/main/java/emu/grasscutter/game/props/ElementType.java b/src/main/java/emu/grasscutter/game/props/ElementType.java
index 7da00a41..db8887d7 100644
--- a/src/main/java/emu/grasscutter/game/props/ElementType.java
+++ b/src/main/java/emu/grasscutter/game/props/ElementType.java
@@ -26,7 +26,7 @@ public enum ElementType {
     @Getter private final int teamResonanceId;
     @Getter private final FightProperty curEnergyProp;
     @Getter private final FightProperty maxEnergyProp;
-    @Getter private int depotValue;
+    @Getter private final int depotValue;
     @Getter private final int configHash;
     private static final Int2ObjectMap<ElementType> map = new Int2ObjectOpenHashMap<>();
     private static final Map<String, ElementType> stringMap = new HashMap<>();
@@ -39,14 +39,19 @@ public enum ElementType {
     }
 
     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) {
+        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.curEnergyProp = curEnergyProp;
         this.maxEnergyProp = maxEnergyProp;
         this.teamResonanceId = teamResonanceId;
+        this.depotValue = depotValue;
         if (configName != null) {
             this.configHash = Utils.abilityHash(configName);
         } 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) {
         return map.getOrDefault(value, None);
     }
-- 
GitLab