跨服工会修改

back_recharge
duhui 2021-07-30 19:03:48 +08:00
parent 07287547b0
commit e39df9d30b
3 changed files with 10 additions and 2 deletions

View File

@ -25,12 +25,13 @@ public class ArenaOfPlayerManager {
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.level = level;
this.name = name;
this.head = head;
this.headFrame = headFrame;
this.guildId = guildId;
this.guildName = guildName;
this.userTitle = userTitle;
this.userMount = userMount;
@ -39,6 +40,7 @@ public class ArenaOfPlayerManager {
this.serverName = serverName;
this.gender = gender;
this.skin = skin;
this.maxFore = maxFore;
}
public ArenaOfPlayerManager() {

View File

@ -62,10 +62,16 @@ public class CrossRankManager {
if(crossGroup != -1){
AbstractRank rank = RankContext.getRankEnum(type);
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);
for (ZSetOperations.TypedTuple<String> tuple : range) {
if (tuple.getValue().length() == 8){
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());
}