新礼包五星最后修改

back_recharge
mengchengzhen 2021-04-29 19:38:02 +08:00
parent 76abb2383a
commit 19d8c11012
2 changed files with 8 additions and 7 deletions

View File

@ -679,8 +679,8 @@ public class BuyGoodsNewLogic {
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.ALL_GIFTGOODS_INDICATION_VALUE, goodsBuild, true); MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.ALL_GIFTGOODS_INDICATION_VALUE, goodsBuild, true);
if(popup != 0){ if(popup != 0){
if(isFiveStarBag(popup)){ if(isFiveStarBag(popup)){
if(info.getTEMP_LIMIT()>0){ if(info.getTEMP_LIMIT()<info.FIVESTARLIMIT){
info.setTEMP_LIMIT(info.getTEMP_LIMIT() - 1); info.setTEMP_LIMIT(info.getTEMP_LIMIT() + 1);
PlayerInfoProto.PushWelfareResponse pushWelfareResponse = PlayerInfoProto.PushWelfareResponse.newBuilder().addId(popup).build(); PlayerInfoProto.PushWelfareResponse pushWelfareResponse = PlayerInfoProto.PushWelfareResponse.newBuilder().addId(popup).build();
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.PUSH_WELFARE_RESPONSE.getNumber(), pushWelfareResponse, true); MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.PUSH_WELFARE_RESPONSE.getNumber(), pushWelfareResponse, true);
} }
@ -807,7 +807,7 @@ public class BuyGoodsNewLogic {
return; return;
} }
info.setLastRefreshTime(System.currentTimeMillis()); info.setLastRefreshTime(System.currentTimeMillis());
info.setTEMP_LIMIT(2); info.setTEMP_LIMIT(0);
} }
//是否属于五星成长礼 //是否属于五星成长礼
@ -822,12 +822,12 @@ public class BuyGoodsNewLogic {
NewRechargeInfo info = user.getPlayerInfoManager().getNewRechargeInfo(); NewRechargeInfo info = user.getPlayerInfoManager().getNewRechargeInfo();
if(isFiveStarBag(bagId) && info.getPushMap().get(bagId) != null){ if(isFiveStarBag(bagId) && info.getPushMap().get(bagId) != null){
AbstractWelfareBag bag = info.getPushMap().get(bagId); AbstractWelfareBag bag = info.getPushMap().get(bagId);
bag.setLimit((bag.getLimit()+num)>info.getTEMP_LIMIT()?info.getTEMP_LIMIT():(bag.getLimit()+num)); bag.setLimit((bag.getLimit()+num)>info.FIVESTARLIMIT?info.FIVESTARLIMIT:(bag.getLimit()+num));
}else{ }else{
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.getConfigById(bagId); SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.getConfigById(bagId);
AbstractWelfareBag bag = initUnitWF(user,config); AbstractWelfareBag bag = initUnitWF(user,config);
if(num != 0 && num > info.getTEMP_LIMIT()){ if(num != 0 && num > info.FIVESTARLIMIT){
bag.setLimit(info.getTEMP_LIMIT()); bag.setLimit(info.FIVESTARLIMIT);
}else{ }else{
bag.setLimit(num); bag.setLimit(num);
} }

View File

@ -30,7 +30,8 @@ public class NewRechargeInfo extends MongoBase {
private long nextPushTime; //上次推送时间 private long nextPushTime; //上次推送时间
private long lastRefreshTime; private long lastRefreshTime;
private int TEMP_LIMIT = 2;//临时五星成长礼每天最多两次 private int TEMP_LIMIT = 0;
public static int FIVESTARLIMIT = 2;//临时五星成长礼每天最多两次
public boolean checkOneGoodsIsOverTimeByPrivilege(int privilegeId){ public boolean checkOneGoodsIsOverTimeByPrivilege(int privilegeId){