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

@@ -1,4 +1,4 @@
import { FIX_SMS_CODE_TELS, COUNTER } from '@consts';
import { FIX_SMS_CODE_TELS, COUNTER, HERO_SYSTEM_TYPE } from '@consts';
import { DEFAULT_HEROES } from '@consts';
import { HeroModel } from '@db/Hero';
import { RoleModel } from '@db/Role';
@@ -8,6 +8,7 @@ import { smsModel } from '@db/Sms';
import { Service } from 'egg';
import Counter from '@db/Counter';
import { getHeroInfoById } from 'app/pubUtils/gamedata';
import { calPlayerCeAndSave, getAllAttrStage } from 'app/pubUtils/playerCe';
const _ = require('underscore');
/**
@@ -147,7 +148,7 @@ export default class Auth extends Service {
hero = await HeroModel.createHero({
roleId, roleName: role.roleName, hid, hName, star, quality, job, serverId: role.serverId
});
await calPlayerCeAndSave(roleId, [hero], HERO_SYSTEM_TYPE.STAR, getAllAttrStage());
}
return ctx.service.utils.resResult(STATUS.SUCCESS, { roleId: role.roleId });
}