✨ feat(副将): pvp相关副将设置
This commit is contained in:
@@ -134,8 +134,6 @@ 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;
|
||||
this.subActorId = hero.subActorId;
|
||||
if(artifact) this.artifact.push(artifact);
|
||||
this.ePlace = ePlace;
|
||||
}
|
||||
@@ -158,6 +156,12 @@ export class PvpHeroInfo {
|
||||
setOutIndex(order: number) {
|
||||
this.outIndex = order;
|
||||
}
|
||||
|
||||
setSubHero(subHero: HeroType) {
|
||||
console.log('#### setSubHero', subHero)
|
||||
this.subHid = subHero?.skinId||0;
|
||||
this.subActorId = subHero?.hid||0;
|
||||
}
|
||||
}
|
||||
|
||||
export class GVGHeroInfo extends PvpHeroInfo {
|
||||
@@ -250,7 +254,7 @@ export class PvpEnemies extends Enemies {
|
||||
|
||||
|
||||
// score: 这个武将的军功
|
||||
constructor(warjson: DicWarJson, heroInfo: PvpHeroInfo, score?: number, ce?: number) {
|
||||
constructor(warjson: DicWarJson, heroInfo: PvpHeroInfo, score?: number, ce?: number, subHero?: HeroType) {
|
||||
super(warjson, heroInfo, ce);
|
||||
this.star = heroInfo.star;
|
||||
this.colorStar = heroInfo.colorStar;
|
||||
@@ -258,8 +262,8 @@ export class PvpEnemies extends Enemies {
|
||||
this.lv = heroInfo.lv;
|
||||
this.talent = heroInfo.talent;
|
||||
this.job = heroInfo.job;
|
||||
this.subHid = heroInfo.subHid;
|
||||
this.subActorId = heroInfo.subActorId;
|
||||
this.subHid = subHero?.hid||heroInfo.subHid||0;
|
||||
this.subActorId = subHero?.skinId||heroInfo.subActorId||0;
|
||||
this.artifact = heroInfo.artifact||[];
|
||||
this.ePlace = heroInfo.ePlace||[];
|
||||
if(score != undefined) this.score = score;
|
||||
|
||||
Reference in New Issue
Block a user