寻宝:roleStatus.heroes格式修改
This commit is contained in:
@@ -15,6 +15,7 @@ import { checkActivityTask, checkTask } from './taskService';
|
||||
import { getRandExpedition, gameData } from '../pubUtils/data';
|
||||
import { ItemInter, RewardInter } from '../pubUtils/interface';
|
||||
import { getTimeFunM } from '../pubUtils/timeUtil';
|
||||
import { ComRoleStatusHero } from '../db/ComBattleTeam';
|
||||
|
||||
/**
|
||||
* 获取当前镇念塔状态
|
||||
@@ -461,10 +462,17 @@ export function getRandRobot(cnt = 1, withAttr = false) {
|
||||
const warInfo = gameData.warJson.get(info.warId);
|
||||
if (!warInfo || !warInfo.length) continue;
|
||||
|
||||
let heroes = [];
|
||||
let heroes: ComRoleStatusHero[] = [];
|
||||
for (let hero of warInfo) {
|
||||
if (hero && hero.relation === 2 && hero.actorId) {
|
||||
heroes.push(hero.actorId);
|
||||
let dicHero = gameData.hero.get(hero.actorId);
|
||||
heroes.push({
|
||||
id: hero.actorId,
|
||||
star: hero.star,
|
||||
colorStar: 0,
|
||||
lv: hero.lv,
|
||||
quality: dicHero.quality
|
||||
});
|
||||
}
|
||||
}
|
||||
robots.push(heroes);
|
||||
|
||||
Reference in New Issue
Block a user