redis key
parent
9968986c49
commit
ac596f4612
|
@ -1343,7 +1343,7 @@ public class MapLogic {
|
||||||
}
|
}
|
||||||
SChallengeMapConfig sChallengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapManager.getCurMapId());
|
SChallengeMapConfig sChallengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapManager.getCurMapId());
|
||||||
if (sChallengeMapConfig.getIfRank() == 1 && useTime > 0 && useTime < beforTime) {
|
if (sChallengeMapConfig.getIfRank() == 1 && useTime > 0 && useTime < beforTime) {
|
||||||
String key = RedisKey.getKey(RedisKey.MAP_RANK, Integer.toString(mapManager.getCurMapId()), true);
|
String key = RedisKey.getKey(RedisKey.MAP_RANK, Integer.toString(mapManager.getCurMapId()), false);
|
||||||
RedisUtil.getInstence().zsetAddOne(key, mapManager.getRootId(), useTime);
|
RedisUtil.getInstence().zsetAddOne(key, mapManager.getRootId(), useTime);
|
||||||
}
|
}
|
||||||
mapManager.updateCrossInfoMap(mapManager.getCurMapId(), crossInfo);
|
mapManager.updateCrossInfoMap(mapManager.getCurMapId(), crossInfo);
|
||||||
|
@ -1360,7 +1360,7 @@ public class MapLogic {
|
||||||
* @param messageType
|
* @param messageType
|
||||||
*/
|
*/
|
||||||
public void getMapRank(ISession session, int mapId, MessageTypeProto.MessageType messageType) throws Exception {
|
public void getMapRank(ISession session, int mapId, MessageTypeProto.MessageType messageType) throws Exception {
|
||||||
String key = RedisKey.getKey(RedisKey.MAP_RANK, Integer.toString(mapId), true);
|
String key = RedisKey.getKey(RedisKey.MAP_RANK, Integer.toString(mapId), false);
|
||||||
Set<String> zset = RedisUtil.getInstence().getZset(key, 0, 10);
|
Set<String> zset = RedisUtil.getInstence().getZset(key, 0, 10);
|
||||||
List<MapInfoProto.MapRankInfo> mapRankInfos = new ArrayList<>(10);
|
List<MapInfoProto.MapRankInfo> mapRankInfos = new ArrayList<>(10);
|
||||||
int rank = 1;
|
int rank = 1;
|
||||||
|
@ -1848,7 +1848,7 @@ public class MapLogic {
|
||||||
public void minuteCheckAndRemoveMapRank(){
|
public void minuteCheckAndRemoveMapRank(){
|
||||||
Map<Integer, Map<Integer, SCMap>> sCMap = SCMap.sCMap;
|
Map<Integer, Map<Integer, SCMap>> sCMap = SCMap.sCMap;
|
||||||
for(Integer mapId : sCMap.keySet()){
|
for(Integer mapId : sCMap.keySet()){
|
||||||
String key = RedisKey.getKey(RedisKey.MAP_RANK, Integer.toString(mapId), true);
|
String key = RedisKey.getKey(RedisKey.MAP_RANK, Integer.toString(mapId), false);
|
||||||
int size = RedisUtil.getInstence().getZsetSize(key);
|
int size = RedisUtil.getInstence().getZsetSize(key);
|
||||||
if(size>15){
|
if(size>15){
|
||||||
RedisUtil.getInstence().removeZSetRangeByRank(key, 15,size);
|
RedisUtil.getInstence().removeZSetRangeByRank(key, 15,size);
|
||||||
|
|
Loading…
Reference in New Issue