周卡月卡调整,兼容老版本月卡,四版

duhui 2022-06-17 11:25:19 +08:00
parent 5f6e0ff20a
commit 8c928fd864
1 changed files with 9 additions and 5 deletions

View File

@ -1680,14 +1680,18 @@ public class PlayerLogic {
endTime = startTime + monthcardConfig.getContiueDays() * 24 * 60 * 60;
}
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.getConfigById(monthcardConfig.getPrice());
RechargeHandler rechargeHandler = BuyGoodsNewLogic.getRechargeHandler(config.getOtype());
AbstractWelfareBag bag = rechargeHandler.getRechargeMap(user).get(config.getId());
int state = 0;
if (bag != null && !bag.checkBuy()){
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.getConfigById(monthcardConfig.getPrice());
if (config == null){
RechargeHandler rechargeHandler = BuyGoodsNewLogic.getRechargeHandler(config.getOtype());
AbstractWelfareBag bag = rechargeHandler.getRechargeMap(user).get(config.getId());
if (bag != null && !bag.checkBuy()){
state = playerInfoManager.getMonthCardDailyTake().contains(monthcardConfig.getId())?2:1;
}
}else {
state = playerInfoManager.getMonthCardDailyTake().contains(monthcardConfig.getId())?2:1;
}
cardInfos.add(CommonProto.MonthCardInfo.newBuilder().setId(monthcardConfig.getId()).setEndingTime(endTime).setState(state).setTotleAmt(0).build());
}
return cardInfos;