✨ feat(gvg): 激战期接口详细返回
This commit is contained in:
@@ -11,6 +11,9 @@ import { DicWarJson } from "../../pubUtils/dictionary/DicWarJson";
|
||||
import { gameData } from "../../pubUtils/data";
|
||||
import { HeroType } from "../../db/Hero";
|
||||
import { RoleRankInfo } from "../rank";
|
||||
import { GVGCityType } from "../../db/GVGCity";
|
||||
import { GVGTeamMem } from "../battleField/gvgBattle";
|
||||
import { GVGTeamType } from "../../db/GVGTeam";
|
||||
|
||||
class LeagueLeaderInfo {
|
||||
name: string; // 盟主名
|
||||
@@ -257,7 +260,6 @@ export class LeagueMemberListInfo {
|
||||
this.serverName = serverNames[role.serverId];
|
||||
this.ce = role.ce;
|
||||
this.quitTime = role.quitTime;
|
||||
this.isOnline = role.quitTime == role.loginTime;
|
||||
}
|
||||
|
||||
setByUserData(data: GVGUserDataType) {
|
||||
@@ -269,6 +271,10 @@ export class LeagueMemberListInfo {
|
||||
setAuth(auth: number) {
|
||||
this.auth = auth;
|
||||
}
|
||||
|
||||
setOnline(isOnline: boolean) {
|
||||
this.isOnline = isOnline;
|
||||
}
|
||||
}
|
||||
|
||||
export class LeagueMemberContributeInfo extends LeagueMemberListInfo{
|
||||
@@ -588,4 +594,88 @@ export class VestigeRank {
|
||||
this.lineupCe = 0;
|
||||
this.score = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 大地图上城池占林
|
||||
export class GVGCityMapInfo {
|
||||
cityId: number; // 城池id
|
||||
guardLeagueCode: string; // 驻守城池的联军id
|
||||
guardLeagueName: string; // 驻守这个城池的联军
|
||||
guardLeagueIcon: number; // 驻守这个城池的联军的icon
|
||||
teamCnt: number; // 我方队伍数量
|
||||
|
||||
constructor(city: GVGCityType, teamCnt: number) {
|
||||
if(!city) return;
|
||||
this.cityId = city.cityId;
|
||||
this.guardLeagueCode = city.guardLeague;
|
||||
this.guardLeagueName = city.guardLeagueName;
|
||||
this.guardLeagueIcon = city.guardLeagueIcon;
|
||||
this.teamCnt = teamCnt;
|
||||
}
|
||||
}
|
||||
|
||||
export class GVGTeamSpineInMap {
|
||||
spine: number = 0;
|
||||
roleName: string = '';
|
||||
serverName: string = '';
|
||||
startMoveTime: number = 0;
|
||||
stopMoveTime: number = 0;
|
||||
isMoving: boolean = false;
|
||||
pointId: number = 0;
|
||||
fromAreaId: number = 0;
|
||||
|
||||
constructor(obj: GVGTeamMem, serverNames: {[serverId: string]: string}) {
|
||||
this.spine = obj.spine;
|
||||
this.roleName = obj.roleName;
|
||||
if(obj.serverId) this.serverName = serverNames[obj.serverId];
|
||||
this.startMoveTime = obj.startMoveTime;
|
||||
this.stopMoveTime = obj.stopMoveTime;
|
||||
this.isMoving = nowSeconds() < this.stopMoveTime;
|
||||
this.pointId = obj.pointId;
|
||||
this.fromAreaId = obj.fromAreaId;
|
||||
}
|
||||
}
|
||||
|
||||
export class GVGAreaInMap {
|
||||
areaId: number;
|
||||
spines: GVGTeamSpineInMap[] = [];
|
||||
}
|
||||
|
||||
// 地图右边列表上的队伍信息
|
||||
export class GVGTeamInList {
|
||||
teamCode: string;
|
||||
roleName: string;
|
||||
head: number;
|
||||
frame: number;
|
||||
lineupCe: number;
|
||||
leagueCode: string;
|
||||
leagueName: string;
|
||||
durability: number; // 耐久
|
||||
maxDurability: number; // 最大耐久
|
||||
|
||||
constructor(team: GVGTeamType) {
|
||||
if(!team) return;
|
||||
this.teamCode = team.teamCode;
|
||||
this.roleName = team.roleName;
|
||||
this.head = team.head;
|
||||
this.frame = team.frame;
|
||||
this.lineupCe = team.lineupCe;
|
||||
this.leagueCode = team.leagueCode;
|
||||
this.leagueName = team.leagueName;
|
||||
this.durability = team.durability;
|
||||
this.maxDurability = team.maxDurability;
|
||||
}
|
||||
}
|
||||
|
||||
export class GVGTeamInListOnPoint extends GVGTeamInList {
|
||||
pointId: number; // 积分点
|
||||
hasTeam: boolean; // 是否有队伍占领
|
||||
isRobot: boolean; // 这个队伍是不是擂台守卫者
|
||||
|
||||
constructor(pointId: number, hasTeam: boolean, team?: GVGTeamType) {
|
||||
super(team);
|
||||
this.pointId = pointId;
|
||||
this.hasTeam = hasTeam;
|
||||
if(team) this.isRobot = team.isRobot;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user