56 lines
1.1 KiB
Java
56 lines
1.1 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;
|
||
|
|
||
|
private static Map<Integer,SLuxuryFund> sLuxuryFundByFoundAndDay;
|
||
|
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public void init() throws Exception {
|
||
|
Map<Integer, SLuxuryFund> config = STableManager.getConfig(SLuxuryFund.class);
|
||
|
Map<Integer,SLuxuryFund> sLuxuryFundByFoundAndDayTmp = new HashMap<>();
|
||
|
config.values().forEach(sLuxuryFund->{
|
||
|
sLuxuryFundByFoundAndDayTmp.put(sLuxuryFund.getType()*100 + sLuxuryFund.getDay(),sLuxuryFund);
|
||
|
});
|
||
|
sLuxuryFundByFoundAndDay = sLuxuryFundByFoundAndDayTmp;
|
||
|
}
|
||
|
|
||
|
public static SLuxuryFund getByFoundIdAndDay(int foundId,int day){
|
||
|
return sLuxuryFundByFoundAndDay.get(foundId*100+day);
|
||
|
}
|
||
|
|
||
|
|
||
|
public int getId() {
|
||
|
return id;
|
||
|
}
|
||
|
|
||
|
public int getType() {
|
||
|
return type;
|
||
|
}
|
||
|
|
||
|
public int getDay() {
|
||
|
return day;
|
||
|
}
|
||
|
|
||
|
public int[][] getreward() {
|
||
|
return reward;
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|