Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
1bf2ab65c7
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,29 +119,35 @@ public class CombatLogic {
|
|||
MapManager mapManager = user.getMapManager();
|
||||
Map<String, Map<Integer, Integer>> heroAllAttributeMap = bufferAddByEatFoodOrEventTrigger(foodIdOrEventId, mapManager.getHeroAllAttributeMap());
|
||||
mapManager.setHeroAllAttributeMap(heroAllAttributeMap);
|
||||
if(SChallengeConfig.sChallengeConfigs.get(user.getMapManager().getCurMapId()).getType()==4){
|
||||
for(Map.Entry<String, Map<Integer, Integer>> 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<TeamPosHeroInfo> teamPosHeroInfoList = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||
Map<Integer,Integer> 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<Integer, Integer> 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<TeamPosHeroInfo> teamPosHeroInfoList = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||
// Map<Integer,Integer> 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<Integer, Integer> 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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue