79 lines
1.6 KiB
Java
79 lines
1.6 KiB
Java
package config;
|
|
|
|
import manager.STableManager;
|
|
import manager.Table;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
@Table(name ="EveryDayGift")
|
|
public class SEveryDayGift implements BaseConfig {
|
|
|
|
private int id;
|
|
|
|
private int globalActivity;
|
|
|
|
private int rechargeID;
|
|
|
|
private int[][] condition;
|
|
|
|
private int probability;
|
|
|
|
private int limit;
|
|
|
|
private int maxLimit;
|
|
|
|
private int itemID;
|
|
|
|
public static Map<Integer, SEveryDayGift> map = new HashMap<>();
|
|
|
|
public static Map<Integer, Map<Integer, SEveryDayGift>> activitymap = new HashMap<>();
|
|
|
|
public static Map<Integer, Map<Integer, SEveryDayGift>> activitygiftmap = new HashMap<>();
|
|
|
|
@Override
|
|
public void init() throws Exception {
|
|
map = STableManager.getConfig(SEveryDayGift.class);
|
|
for (SEveryDayGift value : map.values()) {
|
|
activitymap.putIfAbsent(value.getGlobalActivity(), new HashMap<>());
|
|
activitymap.get(value.getGlobalActivity()).put(value.getId(), value);
|
|
|
|
activitygiftmap.putIfAbsent(value.getGlobalActivity(), new HashMap<>());
|
|
activitygiftmap.get(value.getGlobalActivity()).put(value.getRechargeID(), value);
|
|
}
|
|
}
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public int getGlobalActivity() {
|
|
return globalActivity;
|
|
}
|
|
|
|
public int getRechargeID() {
|
|
return rechargeID;
|
|
}
|
|
|
|
public int[][] getCondition() {
|
|
return condition;
|
|
}
|
|
|
|
public int getProbability() {
|
|
return probability;
|
|
}
|
|
|
|
public int getLimit() {
|
|
return limit;
|
|
}
|
|
|
|
public int getMaxLimit() {
|
|
return maxLimit;
|
|
}
|
|
|
|
public int getItemID() {
|
|
return itemID;
|
|
}
|
|
|
|
|
|
} |