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

51 lines
1004 B
Java

package config;
import manager.STableManager;
import manager.Table;
import java.util.HashMap;
import java.util.Map;
@Table(name ="GoodLuck")
public class SGoodLuck implements BaseConfig {
private int id;
private int activityId;
private int[][] cost;
private int[][] reward;
public static Map<Integer,SGoodLuck> goodLuckMap;
@Override
public void init() throws Exception {
Map<Integer, SGoodLuck> config = STableManager.getConfig(SGoodLuck.class);
Map<Integer,SGoodLuck> goodLuckMapTemp = new HashMap<>(config.size());
for(Map.Entry<Integer, SGoodLuck> entry:config.entrySet()){
goodLuckMapTemp.put(entry.getValue().getActivityId(),entry.getValue());
}
goodLuckMap = goodLuckMapTemp;
}
public int getId() {
return id;
}
public int getActivityId() {
return activityId;
}
public int[][] getCost() {
return cost;
}
public int[][] getReward() {
return reward;
}
}