From 48c0b940fe7b5b43dd5798681931c1e1344a8a22 Mon Sep 17 00:00:00 2001 From: duhui Date: Fri, 27 Aug 2021 16:58:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=81=E7=BB=9D=E9=98=B5=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=B7=A8=E6=9C=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ljsd/jieling/logic/family/DeathPathLogic.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); }