fix bug 修复计算最强5人战力
This commit is contained in:
+1
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user