🐞 fix(武将攻略): 武将对比时将我方全局值也下发

This commit is contained in:
luying
2023-04-23 17:44:26 +08:00
parent 9821a2d06c
commit d337517afd
4 changed files with 25 additions and 9 deletions

View File

@@ -207,7 +207,11 @@ export class HeroDetailParam {
};
subHid: number = 0;
subActorId: number = 0;
artifacts: {artifactId: number, lv: number }[] = []
artifacts: {artifactId: number, lv: number }[] = [];
myInfo: {
scroll: number;
teraph: number;
}
constructor(hero: HeroType) {
this.roleId = hero.roleId;
@@ -248,6 +252,10 @@ export class HeroDetailParam {
this.role = { title, scroll, teraph, school };
}
setMyRole(scroll: number, teraph: number) {
this.myInfo = { scroll, teraph };
}
setArtifact(artifact: ArtifactModelType) {
this.artifacts.push({ artifactId: artifact.artifactId, lv: artifact.lv });
}