From 697f1293018c633510813eabce9f11f6a8dacb0a Mon Sep 17 00:00:00 2001 From: mengchengzhen <13682025901@163.com> Date: Wed, 28 Apr 2021 00:35:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=A4=BC=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java | 6 +++++- .../logic/store/newRechargeInfo/bean/PushWelfareBag.java | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java index 6bf26023c..27ac98cd9 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java @@ -247,7 +247,7 @@ public class BuyGoodsNewLogic { List 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")){ diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/newRechargeInfo/bean/PushWelfareBag.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/newRechargeInfo/bean/PushWelfareBag.java index a57aeb48d..d3db4f85b 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/newRechargeInfo/bean/PushWelfareBag.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/newRechargeInfo/bean/PushWelfareBag.java @@ -25,6 +25,7 @@ public class PushWelfareBag extends AbstractWelfareBag { @Override public boolean buy() { + setBuyTimes(getBuyTimes()+1); setEndTime(System.currentTimeMillis()); setOpen(false); return true;