✨ feat(副将): 设置副将
This commit is contained in:
@@ -342,6 +342,7 @@ export class LadderOppDetailHeroReturn {
|
||||
seid: string = ''; // 技能
|
||||
spine: string = ''; // 动画
|
||||
talent: Talent[] = [];
|
||||
subHid: number = 0; // 副将
|
||||
|
||||
constructor(warJson: DicWarJson, defensHero: LadderDefenseHero) {
|
||||
this.dataId = warJson.dataId;
|
||||
@@ -371,6 +372,7 @@ export class LadderOppDetailHeroReturn {
|
||||
let skin = hero.skins.find(cur => cur.enable);
|
||||
if(skin) this.talent = skin.talent;
|
||||
this.job = hero.job;
|
||||
this.subHid = hero.subHid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,8 @@ export class PvpHeroInfo {
|
||||
quality?: number = 0; // 品质
|
||||
@prop({ required: false, type: Talent, _id: false })
|
||||
talent?: Talent[] = []; // 品质
|
||||
@prop({ required: false })
|
||||
subHid?: number = 0; // 副将
|
||||
|
||||
@prop({ required: true, _id: false })
|
||||
attribute?: string; // 属性
|
||||
@@ -54,6 +56,7 @@ export class PvpHeroInfo {
|
||||
this.quality = hero.quality;
|
||||
let skin = hero.skins?.find(cur => cur.enable);
|
||||
if(skin) this.talent = skin.talent;
|
||||
this.subHid = hero.subHid;
|
||||
}
|
||||
|
||||
setRobotInfo(dicHero: DicHero, lv: number) {
|
||||
@@ -145,6 +148,8 @@ export class PvpEnemies extends Enemies {
|
||||
score: number;
|
||||
@prop({ required: true, type: () => Talent, _id: false })
|
||||
talent: Talent[];
|
||||
@prop({ required: true })
|
||||
subHid: number;
|
||||
|
||||
// score: 这个武将的军功
|
||||
constructor(warjson: DicWarJson, heroInfo: PvpHeroInfo, score: number, ce: number) {
|
||||
@@ -156,6 +161,7 @@ export class PvpEnemies extends Enemies {
|
||||
this.score = score;
|
||||
this.talent = heroInfo.talent;
|
||||
this.job = heroInfo.job;
|
||||
this.subHid = heroInfo.subHid;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -200,6 +200,7 @@ export class HeroDetailParam {
|
||||
teraph: number;
|
||||
school: number;
|
||||
};
|
||||
subHid: number = 0;
|
||||
|
||||
constructor(hero: HeroType) {
|
||||
this.roleId = hero.roleId;
|
||||
@@ -220,6 +221,7 @@ export class HeroDetailParam {
|
||||
}
|
||||
}
|
||||
this.connections = hero.connections;
|
||||
this.subHid = hero.subHid;
|
||||
}
|
||||
|
||||
setAttributes(attributes: {hp: number, atk: number, def: number, mdef: number}) {
|
||||
|
||||
Reference in New Issue
Block a user