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 map; public static Map> typeMap = new HashMap<>(); @Override public void init() throws Exception { map = STableManager.getConfig(SWishConfig.class); for (SWishConfig value : map.values()) { Map 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; } }