武将:修复获取全部武将接口
This commit is contained in:
@@ -625,20 +625,17 @@ export class HeroHandler {
|
|||||||
return resResult(STATUS.TOKEN_ERR);
|
return resResult(STATUS.TOKEN_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
let dicHero = gameData.hero;
|
|
||||||
if (!dicHero) return resResult(STATUS.HERO_NOT_FIND);
|
|
||||||
|
|
||||||
let heroes = await HeroModel.findByRole(roleId);
|
let heroes = await HeroModel.findByRole(roleId);
|
||||||
let heroInfos = [];
|
let heroInfos = [];
|
||||||
|
|
||||||
for (let [hid, dic] of dicHero) {
|
for(let { actorId } of gameData.recruit) {
|
||||||
if(hid < 300 && dic.initialSkin > 0) {
|
let dicHero = gameData.hero.get(actorId);
|
||||||
let hasHero = heroes.findIndex(cur => cur.hid == hid);
|
if(!dicHero) continue;
|
||||||
if(hasHero == -1) {
|
let hasHero = heroes.findIndex(cur => cur.hid == actorId);
|
||||||
heroInfos.push({
|
if(hasHero == -1) {
|
||||||
hid, star: 6, colorStar: 6, quality: 4
|
heroInfos.push({
|
||||||
});
|
hid: actorId, star: 6, colorStar: 6, quality: 4
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let resultHeroes = await createHeroes(roleId, roleName, sid, serverId, heroInfos);
|
let resultHeroes = await createHeroes(roleId, roleName, sid, serverId, heroInfos);
|
||||||
|
|||||||
Reference in New Issue
Block a user