Fix level 8+ skill not being upgradeable

This commit is contained in:
Melledy
2025-10-31 00:47:21 -07:00
parent 78f992f2f5
commit 36004b3fc3
2 changed files with 8 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ package emu.nebula.data.resources;
import emu.nebula.GameConstants;
import emu.nebula.data.BaseDef;
import emu.nebula.data.GameData;
import emu.nebula.data.ResourceType;
import emu.nebula.game.inventory.ItemParamMap;
@@ -52,5 +53,10 @@ public class CharacterSkillUpgradeDef extends BaseDef {
}
this.upgradeId = (this.Group * 100) + this.AdvanceNum;
// Fix for duplicate skill upgrade ids
while (GameData.getCharacterSkillUpgradeDataTable().containsKey(this.getId())) {
this.upgradeId += 1;
}
}
}

View File

@@ -2,6 +2,7 @@ package emu.nebula.util;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -98,7 +99,7 @@ public class JsonUtils {
}
public static <T1, T2> Map<T1, T2> loadToMap(InputStreamReader fileReader, Class<T1> keyType, Class<T2> valueType) throws IOException {
return gson.fromJson(fileReader, TypeToken.getParameterized(Map.class, keyType, valueType).getType());
return gson.fromJson(fileReader, TypeToken.getParameterized(LinkedHashMap.class, keyType, valueType).getType());
}
public static <T1, T2> Map<T1, T2> loadToMap(String filename, Class<T1> keyType, Class<T2> valueType) throws IOException {