活动礼包刷新

back_recharge
lvxinran 2021-07-15 00:11:47 +08:00
parent 37d02a17c9
commit 941839a2c1
1 changed files with 9 additions and 0 deletions

View File

@ -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;
}
} }