✨ feat(gvg): 添加队伍快照

This commit is contained in:
luying
2023-02-17 10:59:38 +08:00
parent a838aba8e5
commit 3141566eb3
6 changed files with 50 additions and 10 deletions
+12
View File
@@ -93,6 +93,18 @@ export class PvpHeroInfo {
}
}
export class GVGHeroInfo extends PvpHeroInfo {
@prop({ required: false })
outIndex?: number = 0; // 程序将信息存入数组顺序
@prop({ required: false })
dataId?: number = 0; // 对应出兵表dataId
setDataId(dataId: number, order: number) {
this.dataId = dataId;
this.outIndex = order;
}
}
// 远征敌军
export class Enemies extends PvpHeroInfo {
@prop({ required: true })
+8 -2
View File
@@ -8,6 +8,7 @@ import { gameData } from "../../pubUtils/data";
import { EXTERIOR, GVG } from "../../pubUtils/dicParam";
import { DicGVGVestige } from "../../pubUtils/dictionary/DicGVGVestige";
import { DicWarJson } from "../../pubUtils/dictionary/DicWarJson";
import { GVGHeroInfo, PvpHeroInfo } from "../dbGeneral";
import { LineupHero } from "../roleField/hero";
export class OppPlayerHeroInfo {
@@ -257,11 +258,16 @@ export interface SaveTeamParam {
lineup?: LineupHero[];
}
export interface SaveTeamUpdateParam extends SaveTeamParam {
lineupCe?: number;
export interface SaveTeamUpdateParam {
index: number;
head: number;
frame: number;
spine: number;
configId: number;
groupId: number;
serverType: number;
lineup?: GVGHeroInfo[];
lineupCe?: number;
}
export interface InitTeamParam {
+1 -1
View File
@@ -706,7 +706,7 @@ export class MyTeamInfo {
this.index = team.index;
this.head = team.head;
this.frame = team.spine;
this.lineup = team.lineup;
this.lineup = team.lineup.map(({ actorId, dataId, outIndex }) => ({ actorId, dataId, order: outIndex }));
this.durability = team.durability;
this.maxDurability = team.maxDurability;
this.restartTime = team.restartTime;