back_recharge
zhangshanxue 2020-03-06 13:24:08 +08:00
commit fad68b0002
2 changed files with 17 additions and 16 deletions

View File

@ -189,16 +189,13 @@ public class HeroLogic{
} }
if(sLotterySetting.getLotteryType()==3){ if(sLotterySetting.getLotteryType()==3){
//活动抽卡校验 //活动抽卡校验
Object[] activityStatusByType = ActivityLogic.getInstance().getActivityStatusByType(user, sLotterySetting.getActivityId()); if(!user.getActivityManager().getActivityMissionMap().containsKey(sLotterySetting.getActivityId())){
if(activityStatusByType.length!=1){
throw new ErrorCodeException(ErrorCode.ACTIVITY_NOT_OPEN); throw new ErrorCodeException(ErrorCode.ACTIVITY_NOT_OPEN);
} }
if(activityStatusByType[0] instanceof SGlobalActivity){ SGlobalActivity activity = SGlobalActivity.getsGlobalActivityMap().get(sLotterySetting.getActivityId());
SGlobalActivity activity = (SGlobalActivity)activityStatusByType[0]; long endTimeLong = ToolsUtil.getEndTimeLong(activity.getStartTimeLong(), activity.getEndTimeLong(), activity.getTime(), user.getPlayerInfoManager().getCreateTime(), activity.getGapTime());
long endTimeLong = ToolsUtil.getEndTimeLong(activity.getStartTimeLong(), activity.getEndTimeLong(), activity.getTime(), user.getPlayerInfoManager().getCreateTime(), activity.getGapTime()); if(TimeUtils.now()>endTimeLong){
if(TimeUtils.now()>endTimeLong){ throw new ErrorCodeException(ErrorCode.ACTIVITY_NOT_OPEN);
throw new ErrorCodeException(ErrorCode.ACTIVITY_NOT_OPEN);
}
} }
} }
//筛选卡池 //筛选卡池

View File

@ -292,16 +292,20 @@ public class PlayerLogic {
removePrivileges.add(vipInfoItem.getKey()); removePrivileges.add(vipInfoItem.getKey());
continue; 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); playerInfoManager.vipFlush(removePrivileges);
//vip刷新后才能发给前端
if(fBuilder!=null){
for(Map.Entry<Integer,VipInfo> 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); sendExpiredMail(uid,removePrivileges,2);