判断宝镜
parent
1af2208ab8
commit
5dfcc37f29
|
@ -163,15 +163,19 @@ public class SituationLogic {
|
|||
boolean consumeCount = false;
|
||||
if(type==2){
|
||||
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);
|
||||
builder.setDrop(drop);
|
||||
consumeCount = true;
|
||||
}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();
|
||||
if(openRules!=0&&situationPass.get(sRaceTowerConfig.getType())>=openRules){
|
||||
if(openRules!=0&&situationPass.get(sRaceTowerConfig.getType())!=openRules){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
//编队规则校验
|
||||
|
|
Loading…
Reference in New Issue