判断宝镜

lvxinran 2020-08-15 20:24:41 +08:00
parent 1af2208ab8
commit 5dfcc37f29
1 changed files with 6 additions and 2 deletions

View File

@ -163,15 +163,19 @@ public class SituationLogic {
boolean consumeCount = false; boolean consumeCount = false;
if(type==2){ if(type==2){
if(!situationPass.containsKey(sRaceTowerConfig.getType())||situationPass.get(sRaceTowerConfig.getType())<id){ if(!situationPass.containsKey(sRaceTowerConfig.getType())||situationPass.get(sRaceTowerConfig.getType())<id){
throw new ErrorCodeException(ErrorCode.DAILY_ALREADY_PASS); throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
} }
CommonProto.Drop.Builder drop = ItemUtil.drop(user, sRaceTowerConfig.getReward(), 1, 0, BIReason.SITUATION_CHALLENGE_REWARD); CommonProto.Drop.Builder drop = ItemUtil.drop(user, sRaceTowerConfig.getReward(), 1, 0, BIReason.SITUATION_CHALLENGE_REWARD);
builder.setDrop(drop); builder.setDrop(drop);
consumeCount = true; consumeCount = true;
}else if(type==1){ }else if(type==1){
//判断本关是否已过
if(situationPass.containsKey(sRaceTowerConfig.getType())&&situationPass.get(sRaceTowerConfig.getType())>=id){
throw new ErrorCodeException(ErrorCode.DAILY_ALREADY_PASS);
}
// //判断上一关是否已过 // //判断上一关是否已过
int openRules = sRaceTowerConfig.getOpenRules(); int openRules = sRaceTowerConfig.getOpenRules();
if(openRules!=0&&situationPass.get(sRaceTowerConfig.getType())>=openRules){ if(openRules!=0&&situationPass.get(sRaceTowerConfig.getType())!=openRules){
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE); throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
} }
//编队规则校验 //编队规则校验