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 5a937858d..a4202d370 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 @@ -456,6 +456,7 @@ public class MapLogic { int[][] behaviorTypeValues = sOptionConfig.getBehaviorTypeValues(); BaseBehavior baseBehavior = baseBehaviorMap.get(behaviorType); MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse = MapInfoProto.EventUpdateResponse.newBuilder(); + int targetEventId = cell.getEventId(); if (baseBehavior != null) { boolean isSuccess = baseBehavior.process(user, behaviorTypeValues, eventUpdateResponse); if (!isSuccess) { @@ -524,9 +525,11 @@ public class MapLogic { else if (cell != null && nextEventId != 0) { cell.setEventId(nextEventId); mapManager.addOrUpdateCell(mapManager.getCurXY(), cell); - updateMapMission(mapManager,EventType.updateEvent, cell.getEventId(),0); - updateMapMission(mapManager,EventType.updateEvent, pointId,0); + targetEventId = nextEventId; } + + updateMapMission(mapManager,EventType.updateEvent, targetEventId,0); + updateMapMission(mapManager,EventType.updateEvent, pointId,0); if (behaviorType == EventType.dun && eventUpdateResponse.getMissionCount() > 0) { for (CommonProto.Mission missionProto : eventUpdateResponse.getMissionList()) { Mission mission = user.getMissionManager().getDoingMissions().get(missionProto.getItemId()); @@ -562,6 +565,7 @@ public class MapLogic { // LOGGER.info("updateEvent =====>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()); saveRefreshInfo(pointId, mapManager, mapPointConfig, nextEventId); + LOGGER.info("updatemap() uid=>{},nextEventId={},eventId={}", uid, nextEventId, cell == null ? 0 : cell.getEventId()); MessageUtil.sendMessage(session, 1, messageType.getNumber(), eventUpdateResponse.build(), true); } @@ -937,6 +941,7 @@ public class MapLogic { updateMapMission(user.getMapManager(),EventType.updateEvent,cell.getEventId(),0); } } + LOGGER.info("endFight() uid=>{},nextEventId", uid, nextEventId); updateMapMission(user.getMapManager(),EventType.fightEvent,0,monsterGroupId); // LOGGER.info("endFight() uid=>{} sMonsterGroup.getRewardgroup()=>{} drop=>{}", uid, sMonsterGroup.getRewardgroup(), fightEndResponse.getDrop()); MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightEndResponse.build(), true);