From a5b376e1d1014fa8088eba3382add94033afe424 Mon Sep 17 00:00:00 2001 From: luying Date: Mon, 5 Jun 2023 16:06:46 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E8=BF=9C=E5=BE=81):=20?= =?UTF-8?q?=E5=AF=B9=E6=89=8B=E6=95=B0=E6=8D=AE=E6=B2=A1=E6=9C=89=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=BD=A9=E6=98=9F=E3=80=81=E8=81=8C=E4=B8=9A=E3=80=81?= =?UTF-8?q?=E5=A4=A9=E8=B5=8B=E7=AD=89=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/expeditionService.ts | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/game-server/app/services/expeditionService.ts b/game-server/app/services/expeditionService.ts index 37c9f9197..9abf8cded 100644 --- a/game-server/app/services/expeditionService.ts +++ b/game-server/app/services/expeditionService.ts @@ -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 = 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; } }