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 2ca29760c..5b55bfd61 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 @@ -2023,7 +2023,7 @@ public class MapLogic { int x = scMap1.getGroups()[randomIndex][0]; int y = scMap1.getGroups()[randomIndex][1]; int xy = CellUtil.xy2Pos(x, y); - MapPointConfig mapPointConfig = MapPointConfig.scMapEventMap.get(sTrialConfig.getRandomMonsterType()[0][1]); + MapPointConfig mapPointConfig = MapPointConfig.scMapEventMap.get(sTrialConfig.getRandomMonsterType()[1][1]); if (mapPointConfig == null) { LOGGER.info("====initTrialMap()====mapPointConfig == null======>{}", scMap1.getEvent()); continue; diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/SweepLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/SweepLogic.java index 44b2705d3..140c98282 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/SweepLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/SweepLogic.java @@ -84,14 +84,16 @@ public class SweepLogic { boolean change = false; List dropList = new CopyOnWriteArrayList<>(); for (int i = 0 ; i < sweepTimes ;i++){ + if (targetItem!= 0){ + Item item = user.getItemManager().getItem(targetItem); + if(item!=null && item.getItemNum()>=targetNum){ + sweepTimes=i; + change = true; + break; + } + } CommonProto.Drop.Builder drop = ItemUtil.drop(user, sLevelDifficultyConfig.getRandomReward(), 1, 0, BIReason.LEVELDIFFICULTY_SWEEP_REWARD); dropList.add(drop.build()); - Item item = user.getItemManager().getItem(targetItem); - if(item!=null && item.getItemNum()>=targetNum){ - sweepTimes=i; - change = true; - break; - } } if(change){ cost = MapLogic.getInstance().getCost(sLevelDifficultyConfig, sweepTimes); @@ -99,6 +101,7 @@ public class SweepLogic { //扣除道具 ItemUtil.itemCost(user, cost,BIReason.SWEEP_FIGHT_CONSUME,fightId); MapLogic.getInstance().userLevelUp(user,sLevelDifficultyConfig.getExp() * sweepTimes); + LOGGER.info("sweepFight=>uid={},sweepTimes={},exp={}",uid,sweepTimes,sLevelDifficultyConfig.getExp()); FightInfoProto.SweepRightResponse.Builder builder = FightInfoProto.SweepRightResponse.newBuilder(); builder.addAllDrop(dropList); levelDifficulty.setChallengeTimes(levelDifficulty.getChallengeTimes() +sweepTimes);