处理消息失败 打印异常

back_recharge
jiahuiwen 2021-10-15 14:06:22 +08:00
parent 09591d21e0
commit b4ad96bba7
4 changed files with 12 additions and 2 deletions

View File

@ -254,6 +254,9 @@ public class BehaviorUtil {
hero = helpHero.getHero();
}
}
if (hero == null) {
continue;
}
StringBuilder skillSb = new StringBuilder();
StringBuilder propertySb = new StringBuilder();
String heroSkill = HeroLogic.getInstance().getHeroSkills(user,hero,skillSb).toString();

View File

@ -783,7 +783,9 @@ public class CombatLogic {
}
}
}
if (hero == null) {
continue;
}
List<Integer> heroSkillListTmp = HeroLogic.getInstance().getHeroSkillList(user, hero);
heroSkillListTmp.forEach(skill->{
SPassiveSkillLogicConfig config = SPassiveSkillLogicConfig.getConfig(skill);

View File

@ -94,6 +94,9 @@ public class SevenWorldFightHandler implements IFightEventProcesor {
hero = helpHero.getHero();
}
}
if (hero == null) {
continue;
}
StringBuilder propertySb = new StringBuilder();
String heroSkill = getHeroSkills(user,hero,teamPosHeroInfo.getPosition()).toString();
String property = HeroLogic.getInstance().getHeroProperty(user,hero,propertySb,true,teamId).toString();

View File

@ -101,7 +101,9 @@ public class ProtocolsManager implements ProtocolsAbstract {
//检查一下 是否有getMessageCode()返回null 或者就没有定义handler
try {
MessageUtil.sendErrorResponse(session, 0, session.getLastMsgId() + 1,"request unknow commond : 通知服务器开发人员");
}catch (Exception e){}
}catch (Exception e){
LOGGER.info("processMessage uid={} e={} unknow={}", session.getUid(), e, packetNetData.getMsgId());
}
LOGGER.info("request unknow commond : " + packetNetData.getMsgId());
return;
} else {