diff --git a/serverlogic/src/main/java/com/ljsd/jieling/chat/logic/ChatLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/chat/logic/ChatLogic.java index 1258db0eb..978c406c4 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/chat/logic/ChatLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/chat/logic/ChatLogic.java @@ -95,17 +95,13 @@ public class ChatLogic { int uid = iSession.getUid(); User user = UserManager.getUser(uid); PlayerManager playerInfoManager = user.getPlayerInfoManager(); - if(playerInfoManager.getSilence()==1){ - MessageUtil.sendErrorResponse(iSession,0,msgId,"您已被系统禁言"); - return; - } FriendManager friendManager = user.getFriendManager(); long nowTime = System.currentTimeMillis(); String tmp = SensitivewordFilter.replaceSensitiveWord(message, 1, "*"); - if(!tmp.equals(message)){ + if(!tmp.equals(message)||playerInfoManager.getSilence()==1){ ChatProto.ChatInfo chatInfo = CBean2Proto.getChatInfoBuilder(user,tmp,nowTime,-1); ChatProto.SendChatInfoResponse response = ChatProto.SendChatInfoResponse.newBuilder().setChatInfo(chatInfo).build(); MessageUtil.sendMessage(iSession,1,msgId,response,true); diff --git a/serverlogic/src/main/java/com/ljsd/jieling/db/redis/RedisKey.java b/serverlogic/src/main/java/com/ljsd/jieling/db/redis/RedisKey.java index 5bd7a6098..838e5e086 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/db/redis/RedisKey.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/db/redis/RedisKey.java @@ -176,6 +176,7 @@ public class RedisKey { public static final String BLOODY_PERSON_BATTLE_INFO = "BLOODY_PERSON_BATTLE_INFO"; public static final String MATCH_SERVER_INFO = "MATCH_SERVER_INFO"; public static final String LOGIC_SERVER_INFO = "LOGIC_SERVER_INFO"; + public static final String BLOODY_SERVER_INFO = "BLOODY_SERVER_INFO"; public final static String CDKEY = "CDKEY"; @@ -194,7 +195,7 @@ public class RedisKey { familyKey.add(FAMILY_FIGHT_TOTAL_EXP); } public static String getKey(String type, String key, boolean withoutServerId) { - if(RedisKey.TOKEN.equals(type)||RedisKey.USER_SERVER_INFO.equals(type)){ + if(RedisKey.TOKEN.equals(type)||RedisKey.USER_SERVER_INFO.equals(type)||familyKey.contains(type)){ return type + RedisKey.Delimiter_colon + key; } diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/fight/CombatLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/fight/CombatLogic.java index e207fe3fb..e0ce54146 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/fight/CombatLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/fight/CombatLogic.java @@ -119,29 +119,35 @@ public class CombatLogic { MapManager mapManager = user.getMapManager(); Map> heroAllAttributeMap = bufferAddByEatFoodOrEventTrigger(foodIdOrEventId, mapManager.getHeroAllAttributeMap()); mapManager.setHeroAllAttributeMap(heroAllAttributeMap); + if(SChallengeConfig.sChallengeConfigs.get(user.getMapManager().getCurMapId()).getType()==4){ + for(Map.Entry> entry:heroAllAttributeMap.entrySet()){ + int per =(int) (entry.getValue().get(HeroAttributeEnum.CurHP.getPropertyId()) / (double) entry.getValue().get(HeroAttributeEnum.Hp.getPropertyId())*10000); + user.getMapManager().updateEndlessHeroHp(entry.getKey(),per); + } + } SFoodsConfig sFoodsConfig = SFoodsConfig.getsFoodsConfigByFoodId(foodIdOrEventId); int contiue = sFoodsConfig.getContiue(); if(contiue==0){ contiue=-1; - int teamId = mapManager.getTeamId(); - List teamPosHeroInfoList = user.getTeamPosManager().getTeamPosForHero().get(teamId); - Map foodAddMap = new HashMap<>(); - getFoodAttributeAdd(GlobalsDef.FOOD_ADDITION_BATTLE_TYPE, GlobalsDef.FOOD_EAT_AFFECT_PERSON, foodAddMap, sFoodsConfig); - for (TeamPosHeroInfo heroInfo : teamPosHeroInfoList) { - Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId()); - if (hero == null) { - continue; - } - Map heroAllAttribute = user.getMapManager().getHeroAllAttributeByHeroId(hero.getId()); - if(heroAllAttribute == null || heroAllAttribute.get(HeroAttributeEnum.CurHP.getPropertyId()) <= 0){ - continue; - } - - HeroLogic.getInstance().combinedAttribute(foodAddMap,heroAllAttribute); - HeroLogic.getInstance().calInteractAdd(heroAllAttribute); - heroAllAttributeMap.put(hero.getId(), heroAllAttribute); - } - mapManager.setHeroAllAttributeMap(heroAllAttributeMap); +// int teamId = mapManager.getTeamId(); +// List teamPosHeroInfoList = user.getTeamPosManager().getTeamPosForHero().get(teamId); +// Map foodAddMap = new HashMap<>(); +// getFoodAttributeAdd(GlobalsDef.FOOD_ADDITION_BATTLE_TYPE, GlobalsDef.FOOD_EAT_AFFECT_PERSON, foodAddMap, sFoodsConfig); +// for (TeamPosHeroInfo heroInfo : teamPosHeroInfoList) { +// Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId()); +// if (hero == null) { +// continue; +// } +// Map heroAllAttribute = user.getMapManager().getHeroAllAttributeByHeroId(hero.getId()); +// if(heroAllAttribute == null || heroAllAttribute.get(HeroAttributeEnum.CurHP.getPropertyId()) <= 0){ +// continue; +// } +// +// HeroLogic.getInstance().combinedAttribute(foodAddMap,heroAllAttribute); +// HeroLogic.getInstance().calInteractAdd(heroAllAttribute); +// heroAllAttributeMap.put(hero.getId(), heroAllAttribute); +// } +// mapManager.setHeroAllAttributeMap(heroAllAttributeMap); } mapManager.eatFood(foodIdOrEventId,contiue); }