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 ="TrialGameConfig") public class STrialGameConfig implements BaseConfig { private int id; private int type; private int rewardID; private int weight; private int min; private int max; private int unlockLv; public static Map trialGameConfigMap; public static Map> trialGameMapByType; @Override public void init() throws Exception { trialGameConfigMap = STableManager.getConfig(STrialGameConfig.class); Map> tempMap = new HashMap<>(); for(Map.Entry entry:trialGameConfigMap.entrySet()){ tempMap.computeIfAbsent(entry.getValue().getType(),n->new ArrayList<>()).add(entry.getValue()); } trialGameMapByType = tempMap; } public int getId() { return id; } public int getType() { return type; } public int getRewardID() { return rewardID; } public int getWeight() { return weight; } public int getMin() { return min; } public int getMax() { return max; } public int getUnlockLv() { return unlockLv; } }