🐞 fix(副将): 保存副将同时返回皮肤id和武将id

This commit is contained in:
luying
2023-03-31 10:36:02 +08:00
parent f900179fbb
commit c865c475ff
9 changed files with 20 additions and 7 deletions
+2
View File
@@ -171,6 +171,7 @@ export class OppDetailHeroData {
spine: string = ''; // 动画
talent: Talent[] = [];
subHid: number = 0; // 副将
subActorId: number = 0;
artifact: HeroArtifact[] = [];
constructor(warJson: DicWarJson, defensHero: OppPlayerHeroInfo, hero: HeroType, artifacts: ArtifactModelType[]) {
@@ -201,6 +202,7 @@ export class OppDetailHeroData {
if(skin) this.talent = skin.talent;
this.job = hero.job;
this.subHid = hero.subHid;
this.subActorId = hero.subActorId;
let artifact = artifacts.find(cur => cur.seqId == hero.artifact);
if(artifact) this.artifact.push({ artifactId: artifact.artifactId, lv: artifact.lv });
}