pvp排行榜展示
This commit is contained in:
@@ -242,7 +242,7 @@ export async function defaultHeroes ( role:RoleType, challengeCnt?:number, chall
|
||||
let { heroes } = await PvpDefenseModel.findByRoleId(role.roleId);
|
||||
var orders = [1, 2, 3, 4, 5];
|
||||
heroes.sort(function(a, b) {
|
||||
if (!!a.order) {
|
||||
if (!!a.order&& !!a.hero) {
|
||||
let index = orders.indexOf(a.order);
|
||||
orders.splice(index, 1);
|
||||
}
|
||||
@@ -278,6 +278,7 @@ export async function defaultHeroes ( role:RoleType, challengeCnt?:number, chall
|
||||
}
|
||||
} else {
|
||||
heroes[index].ce = item.ce;
|
||||
heroes[index].hero = item.hero;
|
||||
if (!heroes[index].order) {
|
||||
heroes[index].order = orders[0];
|
||||
orders.splice(0, 1);
|
||||
|
||||
Reference in New Issue
Block a user