51 lines
1.0 KiB
Java
51 lines
1.0 KiB
Java
package config;
|
|
|
|
import manager.STableManager;
|
|
import manager.Table;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
@Table(name ="LuxuryFund")
|
|
public class SLuxuryFund implements BaseConfig {
|
|
|
|
private int id;
|
|
|
|
private int type;
|
|
|
|
private int day;
|
|
|
|
private int[][] reward;
|
|
|
|
/**
|
|
* key: type value: < key: day value: SLuxuryFund对象 >
|
|
*/
|
|
public static Map<Integer,Map<Integer,SLuxuryFund>> typeMap = new HashMap<>();
|
|
|
|
@Override
|
|
public void init() throws Exception {
|
|
Map<Integer, SLuxuryFund> config = STableManager.getConfig(SLuxuryFund.class);
|
|
config.values().forEach(v->{
|
|
Map<Integer, SLuxuryFund> fundMap = typeMap.getOrDefault(v.getType(), new HashMap<>());
|
|
fundMap.put(v.getId(),v);
|
|
typeMap.put(v.getType(),fundMap);
|
|
});
|
|
}
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public int getType() {
|
|
return type;
|
|
}
|
|
|
|
public int getDay() {
|
|
return day;
|
|
}
|
|
|
|
public int[][] getReward() {
|
|
return reward;
|
|
}
|
|
|
|
} |