后台,初始账号时武将lv和exp匹配

This commit is contained in:
luying
2020-12-14 14:52:21 +08:00
parent 16d34a43fa
commit b27f684e1f
5 changed files with 16 additions and 8 deletions
+3 -1
View File
@@ -25,6 +25,7 @@ import { STATUS } from '@consts/statusCode';
import { ITID, COUNTER } from '@consts/consts';
import Actor from '@pubUtils/actor';
import { ItemModel } from '@db/Item';
import { getHeroExpByLv } from '@pubUtils/gamedata';
/**
* Test Service
@@ -187,6 +188,7 @@ export default class GMUsers extends Service {
if(isNaN(hid)) return ctx.service.utils.resResult(STATUS.WRONG_PARMS);
}
let exp = getHeroExpByLv(hlv);
let heroInfos = new Array();
for(let roleId of uids) {
let role = await RoleModel.findByRoleId(roleId);
@@ -199,7 +201,7 @@ export default class GMUsers extends Service {
let {quality, initialStars: star, jobid: job, name: hName} = dicHero;
const heroInfo = {
roleId, roleName: role.roleName, hid, hName, star, quality, job, serverId: role.serverId,
lv: hlv
lv: hlv, exp
}
heroInfos.push(heroInfo);
}