✨ feat(gvg): 保存阵容、刷新对手、战报

This commit is contained in:
luying
2023-02-17 10:58:06 +08:00
parent ddce23d7fd
commit 31a286d82e
13 changed files with 9712 additions and 2799 deletions
+15
View File
@@ -1,5 +1,6 @@
import { prop } from "@typegoose/typegoose";
import { ArtifactModelType } from "../../db/Artifact";
import { GVGVestigeRecType } from "../../db/GVGVestigeRec";
import { HeroType, Talent } from "../../db/Hero";
import { RoleType } from "../../db/Role";
import { gameData } from "../../pubUtils/data";
@@ -203,9 +204,23 @@ export class OppDetailHeroData {
}
export class OppDetailData{
roleId: string; // 对手的id
isRobot: boolean;
vestigeId: number;
battleCode: string;
status: number;
time: number;
heroes: OppDetailHeroData[] = [];
lineupCe: number = 0;
constructor(rec: GVGVestigeRecType, obj: {status: number, time: number}) {
this.vestigeId = rec.vestigeId;
this.battleCode = rec.battleCode;
this.roleId = rec.defenseRoleId;
this.isRobot = rec.defenseInfo.isRobot;
this.status = obj.status;
this.time = obj.time;
}
setByPlayer(dicWarJson: DicWarJson[], defenseHeroes: OppPlayerHeroInfo[], heroes: HeroType[], artifacts: ArtifactModelType[]) {
for(let warJson of dicWarJson) {