53 lines
1.2 KiB
Java
53 lines
1.2 KiB
Java
package config;
|
|
|
|
import manager.STableManager;
|
|
import manager.Table;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
@Table(name ="ChongRankInformation")
|
|
public class SChongRankInformation implements BaseConfig {
|
|
|
|
private int id;
|
|
|
|
private int heroStar;
|
|
|
|
private int natural;
|
|
|
|
private int score;
|
|
|
|
private static Map<Integer, Map<Integer, SChongRankInformation>> naturalMap = new HashMap<>();
|
|
|
|
@Override
|
|
public void init() throws Exception {
|
|
Map<Integer, SChongRankInformation> config = STableManager.getConfig(SChongRankInformation.class);
|
|
for (SChongRankInformation value : config.values()) {
|
|
Map<Integer, SChongRankInformation> starMap = naturalMap.getOrDefault(value.getNatural(), new HashMap<>());
|
|
starMap.put(value.getHeroStar(),value);
|
|
naturalMap.put(value.getNatural(),starMap);
|
|
}
|
|
}
|
|
|
|
public static Map<Integer, Map<Integer, SChongRankInformation>> getNaturalMap() {
|
|
return naturalMap;
|
|
}
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public int getNatural() {
|
|
return natural;
|
|
}
|
|
|
|
public int getHeroStar() {
|
|
return heroStar;
|
|
}
|
|
|
|
public int getScore() {
|
|
return score;
|
|
}
|
|
|
|
|
|
} |