新建武将时计算初始战力

This commit is contained in:
luying
2020-12-23 18:37:59 +08:00
parent 5cbeaa83e9
commit 3732c536d2
5 changed files with 67 additions and 10 deletions

View File

@@ -25,7 +25,7 @@ import { ITID, COUNTER } from '@consts';
import Actor from '@pubUtils/actor';
import { ItemModel } from '@db/Item';
import { gameData } from '@pubUtils/data';
import { calPlayerCeAndSave, getAllAttrStage } from '@pubUtils/playerCe';
import { calPlayerCeAndSave } from '@pubUtils/playerCe';
/**
* Test Service
@@ -213,7 +213,7 @@ export default class GMUsers extends Service {
try {
for(let heroInfo of heroInfos) {
let hero = await HeroModel.createHero(heroInfo);
await calPlayerCeAndSave(hero.roleId, [hero], HERO_SYSTEM_TYPE.STAR, getAllAttrStage());
await calPlayerCeAndSave(heroInfo.roleId, [hero], HERO_SYSTEM_TYPE.INIT);
}
return ctx.service.utils.resResult(STATUS.SUCCESS, { uids });
} catch(e) {