feat(gvg): 激战期接口详细返回

This commit is contained in:
luying
2023-02-13 20:58:01 +08:00
parent ab0b7aa9ae
commit 26832196b6
14 changed files with 917 additions and 214 deletions

View File

@@ -1,4 +1,4 @@
import { GVGTeamType, GVGTeamUpdate } from "../../db/GVGTeam";
import GVGTeam, { GVGTeamType } from "../../db/GVGTeam";
// 积分点分类统计1-3级积分点代表从小到大
export class LeagueCityPoint {
@@ -20,42 +20,43 @@ export class LeagueCityPoint {
}
// 队伍状态
export class GVGTeamMem implements GVGTeamUpdate {
roleId: string; // 玩家id
id: number;
teamCode: string;
teamId: number;
leagueCode: string;
guildCode: string;
areaId: number;
cityId: number;
pointId: number;
head: number;
spine: number;
frame: number;
durability: number;
restartTime: number;
attackTime: number;
defenseTime: number;
startMoveTime: number;
stopMoveTime: number;
export class GVGTeamMem extends GVGTeam {
isMoving: boolean;
point: number;
constructor(team: GVGTeamType) {
for(let key in team) {
this[key] = team[key];
}
super();
this.roleId = team.roleId;
this.roleName = team.roleName;
this.serverId = team.serverId;
this.teamCode = team.teamCode;
this.teamId = team.teamId;
this.leagueCode = team.leagueCode;
this.guildCode = team.guildCode;
this.areaId = team.areaId;
this.fromAreaId = team.fromAreaId;
this.cityId = team.cityId;
this.pointId = team.pointId;
this.head = team.head;
this.spine = team.spine;
this.frame = team.frame;
this.durability = team.durability;
this.restartTime = team.restartTime;
this.attackTime = team.attackTime;
this.defenseTime = team.defenseTime;
this.startMoveTime = team.startMoveTime;
this.stopMoveTime = team.stopMoveTime;
this.point = team.point;
}
public setCity(cityId: number, areaId = 0) {
public setCity(cityId: number, areaId = 0, pointId = 0) {
this.cityId = cityId;
this.areaId = areaId;
this.pointId = 0;
this.pointId = pointId;
}
public moveToArea(areaId: number, startMoveTime: number, stopMoveTime: number) {
public moveToArea(areaId: number, fromAreaId: number, startMoveTime: number, stopMoveTime: number) {
this.areaId = areaId;
this.fromAreaId = fromAreaId;
this.startMoveTime = startMoveTime;
this.stopMoveTime = stopMoveTime;
}