🐞 fix(远征): 对手数据没有添加彩星、职业、天赋等数据
This commit is contained in:
@@ -11,6 +11,7 @@ import { Attribute, AttributeCal } from '../domain/roleField/attribute';
|
|||||||
import * as dicParam from '../pubUtils/dicParam';
|
import * as dicParam from '../pubUtils/dicParam';
|
||||||
import { getHeroesAttributes, getSumCe } from './playerCeService';
|
import { getHeroesAttributes, getSumCe } from './playerCeService';
|
||||||
import { checkSystemIsOpen } from './roleService';
|
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) {
|
if(hero) {
|
||||||
let h = <HeroType>hero.hero;
|
let h = <HeroType>hero.hero;
|
||||||
if(h) {
|
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 dicHero = gameData.hero.get(hero.hid);
|
||||||
let attr = attrByHid.get(hero.hid);
|
let attr = attrByHid.get(hero.hid);
|
||||||
let attribute = attr.getAttributesToString();
|
let attribute = attr.getAttributesToString();
|
||||||
@@ -160,11 +164,18 @@ export async function matchPlayers(roleId: string, scale: number, range: number,
|
|||||||
actorName: dicHero.name,
|
actorName: dicHero.name,
|
||||||
skill:0,
|
skill:0,
|
||||||
seid:'&',
|
seid:'&',
|
||||||
star,
|
|
||||||
spine: 0,
|
spine: 0,
|
||||||
attribute,
|
attribute,
|
||||||
lv,
|
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});
|
enemyObj.enemies.push({...json, ...heroInfo});
|
||||||
@@ -200,8 +211,18 @@ export async function matchRobots(scale: number, myCe: number, robotCe: number,
|
|||||||
if(json.relation == 2) {
|
if(json.relation == 2) {
|
||||||
const { actorId, attribute, enemyCount } = json;
|
const { actorId, attribute, enemyCount } = json;
|
||||||
|
|
||||||
|
let dicHero = gameData.hero.get(actorId);
|
||||||
let { attribute: newAttribute, ce } = getRobotAttribute(actorId, attribute, enemyCount, lv, myCe, robotCe, scale);
|
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;
|
allCe += ce;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user