diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java
index ddaf97103..b2b26cfe6 100644
--- a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java
+++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java
@@ -66,6 +66,8 @@ import util.TimeUtils;
import util.CellUtil;
import java.util.*;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
public class MapLogic {
@@ -883,9 +885,6 @@ public class MapLogic {
if (dropBuilder != null) {
eventUpdateResponse.setDrop(dropBuilder);
}
-// LOGGER.info("updatePonintEvent =====>success<====== xy=>{}, getPointId=>{} eventId={}, mission=>{}, nextEventId=>{}, eventBehaviorCommon=>{} {} sOptionConfig.getReward()=>{}", mapManager.getCurXY(), cell == null ? 0 : cell.getPointId(),
-// cell == null ? 0 : cell.getEventId(), eventUpdateResponse.getMissionList(), nextEventId, eventBehaviorCommon,eventUpdateResponse.getDrop(), sOptionConfig.getReward());
-// LOGGER.info("updatEvent() uid=>{},nextEventId={},eventId={},mission=>{}", uid, nextEventId, cell == null ? 0 : cell.getEventId(), eventUpdateResponse.getMission());
MessageUtil.sendMessage(session, 1, messageType.getNumber(), eventUpdateResponse.build(), true);
}
@@ -1275,442 +1274,6 @@ public class MapLogic {
}
}
- /**
- * 快速战斗
- *
- * // * @param session
- * // * @param messageType
- */
-// public void fastFight(ISession session, MessageTypeProto.MessageType messageType) throws Exception {
-// int uid = session.getUid();
-// User user = UserManager.getUser(uid);
-// MapManager mapManager = user.getMapManager();
-// if (mapManager.getMapInfo() == null) {
-// LOGGER.info("fastFight mapManager.getMapInfo() == null");
-// throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
-// }
-// if (mapManager.getCanMoveTime() > 0) {
-// long leftTime = mapManager.getCanMoveTime() - TimeUtils.now();
-// if (leftTime > 0) {
-// throw new ErrorCodeException(ErrorCode.HERO_LIVE_AGAIN,Collections.singletonList((leftTime / 1000)+""));
-// }
-// }
-// Cell cell = mapManager.getMapInfo().get(mapManager.getTriggerXY());
-// if (cell == null) {
-// cell = mapManager.getMapInfo().get(mapManager.getCurXY());
-// if (cell == null) {
-// LOGGER.info("cell == null xy is wrong =>{} triggerXY=>{}", mapManager.getCurXY(), mapManager.getTriggerXY());
-// throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
-// }
-// }
-// int bigEventId = cell.getEventId();
-// SEventPointConfig sEventPointConfig = STableManager.getConfig(SEventPointConfig.class).get(bigEventId);
-// if (sEventPointConfig == null) {
-// LOGGER.info("sEventPointConfig == null");
-// throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
-// }
-// int[] option = sEventPointConfig.getOption();
-// if (option == null) {
-// LOGGER.info("option == null sEventPointConfig.getId()=>{}", sEventPointConfig.getId());
-// throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
-// }
-// int groupId = option[0];
-//
-// SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(user.getMapManager().getCurMapId());
-// int mostTime = sChallengeConfig.getMostTime();
-// PVEFightEvent pveFightEvent = new PVEFightEvent(uid, mapManager.getTeamId(), mostTime, "", GameFightType.MapFastFight, groupId, 3);
-// FightResult fightResult = FightDispatcher.dispatcher(pveFightEvent);
-// long[] checkResult = fightResult.getCheckResult();
-//
-// List remainHp = fightResult.getRemainHp();
-// //校验结果码 1:胜利
-// int resultCode = (int) checkResult[0];
-// if (resultCode == -1) {
-// throw new ErrorCodeException(ErrorCode.FIGHT_EXCEPTION);
-// }
-// int teamId = mapManager.getTeamId();
-// mapManager.setLastFightResult(resultCode);
-// if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4&&teamId==GlobalsDef.ENDLESS_TEAM){
-// mapManager.updateEndlessFightCount(1+mapManager.getEndlessMapInfo().getFightCount());
-// }
-// if (resultCode == 0) {
-// //todo 无尽副本不复活记得改回去
-// if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4) {
-//// //无尽副本复活消耗
-// reviveConsumeExecution(user);
-// for(Map.Entry> entry: mapManager.getHeroAllAttributeMap().entrySet()){
-// mapManager.updateHeroOneAttribute(entry.getKey(),HeroAttributeEnum.CurHP.getPropertyId(),0);
-// mapManager.updateEndlessHeroHp(entry.getKey(),0);
-// }
-// }else {
-// // 失败需要等待n秒后复活所有英雄
-// int dieCount = user.getMapManager().getDieCount();
-// dieCount++;
-// user.getMapManager().setDieCount(dieCount);
-// int[] reviveTime = sChallengeConfig.getReviveTime();
-// long time = (long) (MathUtils.calABX(dieCount, reviveTime) * 1000);
-// user.getMapManager().setCanMoveTime(TimeUtils.now() + time);
-// int leftTime = getLeftTime(user, true);
-// remainHp.clear();
-// if (leftTime <= (int) (time / 1000)) {
-// resetMapInfo(user, false);
-// } else {
-// initTeamInfo(mapManager.getTeamId(), uid, user, mapManager, 2);
-// List teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(mapManager.getTeamId());
-// for (TeamPosHeroInfo heroInfo : teamPosHeroInfos) {
-// Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId());
-// if (hero == null) {
-// continue;
-// }
-// Map heroAttributeMap = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero, false, teamId);
-// remainHp.add(heroAttributeMap.get(HeroAttributeEnum.CurHP.getPropertyId()));
-// }
-// }
-// }
-// CommonProto.Drop.Builder dropBuilder = CommonProto.Drop.newBuilder();
-// FightInfoProto.FastFightResponse build = FightInfoProto.FastFightResponse
-// .newBuilder()
-// .setResult(resultCode)
-// .setEnventDrop(dropBuilder)
-//// .addAllRemainHpList(remainHp)
-// .setEssenceValue(mapManager.getTrialInfo().getEnergy())
-// .setLastXY(mapManager.getLastXY())
-// .build();
-// mapManager.setCurXY(mapManager.getLastXY());
-// MessageUtil.sendMessage(session, 1, messageType.getNumber(), build, true);
-// return;
-//
-// }
-// List team = user.getTeamPosManager().getTeamPosForHero().get(teamId);
-// if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4&&teamId==GlobalsDef.ENDLESS_TEAM){
-// for (int i = 0 ; i heroAllAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero,false,teamId);
-// int per = (int)(checkResult[i+2] / (double) heroAllAttribute.get(HeroAttributeEnum.Hp.getPropertyId())*10000);
-// if(checkResult[i+2]>0&&per<=0){
-// per = 1;
-// }
-// mapManager.updateEndlessHeroHp(team.get(i).getHeroId(),per);
-// mapManager.updateHeroOneAttribute(team.get(i).getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), (int) checkResult[i+2]);
-// }
-//
-// }else{
-// for (TeamPosHeroInfo teamPosHeroInfo : team) {
-// mapManager.updateHeroOneAttribute(teamPosHeroInfo.getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), (int) checkResult[teamPosHeroInfo.getPosition()+1]);
-// }
-// }
-//
-// int destoryXY = mapManager.getTriggerXY();
-//// if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4) {
-//// endlessRefreshMonster(session,destoryXY);
-//// }
-// //删点之前进行查找
-// if (sChallengeConfig.getType() == 2) {
-// STrialConfig sTrialConfig = STrialConfig.sTrialConfigMap.get(mapManager.getTrialInfo().getFloor());
-// if(cell.getCellId()!=mapManager.getBossXY()){
-// if(mapManager.getTrialInfo().getEnergy()!=-1){
-// mapManager.setTrialEnergy(mapManager.getTrialInfo().getEnergy() + sTrialConfig.getNormalEnergy());
-// }
-// }
-// }
-// BehaviorUtil.destoryApointXY(user, destoryXY);
-// SMonsterGroup sMonsterGroup = SMonsterGroup.getsMonsterGroupMap().get(groupId);
-// CommonProto.Drop.Builder drop = ItemUtil.drop(user, sMonsterGroup.getRewardgroup(), 1, 0, BIReason.MAP_FAST_FIGHT_REWARD);
-// FightInfoProto.FastFightResponse.Builder fastFightResponse = FightInfoProto.FastFightResponse.newBuilder();
-//
-// if (mapManager.getMonsterId() > 0) {
-// BaseBehavior baseBehavior = baseBehaviorMap.get(10);
-// baseBehavior.afterFastFight(user, groupId, fastFightResponse);
-// }
-// fastFightResponse.setEnventDrop(drop.build());
-// fastFightResponse.setResult(resultCode);
-//// fastFightResponse.addAllRemainHpList(remainHp);
-// fastFightResponse.setEssenceValue(mapManager.getTrialInfo().getEnergy());
-// fastFightResponse.build();
-//
-//
-// fastFightResponse.setEssenceValue(mapManager.getTrialInfo().getEnergy());
-//// LOGGER.info("endFight() uid=>{},nextEventId=>{}", uid, nextEventId);
-// MapMissionManager.updateMapMission(user, EventType.fightEvent, groupId, (int) checkResult[1]);
-//// LOGGER.info("endFight() uid=>{} sMonsterGroup.getRewardgroup()=>{} misson=>{} eventDrop=>{}, missionDrop=>{}", uid, sMonsterGroup.getRewardgroup(), fastFightResponse.getMission(), fastFightResponse.getEnventDrop(), fastFightResponse.getMissionDrop());
-// MessageUtil.sendMessage(session, 1, messageType.getNumber(), fastFightResponse.build(), true);
-// }
-
-// /**
-// * 开始战斗
-// *
-// * @param session
-// * @param messageType
-// */
-// public void startFight(ISession session, MessageTypeProto.MessageType messageType) throws Exception {
-// int uid = session.getUid();
-// User user = UserManager.getUser(uid);
-// MapManager mapManager = user.getMapManager();
-// if (mapManager.getMapInfo() == null) {
-// LOGGER.info("mapManager.getMapInfo() == null");
-// throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
-// }
-// if (mapManager.getCanMoveTime() > 0) {
-// long leftTime = mapManager.getCanMoveTime() - TimeUtils.now();
-// if (leftTime > 0) {
-// throw new ErrorCodeException(ErrorCode.HERO_LIVE_AGAIN,Collections.singletonList((leftTime / 1000)+""));
-// }
-// }
-// Cell cell = mapManager.getMapInfo().get(mapManager.getTriggerXY());
-// if (cell == null) {
-// cell = mapManager.getMapInfo().get(mapManager.getCurXY());
-// if (cell == null) {
-// LOGGER.info("cell == null xy is wrong =>{} triggerXY=>{}", mapManager.getCurXY(), mapManager.getTriggerXY());
-// throw new ErrorCodeException(ErrorCode.newDefineCode("cell == null"));
-// }
-// }
-// int bigEventId = cell.getEventId();
-// SEventPointConfig sEventPointConfig = STableManager.getConfig(SEventPointConfig.class).get(bigEventId);
-// if (sEventPointConfig == null) {
-// LOGGER.info("sEventPointConfig == null");
-// throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
-// }
-// String fightReadyKey = RedisKey.getKey(RedisKey.FIGHT_READY, Integer.toString(uid), false);
-// String fightReady = (String) RedisUtil.getInstence().get(fightReadyKey);
-// int groupId;
-// String pointId = "0";
-// if (fightReady != null) {
-// String[] split = fightReady.split("#");
-// RedisUtil.getInstence().del(fightReadyKey);
-// groupId = Integer.parseInt(split[0]);
-// if(getDifficultyMonster().containsKey(groupId)){
-// groupId = getDifficultyMonster().get(groupId);
-// }
-// if (split.length > 1) {
-// pointId = split[1];
-// }
-// } else {
-// int[] option = sEventPointConfig.getOption();
-// if (option == null||option.length<1) {
-// LOGGER.info("option == null sEventPointConfig.getId()=>{}", sEventPointConfig.getId());
-// throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
-// }
-// groupId = option[0];
-// if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4) {
-// if(getDifficultyMonster().containsKey(groupId)){
-// groupId = getDifficultyMonster().get(groupId);
-// }
-// }
-// }
-// FightInfoProto.FightStartResponse.Builder fightStartResponse = FightInfoProto.FightStartResponse.newBuilder();
-// SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId());
-// LOGGER.info("EventId为{},groupId为{}",bigEventId,groupId);
-// BehaviorUtil.getFightInfo(user, groupId, fightStartResponse, pointId, sChallengeConfig.getMostTime(), true);
-// MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightStartResponse.build(), true);
-// }
-
-
-// public void endFight(ISession session, String frames, MessageTypeProto.MessageType messageType,int dropout) throws Exception {
-// int uid = session.getUid();
-// User user = UserManager.getUser(uid);
-// String key = RedisKey.getKey(RedisKey.FIGHT, Integer.toString(uid), false);
-// Map