🐞 fix(路由): 诸侯混战和gvg激战期路由修改
This commit is contained in:
@@ -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}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user