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