✨ feat(gvg): 添加联军频道

This commit is contained in:
luying
2023-02-21 17:16:49 +08:00
parent 22b3dbc551
commit 3eb6a1045f
19 changed files with 218 additions and 38 deletions
@@ -599,11 +599,11 @@ export class GVGBattleHandler {
// 获取战报
// type: 战报类型
async getRecs(msg: { type: number, cityId: number }, session: BackendSession) {
async getRecs(msg: { type: number }, session: BackendSession) {
const roleId = session.get('roleId');
const serverId = session.get('serverId');
const guildCode = session.get('guildCode');
const { type, cityId } = msg;
const { type } = msg;
// 根据 type 获取战报
let { configId, period } = getGVGPeriodData();
let groupKey = await getGroupKey(serverId);
@@ -613,7 +613,7 @@ export class GVGBattleHandler {
let recs: GVGRecType[] = [];
if(type == GVG_REC_TYPE.BATTLE_BY_CITY) {
recs = await GVGRecModel.findBattleRecByCity(configId, groupKey, cityId);
recs = await GVGRecModel.findBattleRecByGroup(configId, groupKey);
} else if (type == GVG_REC_TYPE.BATTLE_BY_LEAGUE) {
recs = await GVGRecModel.findBattleRecByLeague(configId, myLeague.leagueCode);
} else if (type == GVG_REC_TYPE.BATTLE_BY_ROLE) {