优化:初始账号皮肤优化
This commit is contained in:
@@ -73,13 +73,14 @@ export async function reCalAllHeroCe(type: number, roleId: string, update: RoleU
|
||||
let newAttr = new AttributeCal();
|
||||
newAttr.setByDbData(roleAttrs, heroAttrs);
|
||||
let heroCe = newAttr.calCe(); // 计算最终战力
|
||||
|
||||
let incHeroCe = heroCe - hero.ce;
|
||||
allIncCe += incHeroCe;
|
||||
roleCe += heroCe;
|
||||
pushHeros.push({ hid: hero.hid, ce: reduceCe(hero.ce), incHeroCe: reduceCe(incHeroCe) });
|
||||
await HeroModel.updateHeroInfo(roleId, hero.hid, { ce: heroCe });
|
||||
await PvpDefenseModel.updateCe(roleId, hero.hid, incHeroCe); // 更新pvp防守阵战力
|
||||
if(heroCe != hero.ce) {
|
||||
let incHeroCe = heroCe - hero.ce;
|
||||
allIncCe += incHeroCe;
|
||||
roleCe += heroCe;
|
||||
pushHeros.push({ hid: hero.hid, ce: reduceCe(hero.ce + heroCe), incHeroCe: reduceCe(incHeroCe) });
|
||||
await HeroModel.updateHeroInfo(roleId, hero.hid, { ce: heroCe });
|
||||
await PvpDefenseModel.updateCe(roleId, hero.hid, incHeroCe); // 更新pvp防守阵战力
|
||||
}
|
||||
|
||||
}
|
||||
let { topLineup, topLineupCe } = await calculatetopLineup(role); // 计算更新最强五人战力
|
||||
|
||||
Reference in New Issue
Block a user