From c92268114322cb2f917475b47bfb827cb80c126b Mon Sep 17 00:00:00 2001 From: wangyuan Date: Fri, 29 Mar 2019 19:10:51 +0800 Subject: [PATCH 1/2] fix get map event id --- .../main/java/com/ljsd/jieling/handler/map/MapLogic.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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); From 8e4cd3c83d95027c1a003dd5d038c8e7a88c8312 Mon Sep 17 00:00:00 2001 From: wangyuan Date: Fri, 29 Mar 2019 19:12:22 +0800 Subject: [PATCH 2/2] add data --- conf/server/AccomplishmentConfig.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/conf/server/AccomplishmentConfig.txt b/conf/server/AccomplishmentConfig.txt index d3296c1bf..1325d436f 100644 --- a/conf/server/AccomplishmentConfig.txt +++ b/conf/server/AccomplishmentConfig.txt @@ -59,7 +59,7 @@ int int int mut,int#int,1 int 57 103 3 0#20 3 58 103 3 0#30 3 59 103 3 0#50 3 -60 103 8 0 10 +60 103 8 0#1 10 61 104 1 104021#1 6 62 104 1 104023#1 6 63 104 1 104024#1 6 @@ -73,13 +73,13 @@ int int int mut,int#int,1 int 71 104 1 104030#1 4 72 104 1 104019#1 4 73 104 1 104020#1 4 -74 104 1 0 4 -75 104 1 0 4 -76 104 1 0 4 -77 104 7 0 4 -78 104 7 0 6 -79 104 7 0 4 -80 104 7 0 6 +74 104 1 0#1 4 +75 104 1 0#1 4 +76 104 1 0#1 4 +77 104 7 0#2 4 +78 104 7 0#4 6 +79 104 7 0#1 4 +80 104 7 0#2 6 81 104 5 0#10 3 82 104 5 0#20 3 83 104 3 0#20 3