diff --git a/conf/server/AccomplishmentConfig.txt b/conf/server/AccomplishmentConfig.txt index 1325d436f..5f714344e 100644 --- a/conf/server/AccomplishmentConfig.txt +++ b/conf/server/AccomplishmentConfig.txt @@ -1,86 +1,81 @@ id MapId Logic Values Score int int int mut,int#int,1 int -1 101 1 101064#1 4 -2 101 1 101026#1 8 -3 101 1 101142#1 4 -4 101 1 101046#1 8 -5 101 1 101061#1 8 -6 101 1 101100#1 8 -7 101 1 101126#1 8 -8 101 1 101222#1 6 -9 101 1 101224#1 6 -10 101 7 0#1 10 -11 101 5 0#1 4 -12 101 5 0#3 4 -13 101 5 0#5 4 -14 101 3 0#10 3 -15 101 3 0#20 3 -16 101 3 0#30 3 -17 101 6 0#50 3 -18 101 6 0#75 3 -19 101 6 0#100 3 -20 102 1 102016#1 6 -21 102 1 102028#1 6 -22 102 1 102137#1 7 -23 102 1 102036#1 2 -24 102 1 102039#1 2 -25 102 1 102042#1 2 -26 102 1 102061#1 7 -27 102 1 102172#1 7 -28 102 1 102077#1 7 -29 102 1 102105#1 7 -30 102 1 102026#1 7 -31 102 2 0#1 6 -32 102 1 102165#1 4 -33 102 1 102167#1 4 -34 102 7 0#1 8 -35 102 5 0#5 3 -36 102 5 0#10 3 -37 102 5 0#15 3 -38 102 3 0#20 3 -39 102 3 0#30 3 -40 102 3 0#50 3 -41 103 1 103017#1 3 -42 103 1 103018#1 3 -43 103 1 103020#1 6 -44 103 1 103021#1 6 -45 103 1 103022#1 6 -46 103 1 103023#1 6 -47 103 1 103030#1 6 -48 103 1 101017#1 6 -49 103 1 101023#1 6 -50 103 1 101024#1 6 -51 103 1 103028#1 4 -52 103 1 103029#1 4 -53 103 7 0#1 10 -54 103 5 0#5 3 -55 103 5 0#10 3 -56 103 5 0#20 3 -57 103 3 0#20 3 -58 103 3 0#30 3 -59 103 3 0#50 3 -60 103 8 0#1 10 -61 104 1 104021#1 6 -62 104 1 104023#1 6 -63 104 1 104024#1 6 -64 104 1 104026#1 6 -65 104 1 104022#1 4 -66 104 1 104025#1 4 -67 104 1 104027#1 4 -68 104 1 104028#1 4 -69 104 1 104029#1 4 -70 104 1 104004#1 4 -71 104 1 104030#1 4 -72 104 1 104019#1 4 -73 104 1 104020#1 4 -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 +1 101 1 101064#1 5 +2 101 1 101026#1 11 +3 101 1 101142#1 5 +4 101 1 101046#1 11 +5 101 1 101061#1 11 +6 101 1 101100#1 11 +7 101 1 101221#1 8 +8 101 1 101223#1 8 +9 101 3 0#10 5 +10 101 3 0#20 5 +11 101 3 0#30 5 +12 101 6 0#50 5 +13 101 6 0#75 5 +14 101 6 0#100 5 +15 102 1 102016#1 6 +16 102 1 102028#1 6 +17 102 1 102137#1 7 +18 102 1 102036#1 2 +19 102 1 102039#1 2 +20 102 1 102042#1 2 +21 102 1 102061#1 7 +22 102 1 102172#1 7 +23 102 1 102077#1 7 +24 102 1 102105#1 7 +25 102 1 102026#1 7 +26 102 2 0#1 6 +27 102 1 102165#1 4 +28 102 1 102167#1 4 +29 102 7 0#1 8 +30 102 5 0#5 3 +31 102 5 0#10 3 +32 102 5 0#15 3 +33 102 3 0#20 3 +34 102 3 0#30 3 +35 102 3 0#50 3 +36 103 1 103017#1 3 +37 103 1 103018#1 3 +38 103 1 103020#1 6 +39 103 1 103021#1 6 +40 103 1 103022#1 6 +41 103 1 103023#1 6 +42 103 1 103030#1 6 +43 103 1 101017#1 6 +44 103 1 101023#1 6 +45 103 1 101024#1 6 +46 103 1 103028#1 4 +47 103 1 103029#1 4 +48 103 7 0#1 10 +49 103 5 0#5 3 +50 103 5 0#10 3 +51 103 5 0#20 3 +52 103 3 0#20 3 +53 103 3 0#30 3 +54 103 3 0#50 3 +55 103 8 0#1 10 +56 104 1 104021#1 6 +57 104 1 104023#1 6 +58 104 1 104024#1 6 +59 104 1 104026#1 6 +60 104 1 104022#1 4 +61 104 1 104025#1 4 +62 104 1 104027#1 4 +63 104 1 104028#1 4 +64 104 1 104029#1 4 +65 104 1 104004#1 4 +66 104 1 104030#1 4 +67 104 1 104019#1 4 +68 104 1 104020#1 4 +69 104 1 0#1 4 +70 104 1 0#1 4 +71 104 1 0#1 4 +72 104 7 0#2 4 +73 104 7 0#4 6 +74 104 7 0#1 4 +75 104 7 0#2 6 +76 104 5 0#10 3 +77 104 5 0#20 3 +78 104 3 0#20 3 0 0 3 0#40 3 diff --git a/conf/server/AreaConfig.txt b/conf/server/AreaConfig.txt index 52982f90f..f82d2105c 100644 --- a/conf/server/AreaConfig.txt +++ b/conf/server/AreaConfig.txt @@ -1,7 +1,7 @@ Id Name Include int string mut,float#float,1 1 无名之森 101 -2 河口平原 102#104 -3 御水之都 103#105#108 +2 河口平原 102#103 +3 御水之都 104#105#108 4 御水之都废墟 109 5 血色沼泽 106#107#110 diff --git a/conf/server/MapPointConfig.txt b/conf/server/MapPointConfig.txt index 7e911e6e7..8553c9a97 100644 --- a/conf/server/MapPointConfig.txt +++ b/conf/server/MapPointConfig.txt @@ -109,6 +109,8 @@ int int int int int int int 103028 5 2 2 0 103126 0 103029 5 2 2 0 103128 0 103030 5 2 2 0 103130 0 +103031 7 3 2 0 0 0 +103032 7 3 2 0 0 0 0 0 0 0 0 0 0 104001 1 2 1 0 104001 0 104031 1 2 1 0 104120 0 diff --git a/conf/server/Map_103.txt b/conf/server/Map_103.txt index aa07dc7c1..a79c1210d 100644 --- a/conf/server/Map_103.txt +++ b/conf/server/Map_103.txt @@ -1,41 +1,42 @@ id Event Groups isMustAppear int int mut,int#int,2 int -1 103004 10#9|9#10|10#10 0 -2 103001 1#6|2#6|3#6|2#7|2#8 0 -3 103020 17#6 0 -4 103001 12#11|13#11|14#11|13#12|13#13 0 -5 103022 6#11 0 -6 103021 16#12 0 -7 103023 2#4 0 -8 103002 6#5|8#5 0 -9 103004 17#3|18#3|18#4 0 -10 103004 10#1|10#2 0 -11 103016 12#1|13#1|14#1|16#1|17#1|18#1|19#1|20#1|11#2|16#2|17#2|18#2|19#2|20#2|10#3|8#4|7#5|7#6|7#7|7#8|1#9|2#9|3#9|4#9|5#9|6#9|5#10|6#10|7#10|2#11|3#11|4#11|5#11|7#11|8#11|9#11|10#11|11#11|18#11|19#11|20#11|1#12|2#12|17#12|18#12|19#12|20#12|12#13|14#13|15#13|16#13|17#13|18#13|19#13|20#13|11#14|12#14|13#14|14#14|15#14|16#14|17#14|18#14|19#14|20#14|11#15|12#15|13#15|14#15|15#15|16#15|17#15|18#15|19#15|20#15 1 -12 103017 11#13 0 -13 103004 17#7|18#7|17#8|17#9 0 -14 103018 9#3 0 -15 103001 15#1|15#2|15#3 0 -16 103002 5#14|6#14|7#14|5#15|7#15 0 -17 103008 6#7|6#8 0 -18 103001 12#7|10#8|11#8|12#8|11#9 0 -19 103001 11#3|11#4|12#4|10#5|11#5 0 -20 103001 20#9|19#10 0 +1 103014 2#10 0 +2 103002 7#14|7#15 0 +3 103001 2#5|1#6|3#6 0 +4 103020 17#6 0 +5 103001 12#11|13#11|14#11|13#12|13#13 0 +6 103022 6#11 0 +7 103021 16#12 0 +8 103002 8#5|8#6 0 +9 103023 2#7 0 +10 103016 12#1|13#1|14#1|16#1|17#1|18#1|19#1|20#1|11#2|16#2|17#2|18#2|19#2|20#2|10#3|8#4|7#5|7#6|7#7|7#8|2#9|3#9|4#9|5#9|6#9|5#10|6#10|7#10|2#11|3#11|4#11|5#11|7#11|8#11|9#11|10#11|11#11|18#11|19#11|20#11|1#12|2#12|17#12|18#12|19#12|20#12|12#13|14#13|15#13|16#13|17#13|18#13|19#13|20#13|11#14|12#14|13#14|14#14|15#14|16#14|17#14|18#14|19#14|20#14|11#15|12#15|13#15|14#15|15#15|16#15|17#15|18#15|19#15|20#15 1 +11 103017 11#13 0 +12 103018 9#3 0 +13 103001 15#1|15#2|15#3 0 +14 103002 5#14|5#15 0 +15 103014 3#10 0 +16 103028 4#4 0 +17 103001 11#7|12#7|11#8|12#8|11#9 0 +18 103002 5#6|5#7|5#8 0 +19 103001 11#3|11#4|10#5|11#5|10#6 0 +20 103001 19#9|19#10 0 21 103001 7#1|8#1|7#2 0 -22 101017 20#10 0 -23 103002 2#13|1#14|2#14|3#14|4#14|2#15 0 -24 103001 8#9|9#9|8#10 0 -25 103030 5#2 0 -26 103004 5#3|4#4|5#4|5#5 0 -27 103011 20#3 0 -28 103004 13#2|14#2|13#3|14#3 0 -29 103001 15#6|16#6|14#7|15#7|15#8|15#9 0 -30 103015 6#15 0 -31 103002 1#1|2#1|3#1|2#2|3#2 0 -32 103014 1#2 0 -33 103028 7#9 0 -34 103008 3#7|4#7|3#8|4#8 0 -35 103029 13#9 0 -36 103001 9#12|9#13|9#14|9#15 0 -37 101024 10#15 0 -38 101023 13#4 0 -39 103004 14#12|15#12 0 +22 103002 4#1|4#2|6#2|6#3 0 +23 101017 20#10 0 +24 103002 2#13|1#14|2#14|2#15 0 +25 103001 9#9|8#10|9#10 0 +26 103032 16#9 0 +27 103030 5#2 0 +28 103011 20#3 0 +29 103031 18#4 0 +30 103013 1#9 0 +31 103001 14#6|15#6|14#7|15#7|15#8 0 +32 103015 1#11 0 +33 103002 1#1|2#1|2#2|1#3|2#3 0 +34 103014 1#10 0 +35 103028 7#9|13#9 0 +36 103029 5#12 0 +37 103001 9#12|9#13|9#14 0 +38 103014 4#10 0 +39 101024 10#15 0 +40 101023 13#4 0 diff --git a/conf/server/SkillLogicConfig.txt b/conf/server/SkillLogicConfig.txt index 232e2a212..ca04c2709 100644 --- a/conf/server/SkillLogicConfig.txt +++ b/conf/server/SkillLogicConfig.txt @@ -547,9 +547,9 @@ int mut,float#float,2 mut,int#int,2 mut,float#float,2 float 20025 20011#0.7 1#13 0.8#1|3#0.1#1#5 0.0 20026 20012#0.7 1#13 0.8#1|3#0.1#1#5 0.0 20027 20013#0.7 1#13 0.8#1|3#0.1#1#5 0.0 -20028 20011#0.7|30011#0.7 1|5 1#1|1#0.45#5 0.0 -20029 20011#0.7|30012#0.7 1|5 1#1|1#0.45#5 0.0 -20030 20011#0.7|30013#0.7 1|5 1#1|1#0.45#5 0.0 +20028 20011#0.7|30011#0.7 1|5 1#1|1#0.15#4 0.0 +20029 20011#0.7|30012#0.7 1|5 1#1|1#0.15#4 0.0 +20030 20011#0.7|30013#0.7 1|5 1#1|1#0.15#4 0.0 20031 20010#0.7 2#4 0.3#1|4#0.1#4#4 0.0 20032 20010#0.7 2#4 0.3#1|4#0.1#4#4 0.0 20033 20010#0.7 2#4 0.3#1|4#0.1#4#4 0.0 diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/GameGM/GMRequestHandler.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/GameGM/GMRequestHandler.java index 6e3b9270f..3c0c4ddfb 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/GameGM/GMRequestHandler.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/GameGM/GMRequestHandler.java @@ -1,5 +1,6 @@ package com.ljsd.jieling.handler.GameGM; +import com.ljsd.jieling.config.SAccomplishmentConfig; import com.ljsd.jieling.config.SCHero; import com.ljsd.jieling.config.SCHeroRankUpConfig; import com.ljsd.jieling.config.SCMapConfig; @@ -8,6 +9,9 @@ import com.ljsd.jieling.db.mongo.MongoUtil; import com.ljsd.jieling.globals.Global; import com.ljsd.jieling.globals.GlobalGm; import com.ljsd.jieling.handler.BaseHandler; +import com.ljsd.jieling.handler.map.MapLogic; +import com.ljsd.jieling.handler.map.MapManager; +import com.ljsd.jieling.handler.map.MapMission; import com.ljsd.jieling.logic.dao.Hero; import com.ljsd.jieling.logic.dao.Mail; import com.ljsd.jieling.logic.dao.root.User; @@ -22,7 +26,7 @@ import com.ljsd.jieling.util.TimeUtils; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; -import java.util.Map; +import java.util.*; import java.util.concurrent.ConcurrentHashMap; @Component @@ -84,17 +88,22 @@ public class GMRequestHandler extends BaseHandler{ break; case GlobalGm.OPEN_MAP: SCMapConfig scMapConfig = SCMapConfig.getsCMapSize().get(100 + prarm1); + Set missionIds = new HashSet<>(); + MapManager mapManager = cUser.getMapManager(); + Map allMissionProgress = mapManager.getAllMissionProgress(); + int curMapId = mapManager.getCurMapId(); if (scMapConfig != null) { - for (int i = 0; i <= prarm1; i++) { - int mapId = 100 + prarm1; + for (int i = 1; i <= prarm1; i++) { + int mapId = 100 + i; SCMapConfig crossMap = SCMapConfig.getsCMapSize().get(mapId); cUser.getPlayerInfoManager().setMapId(mapId); if (crossMap.getOpenRule() != null && crossMap.getOpenRule().length > 0) { - cUser.getMissionManager().getFinishMissions().add(crossMap.getOpenRule()[0]); + missionIds.add(crossMap.getOpenRule()[0]); } + initFininshMapMission(mapManager,mapId); } } - // giveItem(cUser,prarm1,prarm2); + cUser.getMissionManager().updateFinishMissions(missionIds); break; default: break; @@ -120,4 +129,22 @@ public class GMRequestHandler extends BaseHandler{ itemMap.put(itemId,itemNum); ItemUtil.addItem(cUser,itemMap,dropBuilder); } + + private void initFininshMapMission( MapManager mapManager,int mapId){ + List sAccomplishmentConfigs = SAccomplishmentConfig.getsAccomplishmentConfigByMapId(mapId); + if( sAccomplishmentConfigs == null){ + return; + } + Map missionProgress = new HashMap<>(); + int totalWeight = 0; + for(SAccomplishmentConfig sAccomplishmentConfig : sAccomplishmentConfigs){ + int id = sAccomplishmentConfig.getId(); + int value = sAccomplishmentConfig.getValues()[1]; + missionProgress.put(id,value); + totalWeight+=sAccomplishmentConfig.getScore(); + } + MapMission mapMission = new MapMission(mapId,missionProgress); + mapMission.setTotalWeight(totalWeight); + mapManager.addMapMission(mapMission); + } } 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 45c70686d..8245004ba 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 @@ -564,8 +564,8 @@ 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()); + saveRefreshInfo(pointId, mapManager, mapPointConfig, cell == null ? -1 : cell.getEventId()); + LOGGER.info("updatEvent() uid=>{},nextEventId={},eventId={}", uid, nextEventId, cell == null ? 0 : cell.getEventId()); MessageUtil.sendMessage(session, 1, messageType.getNumber(), eventUpdateResponse.build(), true); } @@ -580,6 +580,9 @@ public class MapLogic { if (saveEventId == -1) { return; } + if (saveEventId == nextEventId) { + return; + } } crossMapCell.getDayRefreshs().put(optionId, nextEventId); } @@ -589,6 +592,9 @@ public class MapLogic { if (saveEventId == -1) { return; } + if (saveEventId == nextEventId) { + return; + } } crossMapCell.getPermanents().put(optionId, nextEventId); } @@ -699,7 +705,28 @@ public class MapLogic { if (nextEventId == 0) { Map doingMissions = user.getMissionManager().getDoingMissions(); Mission mission = doingMissions.get(sOptionAddConditions.getValues()[0][0]); - if (mission == null || mission.getMissionStep() < jumpTypeValues[0][1]) { + if (mission == null || mission.getMissionStep() < sOptionAddConditions.getValues()[0][1]) { + nextEventId = jumpTypeValues[0][1]; + } else { + nextEventId = jumpTypeValues[0][0]; + } + } + break; + } + // 当前是否处于某个任务的第几步,逻辑参数(0处于1不处于)#任务id#任务步数|… + case 6:{ + Map doingMissions = user.getMissionManager().getDoingMissions(); + Mission mission = doingMissions.get(sOptionAddConditions.getValues()[0][1]); + if (sOptionAddConditions.getValues()[0][0] == 0) { + if (mission != null && mission.getMissionStep() == sOptionAddConditions.getValues()[0][2]) { + nextEventId = jumpTypeValues[0][0]; + } else { + nextEventId = jumpTypeValues[0][1]; + } + } else { + if (mission == null || mission.getMissionStep() != sOptionAddConditions.getValues()[0][2]) { + nextEventId = jumpTypeValues[0][0]; + } else { nextEventId = jumpTypeValues[0][1]; } } @@ -792,9 +819,9 @@ public class MapLogic { MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), ""); return; } - Cell cell = mapManager.getMapInfo().get(mapManager.getCurXY()); + Cell cell = mapManager.getMapInfo().get(mapManager.getTriggerXY()); if (cell == null) { - cell = mapManager.getMapInfo().get(mapManager.getTriggerXY()); + cell = mapManager.getMapInfo().get(mapManager.getCurXY()); if (cell == null) { LOGGER.info("cell == null xy is wrong =>{} triggerXY=>{}", mapManager.getCurXY(), mapManager.getTriggerXY()); MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), ""); @@ -943,7 +970,7 @@ public class MapLogic { updateMapMission(user.getMapManager(),EventType.updateEvent,cell.getEventId(),0); } } - LOGGER.info("endFight() uid=>{},nextEventId", uid, nextEventId); + 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); diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/behavior/DestroyMissionBehavior.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/behavior/DestroyMissionBehavior.java index 053fb8221..82c789621 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/behavior/DestroyMissionBehavior.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/behavior/DestroyMissionBehavior.java @@ -1,6 +1,5 @@ package com.ljsd.jieling.handler.map.behavior; -import com.ljsd.jieling.handler.map.Cell; import com.ljsd.jieling.handler.map.EventType; import com.ljsd.jieling.handler.map.MapLogic; import com.ljsd.jieling.handler.mission.CheckMissionReturn;