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

73 lines
1.5 KiB
Java
Raw Normal View History

package config;
2019-09-26 09:54:17 +08:00
import manager.STableManager;
import manager.Table;
2019-09-26 09:54:17 +08:00
2019-10-19 16:49:38 +08:00
import java.util.HashMap;
2019-09-26 09:54:17 +08:00
import java.util.Map;
@Table(name ="TreasureSunlongConfig")
public class STreasureSunlongConfig implements BaseConfig {
2019-10-19 16:49:38 +08:00
private int id;
2019-09-26 09:54:17 +08:00
2019-10-19 16:49:38 +08:00
private int activityId;
2019-09-26 09:54:17 +08:00
2019-10-19 16:49:38 +08:00
private int type;
2019-09-26 09:54:17 +08:00
2019-10-19 16:49:38 +08:00
private int level;
2019-09-26 09:54:17 +08:00
2019-10-19 16:49:38 +08:00
private int[][] integral;
2019-09-26 09:54:17 +08:00
2019-10-19 16:49:38 +08:00
private int[][] reward;
2019-09-26 09:54:17 +08:00
2019-10-19 16:49:38 +08:00
private int[][] treasureReward;
2019-09-26 09:54:17 +08:00
2019-10-19 16:49:38 +08:00
public static Map<Integer,STreasureSunlongConfig> treasureSunlongConfigMap;
public static Map<Integer,STreasureSunlongConfig> levelTreasureConfigMap;
@Override
2019-09-26 09:54:17 +08:00
public void init() throws Exception {
2019-10-14 15:30:13 +08:00
treasureSunlongConfigMap= STableManager.getConfig(STreasureSunlongConfig.class);
2019-10-19 16:49:38 +08:00
levelTreasureConfigMap= new HashMap<>(treasureSunlongConfigMap.size());
for(Map.Entry<Integer,STreasureSunlongConfig> entry:treasureSunlongConfigMap.entrySet()){
STreasureSunlongConfig config = entry.getValue();
if(config.getActivityId()!=40){
continue;
}
levelTreasureConfigMap.put(config.getLevel(), config);
}
2019-09-26 09:54:17 +08:00
}
2019-10-19 16:49:38 +08:00
public int getId() {
2019-09-26 09:54:17 +08:00
return id;
}
2019-10-19 16:49:38 +08:00
public int getActivityId() {
2019-09-26 09:54:17 +08:00
return activityId;
}
2019-10-19 16:49:38 +08:00
public int getType() {
2019-09-26 09:54:17 +08:00
return type;
}
2019-10-19 16:49:38 +08:00
public int getLevel() {
2019-09-26 09:54:17 +08:00
return level;
}
2019-10-19 16:49:38 +08:00
public int[][] getIntegral() {
2019-09-26 09:54:17 +08:00
return integral;
}
2019-10-19 16:49:38 +08:00
public int[][] getReward() {
2019-09-26 09:54:17 +08:00
return reward;
}
2019-10-19 16:49:38 +08:00
public int[][] getTreasureReward() {
2019-09-26 09:54:17 +08:00
return treasureReward;
}
}