From 0983abb99c4904f7999af6e7e62b9c9547e93a08 Mon Sep 17 00:00:00 2001 From: wangyuan Date: Thu, 20 Jun 2019 11:37:12 +0800 Subject: [PATCH] fix fight key --- .../src/main/java/com/ljsd/jieling/handler/map/EventType.java | 1 + .../src/main/java/com/ljsd/jieling/handler/map/MapLogic.java | 4 ++-- .../java/com/ljsd/jieling/logic/dao/WorkShopController.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/EventType.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/EventType.java index 79d70245c..979327d6b 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/EventType.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/EventType.java @@ -99,6 +99,7 @@ public class EventType { public static final int thirtySix = 36; public static final int thirtyEight = 38; + public static final int thirtyNine = 39; public static final int updatePonintEvent = 1; public static final int fightEvent = 2; 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 18cbf71e1..c8e8d2614 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 @@ -1619,7 +1619,7 @@ public class MapLogic { return; } - String key = RedisKey.getKey(RedisKey.LEVE_DIFFICULTY_FIGHT, Integer.toString(user.getId()) , false); + String key = RedisKey.getKey(RedisKey.SUDDLENLY_FIGHT, Integer.toString(user.getId()) , false); Map valueMap = RedisUtil.getInstence().hmget(key); RedisUtil.getInstence().del(key); if (valueMap == null || valueMap.isEmpty()) { @@ -1705,7 +1705,7 @@ public class MapLogic { //扣除预先道具 ItemUtil.itemCost(user,sLevelDifficultyConfig.getPreLevelCost(),BIReason.START_DIFFICULT,fightId); FightInfoProto.FightStartResponse.Builder fightStartResponse = FightInfoProto.FightStartResponse.newBuilder(); - BehaviorUtil.getLevelDifficultyifficuFightInfo(user,sLevelDifficultyConfig.getMonsterGroup(),teamId,sLevelDifficultyConfig.getRankTime(),fightStartResponse,RedisKey.LEVE_DIFFICULTY_INFO); + BehaviorUtil.getLevelDifficultyifficuFightInfo(user,sLevelDifficultyConfig.getMonsterGroup(),teamId,sLevelDifficultyConfig.getRankTime(),fightStartResponse,RedisKey.LEVE_DIFFICULTY_FIGHT); MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightStartResponse.build(), true); } diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/dao/WorkShopController.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/dao/WorkShopController.java index a3608a980..e4fdef44b 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/dao/WorkShopController.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/dao/WorkShopController.java @@ -41,7 +41,7 @@ public class WorkShopController extends MongoBase { } public void updateTechLevel(int propession,int techId,int level){ - if(this.technologyMap.containsKey(propession)){ + if(!this.technologyMap.containsKey(propession)){ this.technologyMap.put(propession,new HashMap<>()); } this.technologyMap.get(propession).put(techId,level);