十绝阵,不显示跨服

duhui 2021-08-27 16:58:36 +08:00
parent f718f99b77
commit 48c0b940fe
1 changed files with 3 additions and 2 deletions

View File

@ -315,7 +315,8 @@ public class DeathPathLogic {
String key;
// 是否是跨服
Set<ZSetOperations.TypedTuple<String>> 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);
}