✨ feat(gvg): 添加激战期动态
This commit is contained in:
@@ -117,6 +117,16 @@ export enum GVG_REC_ID {
|
||||
VESTIGE_RANK = 5, // 联军每日的征战排名
|
||||
LEAGUE_JOIN_GUILD = 6, // 军团加入联军
|
||||
LEAGUE_QUIT_GUILD = 7, // 军团退出联军
|
||||
TEAM_BE_HIT = 8, // 队伍被击败
|
||||
TEAM_GUARD_SUCCESS = 9, // 队伍防守成功
|
||||
TEAM_LOST_POINT = 10, // 队伍失去积分点
|
||||
CITY_TEAM_SETTLE = 12, // 入驻据点
|
||||
CITY_OCCUPY_CHANGE = 13,// 城池据点交替
|
||||
CITY_CATAPULT = 15, // 投石车被打掉
|
||||
LEAGUE_TEAM_SETTLE = 16, // 队伍入驻据点
|
||||
LEAGUE_TEAM_LEAVE = 17, // 队伍离开据点
|
||||
LEAGUE_OCCUPY_CHANGE = 18, // 联军据点交替
|
||||
|
||||
}
|
||||
|
||||
// 遗迹选择对手状态
|
||||
|
||||
@@ -10,6 +10,9 @@ class TeamInfo {
|
||||
@prop({ required: true })
|
||||
roleId: string; // 玩家id
|
||||
|
||||
@prop({ required: true })
|
||||
roleName: string; // 玩家id
|
||||
|
||||
@prop({ required: true })
|
||||
teamCode: string; // 玩家队伍唯一标识
|
||||
|
||||
@@ -45,6 +48,18 @@ class TeamInfo {
|
||||
|
||||
@prop({ required: true, type: () => GVGHeroInfo, _id: false })
|
||||
lineup: GVGHeroInfo[]
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
isRobot: boolean; // 是否是机器人
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
isCatapult: boolean; // 是否是投石车
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
originPointId: number;
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
curTeamBreak: boolean;
|
||||
}
|
||||
|
||||
@index({ battleCode: 1 })
|
||||
|
||||
+11
-2
@@ -45,11 +45,20 @@ export default class GVGRec extends BaseModel {
|
||||
}
|
||||
|
||||
// 查询城池战报
|
||||
public static async findByCity(cityId: number, configId: number) {
|
||||
const result: GVGRecType[] = await GVGRecModel.find({ cityId, configId }, { _id: 0, recId: 1, params: 1, createTime: 1 }).sort({ createTime: -1 }).limit(50).lean();
|
||||
public static async findBattleRecByCity(configId: number, groupId: number, serverType: number, cityId: number) {
|
||||
const result: GVGRecType[] = await GVGRecModel.find({ cityId, configId, groupId, serverType, type: GVG_REC_TYPE.BATTLE_BY_CITY }, { _id: 0, recId: 1, params: 1, createTime: 1 }).sort({ createTime: -1 }).limit(50).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async findBattleRecByLeague(configId: number, leagueCode: string) {
|
||||
const result: GVGRecType[] = await GVGRecModel.find({ configId, leagueCode, type: GVG_REC_TYPE.BATTLE_BY_LEAGUE }, { _id: 0, recId: 1, params: 1, createTime: 1 }).sort({ createTime: -1 }).limit(50).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async findBattleRecByRole(configId: number, roleId: string, leagueCode: string) {
|
||||
const result: GVGRecType[] = await GVGRecModel.find({ configId, roleId, leagueCode, type: GVG_REC_TYPE.BATTLE_BY_ROLE }, { _id: 0, recId: 1, params: 1, createTime: 1 }).sort({ createTime: -1 }).limit(50).lean();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
export const GVGRecModel = getModelForClass(GVGRec);
|
||||
|
||||
@@ -5,6 +5,8 @@ import { parseNumberList, readFileAndParse } from '../util'
|
||||
export interface DicGVGArea {
|
||||
// 区域id
|
||||
readonly areaId: number;
|
||||
// 区域名
|
||||
readonly areaName: string;
|
||||
// 大地图id
|
||||
readonly mapId: string
|
||||
// 大地图类型 1-单服 2-跨服
|
||||
|
||||
Reference in New Issue
Block a user