✨ feat(gvg): 激战期挑战相关接口整理

This commit is contained in:
luying
2023-02-17 10:59:38 +08:00
parent c0cc85ae0a
commit a838aba8e5
12 changed files with 316 additions and 129 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ export class GVGTeamMem extends GVGTeam {
this.roleName = team.roleName;
this.serverId = team.serverId;
this.teamCode = team.teamCode;
this.teamId = team.teamId;
this.index = team.index;
this.leagueCode = team.leagueCode;
this.guildCode = team.guildCode;
this.areaId = team.areaId;
@@ -45,7 +45,7 @@ export class GVGTeamMem extends GVGTeam {
this.defenseTime = team.defenseTime;
this.startMoveTime = team.startMoveTime;
this.stopMoveTime = team.stopMoveTime;
this.point = team.point;
this.playerScore = team.playerScore;
}
public setCity(cityId: number, areaId = 0, pointId = 0) {
+25
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 { LineupHero } from "../roleField/hero";
export class OppPlayerHeroInfo {
@prop({ required: true })
@@ -246,4 +247,28 @@ export class OppDetailData{
let hero = this.heroes.find(cur => cur.actorId == hid);
if(hero) hero.setAttribute(attribute);
}
}
export interface SaveTeamParam {
index: number;
head: number;
frame: number;
spine: number;
lineup?: LineupHero[];
}
export interface SaveTeamUpdateParam extends SaveTeamParam {
lineupCe?: number;
configId: number;
groupId: number;
serverType: number;
}
export interface InitTeamParam {
roleName: string;
serverId: number;
leagueCode: string;
leagueName: string;
durability: number;
maxDurability: number;
}
+38
View File
@@ -678,4 +678,42 @@ export class GVGTeamInListOnPoint extends GVGTeamInList {
this.hasTeam = hasTeam;
if(team) this.isRobot = team.isRobot;
}
}
// 更新自己队伍时候的比较详细点的数据
export class MyTeamInfo {
teamCode: string; // 队伍唯一id
index: number; // 队伍位置
head: number; // 保存头像
frame: number; // 保存相框
spine: number; // 保存形象
lineup: {
actorId: number; // 武将
dataId: number; // 出兵表上的位置
order: number; // 行动
}[];
durability: number; // 耐久
maxDurability: number; // 最大耐久
restartTime: number; // 修整期结束时间
attackTime: number; // 进攻冷却结束时间
stopMoveTime: number; // 移动冷却结束时间
defenseTime: number; // 防守保护时间
areaId: number; // 出生在的区域
pointId: number;
constructor(team: GVGTeamType) {
this.teamCode = team.teamCode;
this.index = team.index;
this.head = team.head;
this.frame = team.spine;
this.lineup = team.lineup;
this.durability = team.durability;
this.maxDurability = team.maxDurability;
this.restartTime = team.restartTime;
this.attackTime = team.attackTime;
this.stopMoveTime = team.stopMoveTime;
this.defenseTime = team.defenseTime;
this.areaId = team.areaId;
this.pointId = team.pointId;
}
}