From 2cfe67afe4742ad8636b5f7184d5dcefe3fb2317 Mon Sep 17 00:00:00 2001 From: mengchengzhen <13682025901@163.com> Date: Tue, 27 Apr 2021 22:28:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=A4=BC=E5=8C=85=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E5=BC=B9=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 76fdc3a78..271075721 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 @@ -649,21 +649,24 @@ public class BuyGoodsNewLogic { if(list == null){ return; } + int popup = 0; for(SPackPushConfig con : list){ int bagId = judgePushCondition(user,con); if(bagId > 0 && info.getNextPushTime() < System.currentTimeMillis()){ + popup = bagId; info.setNextPushTime(System.currentTimeMillis() + con.getcDTime() * TimeUtils.HOUR); SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.getConfigById(bagId); initUnitWF(user,config); } } - List pushList = info.getPushList(); List goodsBagInfo = new ArrayList<>(SRechargeCommodityNewConfig.configMap.size()); getGoodsBagInfo(user.getId(), goodsBagInfo); PlayerInfoProto.AllGiftGoodsIndication goodsBuild = PlayerInfoProto.AllGiftGoodsIndication.newBuilder().addAllGiftGoodsInfo(goodsBagInfo).build(); MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.ALL_GIFTGOODS_INDICATION_VALUE, goodsBuild, true); - PlayerInfoProto.PushWelfareResponse pushWelfareResponse = PlayerInfoProto.PushWelfareResponse.newBuilder().addAllId(pushList).build(); - MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.PUSH_WELFARE_RESPONSE.getNumber(), pushWelfareResponse, true); + if(popup != 0){ + PlayerInfoProto.PushWelfareResponse pushWelfareResponse = PlayerInfoProto.PushWelfareResponse.newBuilder().addId(popup).build(); + MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.PUSH_WELFARE_RESPONSE.getNumber(), pushWelfareResponse, true); + } } private static int judgePushCondition(User user,SPackPushConfig con){