🐞 fix(副将): 保存副将同时返回皮肤id和武将id
This commit is contained in:
@@ -52,6 +52,8 @@ export class PvpHeroInfo {
|
||||
talent?: Talent[] = []; // 品质
|
||||
@prop({ required: false })
|
||||
subHid?: number = 0; // 副将
|
||||
@prop({ required: false })
|
||||
subActorId?: number = 0; // 副将
|
||||
|
||||
@prop({ required: true, _id: false })
|
||||
attribute?: string; // 属性
|
||||
@@ -70,6 +72,7 @@ export class PvpHeroInfo {
|
||||
let skin = hero.skins?.find(cur => cur.enable);
|
||||
if(skin) this.talent = skin.talent;
|
||||
this.subHid = hero.subHid;
|
||||
this.subActorId = hero.subActorId;
|
||||
if(artifact) this.artifact.push({ artifactId: artifact.artifactId, lv: artifact.lv })
|
||||
}
|
||||
|
||||
@@ -176,6 +179,8 @@ export class PvpEnemies extends Enemies {
|
||||
talent: Talent[];
|
||||
@prop({ required: true })
|
||||
subHid: number;
|
||||
@prop({ required: true })
|
||||
subActorId: number;
|
||||
@prop({ required: true, type: () => HeroArtifact, _id: false })
|
||||
artifact: HeroArtifact[] = []; // 宝物
|
||||
|
||||
@@ -190,6 +195,7 @@ export class PvpEnemies extends Enemies {
|
||||
this.talent = heroInfo.talent;
|
||||
this.job = heroInfo.job;
|
||||
this.subHid = heroInfo.subHid;
|
||||
this.subActorId = heroInfo.subActorId;
|
||||
this.artifact = heroInfo.artifact||[];
|
||||
if(score != undefined) this.score = score;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user