fix bug 修复计算最强5人战力

This commit is contained in:
luying
2020-11-16 09:56:53 +08:00
parent ada3cfe849
commit d5a5cfc270
5 changed files with 12 additions and 7 deletions
+1 -3
View File
@@ -340,11 +340,9 @@ export default class Role extends BaseModel {
if(topFive.length < 5) { // 不满5人
topFive.push({hid, ce});
} else if(topFive.length == 5){
if(ce > topFive[topFive.length - 1].ce) { // 跻身最强6
if(ce > topFive[topFive.length - 1].ce) { // 跻身最强5
topFive.pop();
topFive.push({hid, ce});
} else {
topFive[index].ce = ce;
}
} else {
topFive.splice(5, topFive.length - 5);