73 lines
1.7 KiB
Java
73 lines
1.7 KiB
Java
package config;
|
|
|
|
import manager.STableManager;
|
|
import manager.Table;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
@Table(name ="ChangingCardLevel")
|
|
public class SChangingCardLevel implements BaseConfig {
|
|
|
|
private int id;
|
|
|
|
private int level;
|
|
|
|
private int poolId;
|
|
|
|
private int[][] propList;
|
|
|
|
private int[] exp;
|
|
|
|
private int[] changingForceExp;
|
|
private int[][] playerPropList;
|
|
|
|
public static Map<Integer, Map<Integer, SChangingCardLevel>> sChallengeConfigs =new HashMap<Integer, Map<Integer, SChangingCardLevel>>();;
|
|
@Override
|
|
public void init() throws Exception {
|
|
Map<Integer, SChangingCardLevel> sChangingCardLevel = STableManager.getConfig(SChangingCardLevel.class);
|
|
for(SChangingCardLevel config: sChangingCardLevel.values()){
|
|
if(!sChallengeConfigs.containsKey(config.getPoolId())){
|
|
sChallengeConfigs.put(config.getPoolId(), new HashMap<>());
|
|
}
|
|
if(!sChallengeConfigs.get(config.getPoolId()).containsKey(config.getLevel())){
|
|
sChallengeConfigs.get(config.getPoolId()).put(config.getLevel(),config);
|
|
}
|
|
}
|
|
}
|
|
|
|
public static Map<Integer, SChangingCardLevel> getConfigByPoolId(int poolId){
|
|
if(sChallengeConfigs.containsKey(poolId)){
|
|
return sChallengeConfigs.get(poolId);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public int getLevel() {
|
|
return level;
|
|
}
|
|
|
|
public int getPoolId() {
|
|
return poolId;
|
|
}
|
|
|
|
public int[][] getPropList() {
|
|
return propList;
|
|
}
|
|
|
|
public int[] getExp() {
|
|
return exp;
|
|
}
|
|
public int[] getChangingForceExp() {
|
|
return changingForceExp;
|
|
}
|
|
|
|
public int[][] getPlayerPropList() {
|
|
return playerPropList;
|
|
}
|
|
} |