公会副本空指针处理

grimm 2024-05-20 16:33:54 +08:00
parent 04322523e9
commit 3ce3bc15ef
1 changed files with 6 additions and 2 deletions

View File

@ -327,13 +327,17 @@ public class GuildChallengeLogic {
if(sendUid==uid){
continue;
}
ISession isession = OnlineUserManager.getSessionByUid(sendUid);
User userByRpc = PlayerLogic.getInstance().getUserByRpc(sendUid);
if (userByRpc == null){
continue;
}
Family.GuildChallengeIndication.Builder otherIndication = Family.GuildChallengeIndication.newBuilder()
.setBlood(remainHp)
.setCurBoss(guildInfo.getCurrBossId());
if(kill==1&&!PlayerLogic.getInstance().getUserByRpc(sendUid).getGuildMyInfo().getRefreshedBoss().contains(bossId)&&guildInfo.getBossHpRemain()!=-1){
if(kill == 1 && !userByRpc.getGuildMyInfo().getRefreshedBoss().contains(bossId) && guildInfo.getBossHpRemain()!=-1){
otherIndication.setIsRefresh(1);//需要前端刷新次数
}
ISession isession = OnlineUserManager.getSessionByUid(sendUid);
if(isession!=null){
LOGGER.info("向{}发送indication",sendUid);
MessageUtil.sendIndicationMessage(isession,1,MessageTypeProto.MessageType.GUILD_CHALLENGE_INDICATION_VALUE,otherIndication.build(),true);