From 0d66b7bcfcb362212cb344c519a4110ed59d1d20 Mon Sep 17 00:00:00 2001 From: wangyuan Date: Fri, 14 Jun 2019 14:25:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A2=E7=B4=A2=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ljsd/jieling/handler/map/MapLogic.java | 94 +++++++++---------- .../ljsd/jieling/logic/hero/HeroLogic.java | 2 + .../com/ljsd/jieling/util/CBean2Proto.java | 2 +- 3 files changed, 47 insertions(+), 51 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 2ade78990..e6e8c7043 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 @@ -528,8 +528,8 @@ public class MapLogic { } } } - updateMapMission(mapManager,EventType.updateOptionalEvent, optionId,0); - updateMapMission(mapManager,EventType.updatePonintEvent, pointId,0); + updateMapMission(mapManager,EventType.updateOptionalEvent, optionId,optionId); + updateMapMission(mapManager,EventType.updatePonintEvent, pointId,pointId); CommonProto.Drop.Builder dropBuilder = null; if (sOptionConfig.getReward().length > 0) { dropBuilder = ItemUtil.drop(user, sOptionConfig.getReward(), 1, 1, BIReason.MAP_EVENET_REWARD); @@ -945,7 +945,7 @@ public class MapLogic { fastFightResponse.addAllRemainHpList(remainHp); fastFightResponse.build(); // LOGGER.info("endFight() uid=>{},nextEventId=>{}", uid, nextEventId); - updateMapMission(mapManager,EventType.fightEvent,0, groupId); + updateMapMission(mapManager,EventType.fightEvent,groupId, groupId); // LOGGER.info("endFight() uid=>{} sMonsterGroup.getRewardgroup()=>{} misson=>{} eventDrop=>{}, missionDrop=>{}", uid, sMonsterGroup.getRewardgroup(), fastFightResponse.getMission(), fastFightResponse.getEnventDrop(), fastFightResponse.getMissionDrop()); MessageUtil.sendMessage(session, 1, messageType.getNumber(), fastFightResponse.build(), true); } @@ -1139,7 +1139,7 @@ public class MapLogic { } fightEndResponse.setEventId(nextEventId); // LOGGER.info("endFight() uid=>{},nextEventId=>{}", uid, nextEventId); - updateMapMission(mapManager,EventType.fightEvent,0,monsterGroupId); + updateMapMission(mapManager,EventType.fightEvent,monsterGroupId,monsterGroupId); // LOGGER.info("endFight() uid=>{} sMonsterGroup.getRewardgroup()=>{} misson=>{} eventDrop=>{}, missionDrop=>{}", uid, sMonsterGroup.getRewardgroup(), fightEndResponse.getMission(), fightEndResponse.getEnventDrop(), fightEndResponse.getMissionDrop()); MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightEndResponse.build(), true); @@ -1173,6 +1173,7 @@ public class MapLogic { public int updateMapMission(MapManager mapManager,int eventType,int eventId,int bossIdOrItemId){ + LOGGER.info("the eventtype ={},eventId={},bossItemId={}",eventType,eventId,bossIdOrItemId); int mapId = mapManager.getCurMapId(); if(mapId==0){ return 0; @@ -1191,50 +1192,8 @@ public class MapLogic { int score = sAccomplishmentConfig.getScore(); int logic = sAccomplishmentConfig.getLogic(); int[][] values = sAccomplishmentConfig.getValues(); - int targetEventId = values[0][0]; int targetEventValue = values[1][0]; - if(eventType == EventType.updateOptionalEvent && logic == MapMissionType.FINISH_EVEVNT.getMissionTypeValue()){ - for(int targetEventIdTmp : values[0]){ - if(targetEventIdTmp == eventId){ - if(missionValue= 100) { diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java index ff21eabf8..aed89618f 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java @@ -1401,6 +1401,8 @@ public class HeroLogic { Pokemon pokemon = pokemonManager.getRingFireMap().get(pokemonId); if(pokemon == null){ pokemon = new Pokemon(pokemonId); + pokemon.setAllStage(1); + pokemonManager.addRingFirePokemon(pokemon); } SRingTypeConfig sRingTypeConfig = SRingTypeConfig.config.get(pokemonId); if(sRingTypeConfig == null){ diff --git a/serverlogic/src/main/java/com/ljsd/jieling/util/CBean2Proto.java b/serverlogic/src/main/java/com/ljsd/jieling/util/CBean2Proto.java index 7406e18f3..41699dd8d 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/util/CBean2Proto.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/util/CBean2Proto.java @@ -277,6 +277,6 @@ public class CBean2Proto { } public static CommonProto.RingFireInfo getRingFire(Pokemon pokemon) { - return CommonProto.RingFireInfo.newBuilder().addAllComonpentId(pokemon.getComonpentsLevelMap().values()).setStage(pokemon.getAllStage()).build(); + return CommonProto.RingFireInfo.newBuilder().addAllComonpentId(pokemon.getComonpentsLevelMap().keySet()).setStage(pokemon.getAllStage()).setId(pokemon.getId()).build(); } }