68 lines
1.3 KiB
Java
68 lines
1.3 KiB
Java
package config;
|
|
|
|
import manager.STableManager;
|
|
import manager.Table;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
@Table(name ="WishConfig")
|
|
public class SWishConfig implements BaseConfig {
|
|
|
|
private int id;
|
|
|
|
private int level;
|
|
|
|
private int lotteryType;
|
|
|
|
private int drawCardNumber;
|
|
|
|
private int[][] reward;
|
|
|
|
private int weight;
|
|
|
|
private int mythWeight;
|
|
|
|
public static Map<Integer, SWishConfig> map;
|
|
|
|
public static Map<Integer, Map<Integer, SWishConfig>> typeMap = new HashMap<>();
|
|
|
|
@Override
|
|
public void init() throws Exception {
|
|
map = STableManager.getConfig(SWishConfig.class);
|
|
for (SWishConfig value : map.values()) {
|
|
Map<Integer, SWishConfig> configMap = typeMap.getOrDefault(value.getLotteryType(), new HashMap<>());
|
|
configMap.put(value.id,value);
|
|
typeMap.put(value.getLotteryType(), configMap);
|
|
}
|
|
}
|
|
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public int getLevel() {
|
|
return level;
|
|
}
|
|
|
|
public int getLotteryType() {
|
|
return lotteryType;
|
|
}
|
|
|
|
public int getDrawCardNumber() {
|
|
return drawCardNumber;
|
|
}
|
|
|
|
public int[][] getReward() {
|
|
return reward;
|
|
}
|
|
|
|
public int getWeight() {
|
|
return weight;
|
|
}
|
|
|
|
public int getMythWeight() {
|
|
return mythWeight;
|
|
}
|
|
} |