✨ 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
+3 -3
View File
@@ -17,7 +17,7 @@ import { sendMessageToAllWithSuc, sendMessageToCityWithSuc, sendMessageToGuildWi
import { comBtlLvInvalid } from './comBattleService';
import { gameData } from '../pubUtils/data';
import { RegionModel } from '../db/Region';
import { getGroupIdOfServer, getServersByGroupId } from './gvg/gvgService';
import { getGVGGroupIdOfServer, getGVGServersByGroupId } from './serverService';
import { GVGLeagueModel } from '../db/GVGLeague';
export * from './chatChannelService';
@@ -167,7 +167,7 @@ export async function pushGroupMsgToRoom(msg: GroupMessageType) {
await sendMessageToCityWithSuc(parseInt(arr[0]), parseInt(arr[1]), PUSH_ROUTE.GROUP_MSG, { ...msg, roleInfo });
} else if (msg.channel == CHANNEL_PREFIX.GVG) {
let groupId = parseInt(msg.channelId);
let serverIds = await getServersByGroupId(groupId);
let serverIds = await getGVGServersByGroupId(groupId);
for(let serverId of serverIds) {
await sendMessageToServerWithSuc(serverId, PUSH_ROUTE.GROUP_MSG, { ...msg, roleInfo });
}
@@ -236,7 +236,7 @@ async function recentGroupMsgs(roomId: string, count?: number) {
* @returns
*/
export async function recentServerGroupMsgs(serverId: number, count?: number) {
let groupId = await getGroupIdOfServer(serverId);
let groupId = await getGVGGroupIdOfServer(serverId);
const result = await recentGroupMsgs(groupRoomId(CHANNEL_PREFIX.GVG, groupId), count);
return result;
}