package config; import manager.STableManager; import manager.Table; import java.util.HashMap; import java.util.Map; @Table(name ="SpiritAnimalLevel") public class SSpiritAnimalLevel implements BaseConfig { private int id; private int level; private int quality; private int[][] characterLevelPara; private int[][] consume; private int[][] sumConsume; public static Map> configByQualityAndLevel; @Override public void init() throws Exception { Map> tempConfigByQualityAndLevel = new HashMap<>(); Map config = STableManager.getConfig(SSpiritAnimalLevel.class); for(Map.Entry entry:config.entrySet()){ SSpiritAnimalLevel value = entry.getValue(); tempConfigByQualityAndLevel.computeIfAbsent(value.getQuality(),n->new HashMap<>()).put(value.getLevel(),value); } configByQualityAndLevel = tempConfigByQualityAndLevel; } public int getId() { return id; } public int getLevel() { return level; } public int getQuality() { return quality; } public int[][] getCharacterLevelPara() { return characterLevelPara; } public int[][] getConsume() { return consume; } public int[][] getSumConsume() { return sumConsume; } }