fix 合成装备bug

This commit is contained in:
luying
2020-12-21 11:45:16 +08:00
parent e05577bae8
commit dc527cae2e
11 changed files with 759 additions and 713 deletions

View File

@@ -20,11 +20,12 @@ import { PvpDefenseModel } from '@db/PvpDefense';
import { Service } from 'egg';
import Counter from '@db/Counter';
import { STATUS } from '@consts';
import { STATUS, HERO_SYSTEM_TYPE } from '@consts';
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';
/**
* Test Service
@@ -210,7 +211,8 @@ export default class GMUsers extends Service {
try {
for(let heroInfo of heroInfos) {
await HeroModel.createHero(heroInfo);
let hero = await HeroModel.createHero(heroInfo);
await calPlayerCeAndSave(hero.roleId, [hero], HERO_SYSTEM_TYPE.STAR, getAllAttrStage());
}
return ctx.service.utils.resResult(STATUS.SUCCESS, { uids });
} catch(e) {