🐞 fix(副将): 保存副将同时返回皮肤id和武将id
This commit is contained in:
@@ -359,6 +359,7 @@ export class LadderOppDetailHeroReturn {
|
||||
spine: string = ''; // 动画
|
||||
talent: Talent[] = [];
|
||||
subHid: number = 0; // 副将
|
||||
subActorId: number = 0;
|
||||
artifact: HeroArtifact[] = [];
|
||||
|
||||
constructor(warJson: DicWarJson, defensHero: LadderDefenseHero, artifacts: ArtifactModelType[]) {
|
||||
@@ -390,6 +391,7 @@ export class LadderOppDetailHeroReturn {
|
||||
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 });
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
|
||||
@@ -206,6 +206,7 @@ export class HeroDetailParam {
|
||||
school: number;
|
||||
};
|
||||
subHid: number = 0;
|
||||
subActorId: number = 0;
|
||||
artifacts: {artifactId: number, lv: number }[] = []
|
||||
|
||||
constructor(hero: HeroType) {
|
||||
@@ -228,6 +229,7 @@ export class HeroDetailParam {
|
||||
}
|
||||
this.connections = hero.connections;
|
||||
this.subHid = hero.subHid;
|
||||
this.subActorId = hero.subActorId;
|
||||
}
|
||||
|
||||
setAttributes(attributes: {hp: number, atk: number, def: number, mdef: number}) {
|
||||
|
||||
@@ -63,6 +63,7 @@ export class HeroParam {
|
||||
|
||||
artifact: number = 0;
|
||||
subHid: number = 0;
|
||||
subActorId: number = 0;
|
||||
talent: Talent[] = [];
|
||||
usedTalentPoint: number = 0;
|
||||
totalTalentPoint: number = 0;
|
||||
@@ -98,6 +99,7 @@ export class HeroParam {
|
||||
this.ePlace = hero.ePlace;
|
||||
this.artifact = hero.artifact;
|
||||
this.subHid = hero.subHid;
|
||||
this.subActorId = hero.subActorId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user