世界等级计算
parent
1482e79903
commit
51ffb72fe6
|
|
@ -174,8 +174,9 @@ public class GlobleSystemLogic implements IEventHandler {
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
setGlobalWorldLevelCache((int)Math.ceil(sum/ (double) Math.min(rankInfo.size(),rankEndLine)));
|
int level = (int) Math.ceil(sum / (double) Math.min(rankInfo.size(), rankEndLine));
|
||||||
|
setGlobalWorldLevelCache(level);
|
||||||
|
LOGGER.info("计算了一次世界等级->{}",level);
|
||||||
// if (rankInfo.size() > rankEndLine + 100) {
|
// if (rankInfo.size() > rankEndLine + 100) {
|
||||||
// //删除多余数据 预留一些 长度maxSize
|
// //删除多余数据 预留一些 长度maxSize
|
||||||
// String key = RedisKey.getKey(RedisKey.WORLD_CALCUL_LEVE_RAND, "", false);
|
// String key = RedisKey.getKey(RedisKey.WORLD_CALCUL_LEVE_RAND, "", false);
|
||||||
|
|
@ -188,7 +189,6 @@ public class GlobleSystemLogic implements IEventHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getGlobalWorldLevelCache() {
|
public static int getGlobalWorldLevelCache() {
|
||||||
GLOABLE_WORLD_LEVE_CACHE = 120;
|
|
||||||
if (GLOABLE_WORLD_LEVE_CACHE!=0)
|
if (GLOABLE_WORLD_LEVE_CACHE!=0)
|
||||||
return GLOABLE_WORLD_LEVE_CACHE;
|
return GLOABLE_WORLD_LEVE_CACHE;
|
||||||
Integer level = RedisUtil.getInstence().getMapValue(RedisKey.SERVER_WORLDLEVE_INFO, "",String.valueOf(GameApplication.serverId),Integer.class);
|
Integer level = RedisUtil.getInstence().getMapValue(RedisKey.SERVER_WORLDLEVE_INFO, "",String.valueOf(GameApplication.serverId),Integer.class);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue