miduo_server/tablemanager/src/main/java/config/SJewelRankupConfig.java

68 lines
1.4 KiB
Java

package config;
import manager.STableManager;
import manager.Table;
import java.util.HashMap;
import java.util.Map;
@Table(name ="JewelRankupConfig")
public class SJewelRankupConfig implements BaseConfig {
private int id;
private int type;
private int level;
private int poolID;
private int[][] property;
private int[][] jewelExpend;
private int[][] upExpend;
public static Map<Integer,Map<Integer,Map<Integer,SJewelRankupConfig>>> rankupMap = new HashMap<>();
@Override
public void init() throws Exception {
Map<Integer, SJewelRankupConfig> configMap = STableManager.getConfig(SJewelRankupConfig.class);
for(SJewelRankupConfig config:configMap.values()){
rankupMap.computeIfAbsent(config.getPoolID(), k -> new HashMap<>());
rankupMap.get(config.getPoolID()).computeIfAbsent(config.getType(),k->new HashMap<>());
rankupMap.get(config.getPoolID()).get(config.getType()).put(config.getLevel(),config);
}
}
public int getId() {
return id;
}
public int getType() {
return type;
}
public int getLevel() {
return level;
}
public int getPoolID() {
return poolID;
}
public int[][] getProperty() {
return property;
}
public int[][] getJewelExpend() {
return jewelExpend;
}
public int[][] getUpExpend() {
return upExpend;
}
}