线程加入try catch

lvxinran 2020-08-23 07:02:27 +08:00
parent 20a0adb7fe
commit c0126ead43
1 changed files with 14 additions and 10 deletions

View File

@ -72,16 +72,20 @@ public class SituationLogic {
runnable.run(); runnable.run();
} }
private void checkStatus(){ private void checkStatus(){
if(status==null||overTime==null||openConfig==null){ try{
status = new int[4]; if(status==null||overTime==null||openConfig==null){
openConfig = SSpecialConfig.getTwiceArrayValue(SSpecialConfig.XUANYUAN_OPEN_TIME); status = new int[4];
overTime = new int[4]; openConfig = SSpecialConfig.getTwiceArrayValue(SSpecialConfig.XUANYUAN_OPEN_TIME);
doCheck(); overTime = new int[4];
}else{ doCheck();
if(TimeUtils.getHourOfDay()!=5){ }else{
return; if(TimeUtils.getHourOfDay()!=5){
return;
}
doCheck();
} }
doCheck(); }catch (Exception e){
e.printStackTrace();
} }
} }
private void doCheck(){ private void doCheck(){
@ -285,7 +289,7 @@ public class SituationLogic {
User userInMem = UserManager.getUserInMem(pveFightEvent.getAttackUid()); User userInMem = UserManager.getUserInMem(pveFightEvent.getAttackUid());
CommonProto.FightTeamInfo fightTeamInfo = FightUtil.getFightTeamInfoWithSomeBuff(userInMem, pveFightEvent.getTeamId(),pveFightEvent.getAttackBloodMap(),buffInfo); CommonProto.FightTeamInfo fightTeamInfo = FightUtil.getFightTeamInfoWithSomeBuff(userInMem, pveFightEvent.getTeamId(),pveFightEvent.getAttackBloodMap(),buffInfo);
int fightSeed = FightUtil.getFightSeed(); int fightSeed = FightUtil.getFightSeed();
List<CommonProto.FightTeamInfo> monsterfightTeamInfos = FightUtil.makeMonsterFightData(pveFightEvent.getMonsterGroupId(), pveFightEvent.getNums()); List<CommonProto.FightTeamInfo> monsterfightTeamInfos = FightUtil.makeMonsterFightData(pveFightEvent.getMonsterGroupId(), pveFightEvent.getNums(),null);
LuaValue getFightData = FightDataUtil.getFinalFightData(fightTeamInfo, monsterfightTeamInfos); LuaValue getFightData = FightDataUtil.getFinalFightData(fightTeamInfo, monsterfightTeamInfos);
LuaValue getOptionData = FightDataUtil.getOptionData(pveFightEvent.getAttackUid()+""); LuaValue getOptionData = FightDataUtil.getOptionData(pveFightEvent.getAttackUid()+"");
int[] fightResult = CheckFight.getInstance().checkFight(fightSeed, fightEvent.getMostTime(), getFightData, getOptionData, fightEvent.getFightType().getFightType()); int[] fightResult = CheckFight.getInstance().checkFight(fightSeed, fightEvent.getMostTime(), getFightData, getOptionData, fightEvent.getFightType().getFightType());