远征:一键碾压

This commit is contained in:
luying
2022-07-20 14:10:12 +08:00
parent c410727430
commit 220c635ff1
6 changed files with 90 additions and 5 deletions

View File

@@ -353,7 +353,7 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
let { topLineup, topLineupCe, hasTopCeChange } = calCe.getTopLineup();
let roleCeUpdate: RoleCeUpdate = calCe.getRoleCeTable();
if(topLineupCe > roleCe?.historyLineupCe??0) {
if(topLineupCe > (roleCe?.historyLineupCe||0)) {
roleCeUpdate = { ...roleCeUpdate, historyLineupCe: topLineupCe };
}
@@ -416,7 +416,10 @@ async function updateRank(roleId: string, serverId: number, topLineupCe: number,
export async function getSumCe(roleId: string) {
let roleCe = await RoleCeModel.findByRoleId(roleId);
return roleCe.historyLineupCe;
if(roleCe && roleCe.historyLineupCe) return roleCe.historyLineupCe;
let role = await RoleModel.findByRoleId(roleId);
return role.topLineupCe||0;
}
export async function getHeroesAttributes(roleId: string) {