活动礼包刷新
parent
37d02a17c9
commit
941839a2c1
|
@ -37,4 +37,13 @@ public class TimeLimitWelfareBag extends AbstractWelfareBag {
|
||||||
public TimeLimitWelfareBag(int modId, int type, long startTime, long endTime, int limit, int dailyUpdate, int continueDays, boolean open, long lastBuyTime, int buyTimes, long refreshTime, int[] privilege, int timeType, String[][] condition, boolean isUserBuyRefresh,String mongoKey,int rootId) {
|
public TimeLimitWelfareBag(int modId, int type, long startTime, long endTime, int limit, int dailyUpdate, int continueDays, boolean open, long lastBuyTime, int buyTimes, long refreshTime, int[] privilege, int timeType, String[][] condition, boolean isUserBuyRefresh,String mongoKey,int rootId) {
|
||||||
super(modId, type, startTime, endTime, limit, dailyUpdate, continueDays, open, lastBuyTime, buyTimes, refreshTime, privilege, timeType, condition, isUserBuyRefresh,mongoKey,rootId);
|
super(modId, type, startTime, endTime, limit, dailyUpdate, continueDays, open, lastBuyTime, buyTimes, refreshTime, privilege, timeType, condition, isUserBuyRefresh,mongoKey,rootId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public boolean buy() {
|
||||||
|
SRechargeCommodityNewConfig commodityNewConfig = SRechargeCommodityNewConfig.getConfigById(getModId());
|
||||||
|
if(super.buy()){
|
||||||
|
setRefreshTime(TimeUtils.getTodayZero() + commodityNewConfig.getDailyUpdate() * TimeUtils.DAY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue