容错代码添加,心魔打点修改

back_recharge
lvxinran 2020-10-26 17:25:52 +08:00
parent 2cf701c6eb
commit 40f12ac7b6
3 changed files with 25 additions and 17 deletions

View File

@ -1779,18 +1779,15 @@ public class MapLogic {
crossInfo.getHeroIds().add(hero.getTemplateId());
}
List<TeamPosForPokenInfo> teamPosForPokenInfos = user.getTeamPosManager().getTeamPosForPoken().get(mapManager.getTeamId());
if (teamPosForPokenInfos != null) {
// 异妖
crossInfo.getPokemons().clear();
for (TeamPosForPokenInfo teamPosForPokenInfo : teamPosForPokenInfos) {
Pokemon pokemon = user.getPokemonManager().getPokemonMap().get(teamPosForPokenInfo.getPokenId());
if (pokemon == null) {
continue;
}
crossInfo.getPokemons().add(pokemon.getId());
}
}
// List<TeamPosForPokenInfo> teamPosForPokenInfos = user.getTeamPosManager().getTeamPosForPoken().get(mapManager.getTeamId());
// if (teamPosForPokenInfos != null) {
// // 异妖
// crossInfo.getPokemons().clear();
// for (TeamPosForPokenInfo teamPosForPokenInfo : teamPosForPokenInfos) {
// Pokemon pokemon = user.getPokemonManager().getPokemonMap().get(teamPosForPokenInfo.getPokenId());
//// crossInfo.getPokemons().add(pokemon.getId());
// }
// }
crossInfo.setForces(heroForces);
SChallengeMapConfig sChallengeMapConfig = STableManager.getConfig(SChallengeMapConfig.class).get(mapManager.getCurMapId());
@ -2373,7 +2370,7 @@ public class MapLogic {
List<Integer> itemNumList = new ArrayList<>();
itemDrop.forEach(item->{
itemIdList.add(item.getItemId());
itemIdList.add(item.getItemNum());
itemNumList.add(item.getItemNum());
});
ReportUtil.onReportEvent(user,ReportEventEnum.COMPLETE_XINMO.getType(),checkFightId,sFloodConfig.getMonster(),MonsterUtil.getMonsterForce(new int[]{sFloodConfig.getMonster()}),new Date(),"",itemIdList,itemNumList,"成功");
}

View File

@ -72,14 +72,13 @@ public class EndlessMap extends AbstractMap{
}
EndlessMapInfo endlessMapInfo = mapManager.getEndlessMapInfo();
//是否是新的周期
TimeControllerOfFunction openTimeOfFuntionCacheByType = GlobalDataManaager.getInstance().getOpenTimeOfFuntionCacheByType(FunctionIdEnum.Endless);
if(endlessMapInfo.getSeason()!=openTimeOfFuntionCacheByType.getTimes()){
if(endlessMapInfo.getSeason()!=MapLogic.endlessSeason){
TimeControllerOfFunction openTimeOfFuntionCacheByType = GlobalDataManaager.getInstance().getOpenTimeOfFuntionCacheByType(FunctionIdEnum.Endless);
// StoreLogic.initOnsStoereWithTime(user, SEndlessMapConfig.sEndlessMapConfigMap.get(4001).getMapStoreId(),openTimeOfFuntionCacheByType.getStartTime(),openTimeOfFuntionCacheByType.getEndTime());
mapManager.updateEndlessSeason(openTimeOfFuntionCacheByType.getTimes());
mapManager.updateEndlessSeason(MapLogic.endlessSeason);
mapManager.updateEndlessMapId(0);
mapManager.endlessWalkCellSave(new HashSet<>());
mapManager.endlessMapInfoSave(new HashMap<>());
mapManager.setWalkCells(new HashSet<>());
//清除当前副本信息
//新创建地图
@ -131,6 +130,12 @@ public class EndlessMap extends AbstractMap{
}
mapManager.setCurMapType(type);
// mapEnterResponse.addHeroInfos();
//容错代码
if(mapManager.getCurXY()==0){
SChallengeMapConfig challengeMapConfig = STableManager.getConfig(SChallengeMapConfig.class).get(mapManager.getCurMapId());
int xy = CellUtil.xy2Pos(challengeMapConfig.getPosition()[0], challengeMapConfig.getPosition()[1]);
mapManager.setCurXY(xy);
}
mapEnterResponse.setCurXY(mapManager.getCurXY());
mapEnterResponse.addAllMapList(cells);
mapEnterResponse.addAllWakeCells(mapManager.getWalkCells() == null ? new ArrayList<>() : mapManager.getWalkCells());

View File

@ -145,6 +145,12 @@ public class TowerMap extends AbstractMap {
mapManager.setCurMapId(sTrialConfig.getMapId());
}
mapEnterResponse.setMapId(mapManager.getCurMapId());
if(mapManager.getCurXY()==0){
//容错代码
SChallengeMapConfig challengeMapConfig = STableManager.getConfig(SChallengeMapConfig.class).get(mapManager.getCurMapId());
int xy = CellUtil.xy2Pos(challengeMapConfig.getPosition()[0], challengeMapConfig.getPosition()[1]);
mapManager.setCurXY(xy);
}
mapEnterResponse.setCurXY(mapManager.getCurXY());
// MapInfoProto.TowerCopyInfo towerCopyInfo = MapInfoProto.TowerCopyInfo.newBuilder()
// .setTower(mapManager.getTrialInfo().getFloor())