pvp:修复全局战力未计入pvp的问题
This commit is contained in:
@@ -305,7 +305,7 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
|
||||
let hero = await HeroModel.updateHeroInfo(roleId, hid, { ...heroUpdate, ce });
|
||||
calCe.setResultHero(hero);
|
||||
heroes.push(hero);
|
||||
await PvpDefenseModel.updateCe(roleId, hid, inc); // 更新pvp防守阵战力
|
||||
await PvpDefenseModel.updateCe(roleId, hid, ce); // 更新pvp防守阵战力
|
||||
pushHeros.push({ hid, ce, incHeroCe: inc });
|
||||
changeHids.push(hid);
|
||||
} else {
|
||||
@@ -316,6 +316,7 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
|
||||
for(let [hid, { ce, inc }] of heroCe) {
|
||||
if(changeHids.indexOf(hid) == -1) {
|
||||
let hero = await HeroModel.updateHeroInfo(roleId, hid, { ce });
|
||||
await PvpDefenseModel.updateCe(roleId, hid, ce); // 更新pvp防守阵战力
|
||||
pushHeros.push({ hid, ce: hero.ce, incHeroCe: inc });
|
||||
changeHids.push(hid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user