From 24b40800626f3af9d4c538f3053532820094265e Mon Sep 17 00:00:00 2001 From: lvxinran Date: Wed, 3 Jul 2019 16:25:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=AB=E8=8D=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ljsd/jieling/handler/map/MapLogic.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 bf2e610de..5cce65c6a 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 @@ -1493,6 +1493,15 @@ public class MapLogic { SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(mapId); int type = sChallengeConfig.getType(); if(type==3 || type==1){ + int itemId = Global.GENERALSTORY_TICKET; + if (type == 3) { + itemId = Global.HEROSTORY_TICKET; + } + boolean enough = ItemUtil.itemCost(user, new int[][]{{itemId ,count}}, BIReason.MAP_ENTER_CONSUME, mapId); + if (!enough) { + MessageUtil.sendErrorResponse(session, 0, messageType.getNumber(), "no ticket"); + return; + } SChallengeMapConfig sChallengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapId); MapInfoProto.MapSweepResponse.Builder mapSweepResponse = MapInfoProto.MapSweepResponse.newBuilder(); for (int i = 0; i < count; i++) { @@ -1509,6 +1518,7 @@ public class MapLogic { } + /** * 获取所有关卡信息 *