From 7df4872590996318763305ed2a08de20b021c342 Mon Sep 17 00:00:00 2001 From: jiahuiwen <1024696487@qq.com> Date: Mon, 28 Jan 2019 20:41:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/server/OptionAddCondition.txt | 2 +- conf/server/OptionConfig.txt | 14 +++++++------- .../java/com/ljsd/jieling/handler/map/Cell.java | 1 + .../com/ljsd/jieling/handler/map/MapLogic.java | 14 ++++++++------ 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/conf/server/OptionAddCondition.txt b/conf/server/OptionAddCondition.txt index 08165635a..15013c3d7 100644 --- a/conf/server/OptionAddCondition.txt +++ b/conf/server/OptionAddCondition.txt @@ -1,7 +1,7 @@ Id Type Values int int mut,int#int,2 1 2 1503#1 -2 1 101008#101031 +2 1 101008#101061 0 0 null 0 0 null 0 0 null diff --git a/conf/server/OptionConfig.txt b/conf/server/OptionConfig.txt index bdd216836..646e2f5c8 100644 --- a/conf/server/OptionConfig.txt +++ b/conf/server/OptionConfig.txt @@ -19,23 +19,23 @@ int int int mut,int#int,2 mut,int#int,2 int mut,int#int,2 101017 0 0 null null 1 101014 101018 0 0 null null 3 101015#101031|1#2 101019 0 0 null null 4 null -101020 0 0 null null 3 101016 +101020 0 0 null null 1 101016 101021 0 0 null null 1 101017 101022 0 0 null null 1 101018 101023 0 0 null null 1 101019 101024 0 0 null null 1 101020 101025 0 0 null null 1 101021 101026 0 0 null null 1 101022 -101027 0 0 null null 1 101023 -101028 0 0 null null 1 101024 +101027 0 0 null null 6 101023 +101028 0 0 null null 6 101024 101029 0 0 null null 1 101025 -101030 0 0 null null 1 101026 -101031 0 0 null null 1 101027 +101030 0 0 null null 6 101026 +101031 0 0 null null 6 101027 101032 0 0 null null 1 101028 -101033 0 0 null null 1 101029 +101033 0 0 null null 6 101029 101034 0 0 null null 1 101030 101035 0 5 0 null 5 null -101036 0 0 null null 4 null +101036 0 0 null null 6 101014 101037 0 0 null null 1 101033 101038 0 0 null null 4 null 101039 0 0 null null 1 101034 diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/Cell.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/Cell.java index 6d744eabb..4b4b028ac 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/Cell.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/Cell.java @@ -6,6 +6,7 @@ public class Cell extends MongoBase { private int cellId; + // 这个一般不变 private int pointId; private int eventId; 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 137d9f4a5..a45bd58c8 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 @@ -311,8 +311,10 @@ public class MapLogic { } case EventType.jump: { isSuccess = true; - mapManager.setCurMapId(behaviorTypeValues[0][0]); - initMap(mapManager); + if (behaviorTypeValues[0][0] != 0) { + mapManager.setCurMapId(behaviorTypeValues[0][0]); + initMap(mapManager); + } break; } default: { @@ -353,8 +355,8 @@ public class MapLogic { if (sOptionAddConditions.getType() == 1) { int doneEvent = sOptionAddConditions.getValues()[0][0]; for (Cell cell1 : mapManager.getMapInfo().values()) { - if (cell.getEventId() == doneEvent) { - if (cell1.getPointId() >= sOptionAddConditions.getValues()[0][1]) { + if (cell1.getPointId() == doneEvent) { + if (cell1.getEventId() >= sOptionAddConditions.getValues()[0][1]) { nextPoint = jumpTypeValues[0][0]; } break; @@ -416,11 +418,11 @@ public class MapLogic { .addAllEventBehaviorValues(eventBehaviorValuesList) .build(); eventUpdateResponse.setEventBehaviorCommon(eventBehaviorCommon); - eventUpdateResponse.setEventId(cell.getEventId()); + eventUpdateResponse.setEventId(nextPoint); if (dropBuilder != null) { eventUpdateResponse.setDrop(dropBuilder); } - LOGGER.info("updateEvent success xy=>{}, getPointId=>{} eventId={}", mapManager.getCurXY(), cell.getPointId(), cell.getEventId()); + LOGGER.info("updateEvent =====>success<====== xy=>{}, getPointId=>{} eventId={}", mapManager.getCurXY(), cell.getPointId(), cell.getEventId()); MessageUtil.sendMessage(session, 1, messageType.getNumber(), eventUpdateResponse.build(), true); }