fix地图排行数据

back_recharge
wangyuan 2019-04-29 18:17:04 +08:00
parent 39734e733f
commit 1aaddcb350
1 changed files with 8 additions and 9 deletions

View File

@ -1315,10 +1315,6 @@ public class MapLogic {
if (crossInfo == null) {
crossInfo = new CrossInfo();
}
int beforTime = crossInfo.getLeastTime();
if (useTime < crossInfo.getLeastTime()) {
crossInfo.setLeastTime(useTime);
}
Set<Integer> stars = mapManager.getStars();
if (stars == null) {
stars = new HashSet<>();
@ -1329,6 +1325,9 @@ public class MapLogic {
if (useTime > 0 && useTime <= sChallengeConfig.getTime()) {
stars.add(STAR_2);
mapManager.setStars(stars);
}
if (useTime > 0 && useTime < crossInfo.getLeastTime()) {
crossInfo.setLeastTime(useTime);
List<TeamPosHeroInfo> teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(mapManager.getTeamId());
int heroForces = 0;
crossInfo.getHeroIds().clear();
@ -1341,11 +1340,11 @@ public class MapLogic {
crossInfo.getHeroIds().add(hero.getTemplateId());
}
crossInfo.setForces(heroForces);
}
SChallengeMapConfig sChallengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapManager.getCurMapId());
if (sChallengeMapConfig.getIfRank() == 1 && useTime > 0 && useTime < beforTime) {
String key = RedisKey.getKey(RedisKey.MAP_RANK, Integer.toString(mapManager.getCurMapId()), false);
RedisUtil.getInstence().zsetAddOne(key, mapManager.getRootId(), useTime);
SChallengeMapConfig sChallengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapManager.getCurMapId());
if (sChallengeMapConfig.getIfRank() == 1) {
String key = RedisKey.getKey(RedisKey.MAP_RANK, Integer.toString(mapManager.getCurMapId()), false);
RedisUtil.getInstence().zsetAddOne(key, mapManager.getRootId(), useTime);
}
}
mapManager.updateCrossInfoMap(mapManager.getCurMapId(), crossInfo);
}