🐞 fix(远征): 对手数据没有添加彩星、职业、天赋等数据
This commit is contained in:
@@ -11,6 +11,7 @@ import { Attribute, AttributeCal } from '../domain/roleField/attribute';
|
||||
import * as dicParam from '../pubUtils/dicParam';
|
||||
import { getHeroesAttributes, getSumCe } from './playerCeService';
|
||||
import { checkSystemIsOpen } from './roleService';
|
||||
import { ArtifactModel } from '../db/Artifact';
|
||||
|
||||
/**
|
||||
* 获取远征关卡列表
|
||||
@@ -150,7 +151,10 @@ export async function matchPlayers(roleId: string, scale: number, range: number,
|
||||
if(hero) {
|
||||
let h = <HeroType>hero.hero;
|
||||
if(h) {
|
||||
let { star, lv, ce } = h;
|
||||
let { star, lv, ce, skins, colorStar, quality, job, subHid = 0, subActorId = 0 } = h;
|
||||
let artifact = h.artifact? await ArtifactModel.findbySeqId(role.roleId, h.artifact): null;
|
||||
let skin = skins?.find(cur => cur.enable);
|
||||
|
||||
let dicHero = gameData.hero.get(hero.hid);
|
||||
let attr = attrByHid.get(hero.hid);
|
||||
let attribute = attr.getAttributesToString();
|
||||
@@ -160,11 +164,18 @@ export async function matchPlayers(roleId: string, scale: number, range: number,
|
||||
actorName: dicHero.name,
|
||||
skill:0,
|
||||
seid:'&',
|
||||
star,
|
||||
spine: 0,
|
||||
attribute,
|
||||
lv,
|
||||
ce
|
||||
ce,
|
||||
star,
|
||||
colorStar,
|
||||
quality,
|
||||
job,
|
||||
talent: skin? skin.talent: [],
|
||||
artifact: artifact? [{ artifactId: artifact.artifactId, lv: artifact.lv }]: [],
|
||||
subHid,
|
||||
subActorId
|
||||
};
|
||||
|
||||
enemyObj.enemies.push({...json, ...heroInfo});
|
||||
@@ -200,8 +211,18 @@ export async function matchRobots(scale: number, myCe: number, robotCe: number,
|
||||
if(json.relation == 2) {
|
||||
const { actorId, attribute, enemyCount } = json;
|
||||
|
||||
let dicHero = gameData.hero.get(actorId);
|
||||
let { attribute: newAttribute, ce } = getRobotAttribute(actorId, attribute, enemyCount, lv, myCe, robotCe, scale);
|
||||
enemyObj.enemies.push({...json, skinId: json.actorId, attribute: newAttribute, lv, ce});
|
||||
enemyObj.enemies.push({...json, skinId: json.actorId, attribute: newAttribute, lv, ce,
|
||||
star: dicHero.initialStar,
|
||||
colorStar: dicHero.initialColorStar,
|
||||
quality: dicHero.quality,
|
||||
job: dicHero.jobid,
|
||||
talent: [],
|
||||
artifact: [],
|
||||
subHid: 0,
|
||||
subActorId: 0
|
||||
});
|
||||
allCe += ce;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user