64 lines
1.4 KiB
Java
64 lines
1.4 KiB
Java
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<Integer,Map<Integer,SSpiritAnimalLevel>> configByQualityAndLevel;
|
|
|
|
@Override
|
|
public void init() throws Exception {
|
|
Map<Integer,Map<Integer,SSpiritAnimalLevel>> tempConfigByQualityAndLevel = new HashMap<>();
|
|
Map<Integer, SSpiritAnimalLevel> config = STableManager.getConfig(SSpiritAnimalLevel.class);
|
|
for(Map.Entry<Integer,SSpiritAnimalLevel> 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;
|
|
}
|
|
|
|
|
|
} |