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