pvp保存阵容
This commit is contained in:
@@ -16,7 +16,7 @@ import { DicRandomEffectPool } from './dictionary/DicRandomEffectPool';
|
||||
import { getGoodById } from './gamedata';
|
||||
import { SchoolModel } from '../db/School';
|
||||
import { getTeraphAttr, HEROTARIN } from '../consts/constModules/abilityConst'
|
||||
import { PvpDefenseModel } from '../db/PvpDefense';
|
||||
// import { PvpDefenseModel } from '../db/PvpDefense';
|
||||
const HERO_CE_RATIO = 100;
|
||||
const _ = require('underscore');
|
||||
//战力计算TODO
|
||||
@@ -108,7 +108,7 @@ export async function calPlayerCeAndSave(roleId: string, heros: Array<HeroType>,
|
||||
incPlayerCe += incHeroCe;
|
||||
await calculateTopFive(role, hero.hid, hero.ce, hero._id); // 计算更新最强五人战力
|
||||
await HeroModel.updateHeroInfo(roleId, hero.hid, hero);
|
||||
await PvpDefenseModel.updateCe(roleId, hero.hid, hero.ce); // 更新pvp防守阵最强五人战力
|
||||
//await PvpDefenseModel.updateCe(roleId, hero.hid, hero.ce); // 更新pvp防守阵最强五人战力
|
||||
pushHeros.push({
|
||||
hid: hero.hid,
|
||||
ce: reduceCe(hero.ce),
|
||||
@@ -152,7 +152,6 @@ async function calculateTopFive(role: RoleType, hid: number, ce: number, heroId:
|
||||
|
||||
role.topFive = topFive;
|
||||
role.topFiveCe = topFiveCe;
|
||||
|
||||
return role;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user