Merge branch 'master_test_gn_arena' into master_test_gn

back_recharge
duhui 2021-07-30 19:08:38 +08:00
commit e44ee9244b
3 changed files with 10 additions and 2 deletions

View File

@ -25,12 +25,13 @@ public class ArenaOfPlayerManager {
private int maxFore; private int maxFore;
public ArenaOfPlayerManager(int uId, int level, String name, int head, int headFrame, String guildName, int userTitle, int userMount, int practiceLevel, int serverId, String serverName,int gender,int skin) { public ArenaOfPlayerManager(int uId, int level, String name, int head, int headFrame, int guildId, String guildName, int userTitle, int userMount, int practiceLevel, int serverId, String serverName, int gender, int skin, int maxFore) {
this.uId = uId; this.uId = uId;
this.level = level; this.level = level;
this.name = name; this.name = name;
this.head = head; this.head = head;
this.headFrame = headFrame; this.headFrame = headFrame;
this.guildId = guildId;
this.guildName = guildName; this.guildName = guildName;
this.userTitle = userTitle; this.userTitle = userTitle;
this.userMount = userMount; this.userMount = userMount;
@ -39,6 +40,7 @@ public class ArenaOfPlayerManager {
this.serverName = serverName; this.serverName = serverName;
this.gender = gender; this.gender = gender;
this.skin = skin; this.skin = skin;
this.maxFore = maxFore;
} }
public ArenaOfPlayerManager() { public ArenaOfPlayerManager() {

View File

@ -62,10 +62,16 @@ public class CrossRankManager {
if(crossGroup != -1){ if(crossGroup != -1){
AbstractRank rank = RankContext.getRankEnum(type); AbstractRank rank = RankContext.getRankEnum(type);
String key = RedisUtil.getInstence().getKey(rank.getCrossRedisKey(),"",false); String key = RedisUtil.getInstence().getKey(rank.getCrossRedisKey(),"",false);
Map<Integer, GuildCache> cacheMap = RedisUtil.getInstence().getMapValues(RedisKey.FAMILY_INFO, "", Integer.class, GuildCache.class);
Set<ZSetOperations.TypedTuple<String>> range = RedisUtil.getInstence().getZsetreverseRangeWithScores(rank.getRedisKey(), "", 0, 100, true); Set<ZSetOperations.TypedTuple<String>> range = RedisUtil.getInstence().getZsetreverseRangeWithScores(rank.getRedisKey(), "", 0, 100, true);
for (ZSetOperations.TypedTuple<String> tuple : range) { for (ZSetOperations.TypedTuple<String> tuple : range) {
if (tuple.getValue().length() == 8){ if (tuple.getValue().length() == 8){
rank.crossUserCache(Integer.parseInt(tuple.getValue())); rank.crossUserCache(Integer.parseInt(tuple.getValue()));
}else {
GuildCache cache = cacheMap.get(Integer.valueOf(tuple.getValue()));
if (cache != null){
rank.crossUserCache(cache.getLeaderUId());
}
} }
RedisUtil.getInstence().zsetAddOne(key,tuple.getValue(),tuple.getScore()); RedisUtil.getInstence().zsetAddOne(key,tuple.getValue(),tuple.getScore());
} }