修改远征创建记录逻辑
This commit is contained in:
@@ -121,7 +121,7 @@ export function decodeIdCntArrayStr(str: string, multi: number) {
|
||||
// 计算当前武将战力
|
||||
export async function calculateSumCE(roleId: string, type: number, param: { num?: number, heroes?: Array<number> }) {
|
||||
let sum;
|
||||
if(type == 1) { // 最高num人战力和
|
||||
if(type == 1) { // 最高num人历史最高战力和
|
||||
sum = await HeroModel.sumTopHeroCe(roleId, param.num||0);
|
||||
} else if(type == 2) { // 所有人战力和
|
||||
sum = await HeroModel.sumHeroCe(roleId);
|
||||
@@ -329,7 +329,8 @@ export function setLocalHours(hour: number, curTime = new Date()) {
|
||||
|
||||
export async function updateCe(roleId: string, hero: any ) {
|
||||
let {hid, ce: oldCe, historyCe} = hero;
|
||||
let actor = new Actor(hero);
|
||||
let actor = new Actor();
|
||||
actor.initHero(hero);
|
||||
let ce = actor.calculateCE();
|
||||
if(ce != oldCe) {
|
||||
// 更新总战力&最强五人战力
|
||||
@@ -339,4 +340,4 @@ export async function updateCe(roleId: string, hero: any ) {
|
||||
// 更新武将战力,历史最高战力
|
||||
await HeroModel.updateCe(roleId, hid, ce, oldCe, historyCe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user