diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/family/DeathPathLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/family/DeathPathLogic.java index b8118256d..acb4fb528 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/family/DeathPathLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/family/DeathPathLogic.java @@ -315,7 +315,8 @@ public class DeathPathLogic { String key; // 是否是跨服 Set> zSetReverseRangeWithScores; - if (getGroupId() > 0) { + boolean result = getGroupId() > 0; + if (result) { key = guildRank.getCrossRedisKey(); zSetReverseRangeWithScores = RedisUtil.getInstence().getZsetreverseRangeWithScores(key, String.valueOf(i), 0, 0,false); LOGGER.info("========================获取十绝阵内部信息,跨服:{}",uid); @@ -332,7 +333,7 @@ public class DeathPathLogic { int guildId = Integer.parseInt(next.getValue()); GuildInfoCache crossGuild = CrossDeathPathLogic.getCrossGuild(guildId); Integer serverId = Optional.ofNullable(CrossDeathPathLogic.getCrossGuild(guildId)).map(GuildInfoCache::getServerId).orElse(0); - String serverName = CrossDeathPathLogic.getInstance().getServerNameByDeathPath(serverId); + String serverName = result?CrossDeathPathLogic.getInstance().getServerNameByDeathPath(serverId):""; Family.DeathPathInfo info = Family.DeathPathInfo.newBuilder().setGuildName(crossGuild.getGuildName()).setPathId(i).setGid(guildId).setServerName(serverName).build(); response.addInfos(info); }