✨ feat(pvp): 巅峰演武战区化

This commit is contained in:
luying
2023-03-18 16:59:39 +08:00
parent da86251116
commit e52c7b5241
25 changed files with 341 additions and 191 deletions
@@ -8,7 +8,7 @@ import { checkTask } from '../../../services/task/taskService';
import { RoleModel } from '../../../db/Role';
import { getFriendRelationType } from '../../../services/friendService';
import { GVGLeagueModel } from '../../../db/GVGLeague';
import { getGroupIdOfServer } from '../../../services/gvg/gvgService';
import { getGVGGroupIdOfServer } from '../../../services/serverService';
import { getGuildCodeString } from '../../../services/gvg/gvgRecService';
@@ -40,7 +40,7 @@ export class ChatHandler {
if (channel === CHANNEL_PREFIX.WORLD) channelId = `${serverId}`;
if (channel === CHANNEL_PREFIX.GUILD) channelId = guildCode;
if (channel === CHANNEL_PREFIX.GVG) {
let groupId = await getGroupIdOfServer(serverId);
let groupId = await getGVGGroupIdOfServer(serverId);
channelId = `${groupId}`;
}
if (channel == CHANNEL_PREFIX.LEAGUE) {
@@ -6,7 +6,7 @@ import { errlogger } from '../../../util/logger';
import { addUserToChannel, sendMessageToChannel, sendMessgeToChannelByBatch, setKvToMemory } from '../../../services/pushService';
import { setApiIsClose } from '../../../services/chatService';
import { setHiddenData } from '../../../services/dataService';
import { setGVGServerGroup } from '../../../services/gvg/gvgService';
import { setServerGroup } from '../../../services/serverService';
export default function (app: Application) {
new HandlerService(app, {});
@@ -175,9 +175,9 @@ export class ChatRemote {
}
}
public async setGVGServerGroup() {
public async setServerGroup() {
try {
return setGVGServerGroup();
return setServerGroup();
} catch(e) {
errlogger.error(`remote ${__filename} \n ${e.stack}`);
}