新礼包

back_recharge
mengchengzhen 2021-04-28 00:35:03 +08:00
parent 48cf68f620
commit 697f129301
2 changed files with 6 additions and 1 deletions

View File

@ -247,7 +247,7 @@ public class BuyGoodsNewLogic {
List<CommonProto.GiftGoodsInfo> goodsBagInfo = new ArrayList<>(SRechargeCommodityNewConfig.configMap.size());
boolean needChange = getGoodsBagInfo(uid, goodsBagInfo);
ISession session = OnlineUserManager.getSessionByUid(uid);
if(session!=null){
if(session!=null && needChange){
PlayerInfoProto.AllGiftGoodsIndication build = PlayerInfoProto.AllGiftGoodsIndication.newBuilder().addAllGiftGoodsInfo(goodsBagInfo).build();
MessageUtil.sendIndicationMessage(session,1, MessageTypeProto.MessageType.ALL_GIFTGOODS_INDICATION_VALUE,build,true);
}
@ -425,6 +425,10 @@ public class BuyGoodsNewLogic {
result = true;
}
}else{
if(bag.getType() == RechargeType.push.getType() && !bag.isOpen()){
user.getPlayerInfoManager().getNewRechargeInfo().removePush((PushWelfareBag) bag);
return true;
}
if(bag.getType() == RechargeType.timeLimit.getType()){//活动类型特殊处理
for(String[] I : bag.getCondition()){
if(I[0].equals("3")){

View File

@ -25,6 +25,7 @@ public class PushWelfareBag extends AbstractWelfareBag {
@Override
public boolean buy() {
setBuyTimes(getBuyTimes()+1);
setEndTime(System.currentTimeMillis());
setOpen(false);
return true;