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 7f24f1942..d9384e96e 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 @@ -96,16 +96,10 @@ public class MapLogic { } List cells = new ArrayList<>(mapManager.getMapInfo().size()); for (Map.Entry entry : mapManager.getMapInfo().entrySet()) { - Cell cell = entry.getValue(); - if (cell.getEventId() == -1) { - continue; - } - CommonProto.Cell cellProto = CommonProto.Cell - .newBuilder() - .setCellId(entry.getKey()) - .setPointId(cell.getPointId()) - .build(); - cells.add(cellProto); + cellToProto(cells, entry); + } + for (Map.Entry entry : mapManager.getTypeEight().entrySet()) { + cellToProto(cells, entry); } MapInfoProto.MapEnterResponse mapEnterResponse = MapInfoProto.MapEnterResponse .newBuilder() @@ -115,6 +109,19 @@ public class MapLogic { MessageUtil.sendMessage(iSession, 1, messageType.getNumber(), mapEnterResponse, true); } + private void cellToProto(List cells, Map.Entry entry) { + Cell cell = entry.getValue(); + if (cell.getEventId() == -1) { + return; + } + CommonProto.Cell cellProto = CommonProto.Cell + .newBuilder() + .setCellId(entry.getKey()) + .setPointId(cell.getPointId()) + .build(); + cells.add(cellProto); + } + public void initMap(MapManager mapManager, User user) throws Exception { Map scMap = SCMap.sCMap.get(mapManager.getCurMapId()); @@ -157,7 +164,7 @@ public class MapLogic { if (mapPointConfig.getStyle() == EventType.enter) { mapManager.setCurXY(xy); } - if (mapPointConfig.getStyle() == EventType.allEvents) { + if (mapPointConfig.getStyle() == EventType.allEvents || mapPointConfig.getStyle() == EventType.hinder) { spicelMap.put(xy, cellValue); } else { newMap.put(xy, cellValue);