diff --git a/game-server/app/services/gvg/gvgBattleMemory.ts b/game-server/app/services/gvg/gvgBattleMemory.ts index 5e1d2896f..49eacf716 100644 --- a/game-server/app/services/gvg/gvgBattleMemory.ts +++ b/game-server/app/services/gvg/gvgBattleMemory.ts @@ -49,6 +49,9 @@ class GVGBattleData { for(let teamCode of teamCodes) { let team = this.teams.get(teamCode); if(team) team.setCity(0); + for(let [_areaId, teamSet] of this.areaToTeams) { + if(teamSet.has(teamCode)) teamSet.delete(teamCode); + } } this.rolePoints.delete(roleId); } @@ -171,7 +174,7 @@ export async function initTeamToMem() { let sid = pinus.app.getServerId(); let servers = pinus.app.getServersByType('guild'); let { configId, period } = getGVGPeriodData(); - // if(period != GVG_PERIOD.BATTLE) return; + if(period != GVG_PERIOD.BATTLE) return; let teams = await GVGTeamModel.findByConfigId(configId); for(let team of teams) { if(dispatch(team.cityId.toString(), servers)?.id == sid) { diff --git a/game-server/app/services/pushService.ts b/game-server/app/services/pushService.ts index c26474fec..bb9d2166a 100644 --- a/game-server/app/services/pushService.ts +++ b/game-server/app/services/pushService.ts @@ -170,6 +170,7 @@ export function sendMessgeToChannelByBatch(channel: Channel, route: string, data // 抽下下来pushMessage收束 export function sendMessageToChannel(channel: Channel, route: string, data: any) { + if(channel.getMembers().length <= 0) return; channel.pushMessage(route, encryptMsg(route, data)); infologger.debug(`pushMessage route: ${route} data: ${JSON.stringify(data)} members: ${channel.getMembers().join()}`); }