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

77 lines
1.6 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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;
private int passiveSkillId;
/**
* 第一层《poolId,map》
* 第二层《type,map》
* 第三层《levelSJewelRankupConfig》
*/
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;
}
public int getPassiveSkillId() {
return passiveSkillId;
}
}