93 lines
2.1 KiB
Java
93 lines
2.1 KiB
Java
package config;
|
|
|
|
import manager.STableManager;
|
|
import manager.Table;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
@Table(name ="GodSacrificeConfig")
|
|
public class SGodSacrificeConfig implements BaseConfig {
|
|
|
|
private int id;
|
|
|
|
private int activityId;
|
|
|
|
private int rewardType;
|
|
|
|
private int minRank;
|
|
|
|
private int maxRank;
|
|
|
|
private int[][] rankingReward;
|
|
|
|
private int basLineScore;
|
|
|
|
private int basLineRewardId;
|
|
|
|
private static Map<Integer, SGodSacrificeConfig> sGodSacrificeConfigMap;
|
|
|
|
private static Map<Integer,Map<Integer, List<SGodSacrificeConfig>>> integerListMap=new HashMap<>();
|
|
|
|
@Override
|
|
public void init() throws Exception {
|
|
sGodSacrificeConfigMap = STableManager.getConfig(SGodSacrificeConfig.class);
|
|
|
|
for (SGodSacrificeConfig sGodSacrificeConfig : sGodSacrificeConfigMap.values()) {
|
|
int activityId = sGodSacrificeConfig.getActivityId();
|
|
Map<Integer, List<SGodSacrificeConfig>> integerListHash = integerListMap.getOrDefault(sGodSacrificeConfig.getRewardType(),new HashMap<>());
|
|
|
|
if (!integerListHash.containsKey(activityId)) {
|
|
integerListHash.put(activityId, new ArrayList<>());
|
|
}
|
|
integerListHash.get(activityId).add(sGodSacrificeConfig);
|
|
|
|
integerListMap.put(sGodSacrificeConfig.getRewardType(),integerListHash);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public int getActivityId() {
|
|
return activityId;
|
|
}
|
|
|
|
public int getRewardType() {
|
|
return rewardType;
|
|
}
|
|
|
|
public int getMinRank() {
|
|
return minRank;
|
|
}
|
|
|
|
public int getMaxRank() {
|
|
return maxRank;
|
|
}
|
|
|
|
public int[][] getRankingReward() {
|
|
return rankingReward;
|
|
}
|
|
|
|
public int getBasLineScore() {
|
|
return basLineScore;
|
|
}
|
|
|
|
public int getBasLineRewardId() {
|
|
return basLineRewardId;
|
|
}
|
|
|
|
public static Map<Integer, SGodSacrificeConfig> getsGodSacrificeConfigMap() {
|
|
return sGodSacrificeConfigMap;
|
|
}
|
|
|
|
public static Map<Integer, Map<Integer, List<SGodSacrificeConfig>>> getIntegerListMap() {
|
|
return integerListMap;
|
|
}
|
|
|
|
} |