武将:抽象武将创建接口
This commit is contained in:
@@ -252,11 +252,9 @@ export default class GMUsers extends Service {
|
||||
if(hero) continue;
|
||||
let dicHero = ctx.service.utils.getHeroById(hid);
|
||||
if(!dicHero) continue;
|
||||
let {quality, initialStars: star, jobid: job, name: hName, initialSkin} = dicHero;
|
||||
const heroInfo = {
|
||||
roleId, roleName: role.roleName, hid, hName, star, quality, job, serverId: role.serverId,
|
||||
lv: hlv, exp: getHeroExpByLv(hlv - 1)||0,
|
||||
skins:[{id: initialSkin, enable: true}],
|
||||
roleId, roleName: role.roleName, hid, serverId: role.serverId,
|
||||
lv: hlv, exp: getHeroExpByLv(hlv - 1)||0
|
||||
}
|
||||
heroInfos.push(heroInfo);
|
||||
}
|
||||
@@ -267,7 +265,7 @@ export default class GMUsers extends Service {
|
||||
|
||||
try {
|
||||
for(let heroInfo of heroInfos) {
|
||||
await pubCreateHero(heroInfo.roleId, heroInfo);
|
||||
await pubCreateHero(heroInfo.roleId, heroInfo.roleName, heroInfo.serverId, heroInfo);
|
||||
}
|
||||
return ctx.service.utils.resResult(STATUS.SUCCESS, { uids });
|
||||
} catch(e) {
|
||||
|
||||
Reference in New Issue
Block a user