From 435ed56a0f2fc1d572f4cc68e31e2e8a2a0ae167 Mon Sep 17 00:00:00 2001 From: lvxinran Date: Tue, 3 Mar 2020 05:04:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=89=B9=E6=9D=83=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E5=85=88=E5=90=8E=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jieling/logic/player/PlayerLogic.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/player/PlayerLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/player/PlayerLogic.java index e063fc6fd..5f166ce39 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/player/PlayerLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/player/PlayerLogic.java @@ -292,16 +292,20 @@ public class PlayerLogic { removePrivileges.add(vipInfoItem.getKey()); continue; } - privilegeList.add(CommonProto.Privilege.newBuilder() - .setId(vipInfoItem.getKey()) - . setUsedTimes(vipInfoItem.getValue().getCount()) - .setEffectTime(vipInfoItem.getValue().getEffectTime()) - .build()); - } - if(fBuilder!=null){ - fBuilder.setHadTakeDailyBox(playerInfoManager.getHadTakeDailyBoxVip()).addAllPrivilege(privilegeList); } playerInfoManager.vipFlush(removePrivileges); + //vip刷新后才能发给前端 + if(fBuilder!=null){ + for(Map.Entry vipInfoItem : vipInfo.entrySet()){ + privilegeList.add(CommonProto.Privilege.newBuilder() + .setId(vipInfoItem.getKey()) + . setUsedTimes(vipInfoItem.getValue().getCount()) + .setEffectTime(vipInfoItem.getValue().getEffectTime()) + .build()); + } + fBuilder.setHadTakeDailyBox(playerInfoManager.getHadTakeDailyBoxVip()) + .addAllPrivilege(privilegeList); + } sendExpiredMail(uid,removePrivileges,2); From 4b09df7f4f1fdac4b46cc23ff1393cd92b728adc Mon Sep 17 00:00:00 2001 From: lvxinran Date: Fri, 6 Mar 2020 18:37:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=9C=E6=B5=B7=E5=AF=BB=E4=BB=99?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ljsd/jieling/logic/hero/HeroLogic.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java index 91a0f9c4a..979226c65 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java @@ -189,16 +189,13 @@ public class HeroLogic{ } if(sLotterySetting.getLotteryType()==3){ //活动抽卡校验 - Object[] activityStatusByType = ActivityLogic.getInstance().getActivityStatusByType(user, sLotterySetting.getActivityId()); - if(activityStatusByType.length!=1){ + if(!user.getActivityManager().getActivityMissionMap().containsKey(sLotterySetting.getActivityId())){ throw new ErrorCodeException(ErrorCode.ACTIVITY_NOT_OPEN); } - if(activityStatusByType[0] instanceof SGlobalActivity){ - SGlobalActivity activity = (SGlobalActivity)activityStatusByType[0]; - long endTimeLong = ToolsUtil.getEndTimeLong(activity.getStartTimeLong(), activity.getEndTimeLong(), activity.getTime(), user.getPlayerInfoManager().getCreateTime(), activity.getGapTime()); - if(TimeUtils.now()>endTimeLong){ - throw new ErrorCodeException(ErrorCode.ACTIVITY_NOT_OPEN); - } + SGlobalActivity activity = SGlobalActivity.getsGlobalActivityMap().get(sLotterySetting.getActivityId()); + long endTimeLong = ToolsUtil.getEndTimeLong(activity.getStartTimeLong(), activity.getEndTimeLong(), activity.getTime(), user.getPlayerInfoManager().getCreateTime(), activity.getGapTime()); + if(TimeUtils.now()>endTimeLong){ + throw new ErrorCodeException(ErrorCode.ACTIVITY_NOT_OPEN); } } //筛选卡池