From 7327144feb7533dd1510e1f748804fb359c2dd45 Mon Sep 17 00:00:00 2001 From: luying Date: Mon, 29 May 2023 19:42:59 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E8=B7=AF=E7=94=B1):=20?= =?UTF-8?q?=E8=AF=B8=E4=BE=AF=E6=B7=B7=E6=88=98=E5=92=8Cgvg=E6=BF=80?= =?UTF-8?q?=E6=88=98=E6=9C=9F=E8=B7=AF=E7=94=B1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/util/routeUtil.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/game-server/app/util/routeUtil.ts b/game-server/app/util/routeUtil.ts index a1113f946..f87527a3d 100644 --- a/game-server/app/util/routeUtil.ts +++ b/game-server/app/util/routeUtil.ts @@ -2,6 +2,8 @@ import { dispatch } from '../pubUtils/dispatcher'; import { Session, Application } from 'pinus'; import { redisClient } from '../services/redisService'; +import { getGroupIdOfServer } from '../services/serverService'; +import { SERVER_GROUP_FUN_TYPE } from '../consts'; export async function chat(session: Session, msg: any, app: Application, cb: (err: Error, serverId?: string) => void) { let chatServers = app.getServersByType('chat'); @@ -96,10 +98,10 @@ export async function guild(session: Session, msg: any, app: Application, cb: (e 'guild.cityActivityHandler.hitGate', 'guild.cityActivityHandler.battleEnd' ].indexOf(arg.route) !== -1) { - if (arg.body.cityId) { + let serverId = session.get('serverId'); needDispatch = true; - rid = arg.body.cityId.toString(); + rid = `${serverId}_${arg.body.cityId}`; } } else if (['guild.raceActivityHandler.getRaceActivity', 'guild.raceActivityHandler.leavePage', @@ -131,8 +133,10 @@ export async function guild(session: Session, msg: any, app: Application, cb: (e 'guild.gvgBattleHandler.debugAttacks', ].indexOf(arg.route) !== -1) { if (arg.body.cityId) { + let serverId = session.get('serverId'); + let groupId = await getGroupIdOfServer(serverId, SERVER_GROUP_FUN_TYPE.GVG); needDispatch = true; - rid = arg.body.cityId.toString(); + rid = `${groupId}_${arg.body.cityId}`; } } }