日常本修改

lvxinran 2020-06-25 20:14:51 +08:00
parent b36466de0b
commit beb23ae312
2 changed files with 16 additions and 19 deletions

View File

@ -3075,21 +3075,20 @@ public class MapLogic {
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}
}
int[][] openRules = sDailyChallengeConfig.getOpenRules();
for(int[] rule:openRules){
boolean open = true;
switch (rule[0]){
case 1:
open = playerInfoManager.getLevel()>=rule[1];
break;
case 2:
open = SMainLevelConfig.biggerThanFight(user.getMainLevelManager().getFightId(),rule[1]);
break;
}
if(!open){
throw new ErrorCodeException(ErrorCode.DAILY_NO_OPEN);
}
int[] openRules = sDailyChallengeConfig.getOpenRules();
boolean open = true;
switch (openRules[0]){
case 1:
open = playerInfoManager.getLevel()>=openRules[1];
break;
case 2:
open = SMainLevelConfig.biggerThanFight(user.getMainLevelManager().getFightId(),openRules[1]);
break;
}
if(!open){
throw new ErrorCodeException(ErrorCode.DAILY_NO_OPEN);
}
PVEFightEvent pveFightEvent = new PVEFightEvent(user.getId(), GlobalsDef.FORMATION_NORMAL, 1000, "", GameFightType.DailyChallenge, sDailyChallengeConfig.getMonsterId(), 3);
@ -3249,6 +3248,7 @@ public class MapLogic {
for(int id:ids){
idList.add(id);
}
BehaviorUtil.destoryCurPoint(user);
MapInfoProto.MapGameResponse response = MapInfoProto.MapGameResponse.newBuilder().setType(mapGameInfo.getType()).addAllParam(idList).build();
MessageUtil.sendMessage(session,1,messageType.getNumber(),response,true);
}
@ -3275,9 +3275,6 @@ public class MapLogic {
if(response==null){
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}
if(response.getGameStatus()==0){
BehaviorUtil.destoryCurPoint(user);
}
MessageUtil.sendMessage(session,1,messageType.getNumber(),response,true);
}
}

View File

@ -12,7 +12,7 @@ public class SDailyChallengeConfig implements BaseConfig {
private int type;
private int[][] openRules;
private int[] openRules;
private int[] reward;
@ -35,7 +35,7 @@ public class SDailyChallengeConfig implements BaseConfig {
return type;
}
public int[][] getOpenRules() {
public int[] getOpenRules() {
return openRules;
}