generated from root/miduo_server
排行榜取关卡信息做容错处理
parent
d2d00fd9a4
commit
aa3cf1fb0c
|
|
@ -80,11 +80,16 @@ public abstract class AbstractRank implements IRank {
|
||||||
rankList.sort((c1,c2)->{
|
rankList.sort((c1,c2)->{
|
||||||
long mainLevelId1 = c1.getRankInfo().getParam1();
|
long mainLevelId1 = c1.getRankInfo().getParam1();
|
||||||
SMainLevelConfig mainLevelConfig1 = SMainLevelConfig.config.get((int)mainLevelId1);
|
SMainLevelConfig mainLevelConfig1 = SMainLevelConfig.config.get((int)mainLevelId1);
|
||||||
int score1 = mainLevelConfig1.getVirtureId();
|
int score1 = 0;
|
||||||
|
int score2 = 0;
|
||||||
|
if(mainLevelConfig1!= null){
|
||||||
|
score1 = mainLevelConfig1.getVirtureId();
|
||||||
|
}
|
||||||
long mainLevelId2 = c2.getRankInfo().getParam1();
|
long mainLevelId2 = c2.getRankInfo().getParam1();
|
||||||
SMainLevelConfig mainLevelConfig2 = SMainLevelConfig.config.get((int)mainLevelId2);
|
SMainLevelConfig mainLevelConfig2 = SMainLevelConfig.config.get((int)mainLevelId2);
|
||||||
int score2 = mainLevelConfig2.getVirtureId();
|
if(mainLevelConfig2 != null){
|
||||||
|
score2 = mainLevelConfig2.getVirtureId();
|
||||||
|
}
|
||||||
if (score1 != score2) return (score2 - score1);
|
if (score1 != score2) return (score2 - score1);
|
||||||
return c2.getForce() - c1.getForce();
|
return c2.getForce() - c1.getForce();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue