diff --git a/game-server/app.ts b/game-server/app.ts index c08c2a4f8..a9980b4cb 100644 --- a/game-server/app.ts +++ b/game-server/app.ts @@ -293,6 +293,7 @@ function initRedis(app: _pinus.Application) { function setupRoutes(app: _pinus.Application) { app.route('chat', routeUtil.chat); app.route('battle', routeUtil.battle); + app.route('comBattle', routeUtil.comBattle); app.route('gm', routeUtil.gm); app.route('guild', routeUtil.guild); app.route('activity', routeUtil.activity); diff --git a/game-server/app/servers/battle/remote/comBattleRemote.ts b/game-server/app/servers/battle/remote/comBattleRemote.ts deleted file mode 100644 index c031c687d..000000000 --- a/game-server/app/servers/battle/remote/comBattleRemote.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Application, ChannelService, FrontendSession, RemoterClass, HandlerService, pinus, } from 'pinus'; -import { resResult } from '../../../pubUtils/util'; -import { STATUS } from '../../../consts'; -import { handleComBtlProgress, _addToSearchingTeams } from '../../../services/battle/comBattleService'; -import { MemComBtlTeam } from '../../../domain/battleField/ComBattleTeamField'; -import { errlogger } from '../../../util/logger'; -import { saveComBattleMemory } from '../../../services/log/memoryLogService'; - -export default function (app: Application) { - new HandlerService(app, {}); - return new ComBattleRemote(app); -} - -export class ComBattleRemote { - bossHp = 10000; - - constructor(private app: Application) { - this.app = app; - this.channelService = app.get('channelService'); - } - - private channelService: ChannelService; - - public async checkMyTeam(roleId: string ) { - try { - let teamMap: Map = this.app.get('teamMap'); - let hasMyTeam = false; - for(let [,team] of teamMap) { - if(team.roleIds.indexOf(roleId) > -1) { - hasMyTeam = true; break; - } - } - return hasMyTeam - } catch(e) { - errlogger.error(`remote ${__filename} \n ${e.stack}`); - } - } - - - public async addToSearchingTeams(teamCode: string, roleId: string, sid: string) { - try { - await _addToSearchingTeams(teamCode, roleId, sid); - } catch(e) { - errlogger.error(`remote ${__filename} \n ${e.stack}`); - } - } - - public saveComBattleMemory() { - try { - return saveComBattleMemory(); - } catch(e) { - errlogger.error(`remote ${__filename} \n ${e.stack}`); - } - } -} \ No newline at end of file diff --git a/game-server/app/servers/battle/handler/comBattleHandler.ts b/game-server/app/servers/comBattle/handler/comBattleHandler.ts similarity index 99% rename from game-server/app/servers/battle/handler/comBattleHandler.ts rename to game-server/app/servers/comBattle/handler/comBattleHandler.ts index b65e89882..d6972ff7b 100644 --- a/game-server/app/servers/battle/handler/comBattleHandler.ts +++ b/game-server/app/servers/comBattle/handler/comBattleHandler.ts @@ -1,4 +1,4 @@ -import { ComBattleInvitation, MemComBtlTeam } from './../../../domain/battleField/ComBattleTeamField'; +import { ComBattleInvitation, MemComBtlTeam } from '../../../domain/battleField/ComBattleTeamField'; import { difference, pick } from 'underscore'; /* * @Author: 梁桐川 @@ -6,7 +6,7 @@ import { difference, pick } from 'underscore'; * @Last Modified by: 梁桐川 * @Last Modified time: 2021-08-27 17:47:56 */ -import { IT_TYPE, CURRENCY_BY_TYPE, CURRENCY_TYPE, COM_TEAM_STATUS, COM_BTL_CONST, CONSUME_TYPE, MSG_SOURCE, ROLE_SELECT, TASK_TYPE, KING_EXP_RATIO_TYPE, ITEM_CHANGE_REASON, getChannelType, CHANNEL_PREFIX, DEBUG_MAGIC_WORD, PUSH_ROUTE, POPULATE_TYPE } from './../../../consts'; +import { IT_TYPE, CURRENCY_BY_TYPE, CURRENCY_TYPE, COM_TEAM_STATUS, COM_BTL_CONST, CONSUME_TYPE, MSG_SOURCE, ROLE_SELECT, TASK_TYPE, KING_EXP_RATIO_TYPE, ITEM_CHANGE_REASON, getChannelType, CHANNEL_PREFIX, DEBUG_MAGIC_WORD, PUSH_ROUTE, POPULATE_TYPE } from '../../../consts'; import Role, { RoleModel } from '../../../db/Role'; import { STATUS } from '../../../consts/statusCode'; import { Application, BackendSession } from 'pinus'; diff --git a/game-server/app/servers/comBattle/remote/comBattleRemote.ts b/game-server/app/servers/comBattle/remote/comBattleRemote.ts new file mode 100644 index 000000000..c5d76ba71 --- /dev/null +++ b/game-server/app/servers/comBattle/remote/comBattleRemote.ts @@ -0,0 +1,119 @@ +import { Application, ChannelService, FrontendSession, RemoterClass, HandlerService, pinus, } from 'pinus'; +import { resResult } from '../../../pubUtils/util'; +import { STATUS } from '../../../consts'; +import { handleComBtlProgress, _addToSearchingTeams } from '../../../services/battle/comBattleService'; +import { MemComBtlTeam } from '../../../domain/battleField/ComBattleTeamField'; +import { errlogger } from '../../../util/logger'; +import { saveComBattleMemory } from '../../../services/log/memoryLogService'; +import { setApiIsClose } from '../../../services/chatService'; +import { setHiddenData } from '../../../services/memoryCache/hiddenData'; +import { setKvToMemory } from '../../../services/pushService'; +import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService'; +import { reloadResources } from '../../../pubUtils/data'; + +export default function (app: Application) { + new HandlerService(app, {}); + return new ComBattleRemote(app); +} + +export class ComBattleRemote { + bossHp = 10000; + + constructor(private app: Application) { + this.app = app; + this.channelService = app.get('channelService'); + } + + private channelService: ChannelService; + + public async checkMyTeam(roleId: string ) { + try { + let teamMap: Map = this.app.get('teamMap'); + let hasMyTeam = false; + for(let [,team] of teamMap) { + if(team.roleIds.indexOf(roleId) > -1) { + hasMyTeam = true; break; + } + } + return hasMyTeam + } catch(e) { + errlogger.error(`remote ${__filename} \n ${e.stack}`); + } + } + + + public async addToSearchingTeams(teamCode: string, roleId: string, sid: string) { + try { + await _addToSearchingTeams(teamCode, roleId, sid); + } catch(e) { + errlogger.error(`remote ${__filename} \n ${e.stack}`); + } + } + + public saveComBattleMemory() { + try { + return saveComBattleMemory(); + } catch(e) { + errlogger.error(`remote ${__filename} \n ${e.stack}`); + } + } + + public async setApiIsClose(isClose: boolean) { + try { + setApiIsClose(isClose); + } catch(e) { + errlogger.error(`remote ${__filename} \n ${e.stack}`); + } + } + + public async setHiddenData(heroes: number[], goods: number[], refTime: number) { + try { + setHiddenData(heroes, goods, refTime); + } catch(e) { + errlogger.error(`remote ${__filename} \n ${e.stack}`); + } + } + + public async setKvToMemory(originK: string, originV: string, aesKey: string, aesIV: string, now: number) { + try { + setKvToMemory(originK, originV, aesKey, aesIV, now); + } catch(e) { + errlogger.error(`remote ${__filename} \n ${e.stack}`); + } + } + + public setServerMainten(serverIds: number[], startTime: number, endTime: number) { + try { + setServerMainten(serverIds, startTime, endTime); + } catch(e) { + errlogger.error(`remote ${__filename} \n ${e.stack}`); + } + } + + public stopServerMainten(serverIds: number[]) { + try { + stopServerMainten(serverIds); + } catch(e) { + errlogger.error(`remote ${__filename} \n ${e.stack}`); + } + } + + public getServerMainten(serverId: number) { + try { + return getServerMainten(serverId); + } catch(e) { + errlogger.error(`remote ${__filename} \n ${e.stack}`); + } + } + + /** + * 重载json资源 + */ + public async reloadResources() { + try { + reloadResources(); + } catch(e) { + errlogger.error(`remote ${__filename} \n ${e.stack}`); + } + } +} \ No newline at end of file diff --git a/game-server/app/servers/gm/handler/gmHandler.ts b/game-server/app/servers/gm/handler/gmHandler.ts index 003cf2224..a2a892ba7 100644 --- a/game-server/app/servers/gm/handler/gmHandler.ts +++ b/game-server/app/servers/gm/handler/gmHandler.ts @@ -91,6 +91,10 @@ export class GmHandler { for (let { id } of battleServers) { await this.app.rpc.battle.battleRemote.reloadResources.toServer(id); } + let comBattleServers = this.app.getServersByType('comBattle'); + for (let { id } of comBattleServers) { + await this.app.rpc.comBattle.comBattleRemote.reloadResources.toServer(id); + } let chatServers = this.app.getServersByType('chat'); for (let { id } of chatServers) { await this.app.rpc.chat.chatRemote.reloadResources.toServer(id); diff --git a/game-server/app/servers/user.rpc.define.ts b/game-server/app/servers/user.rpc.define.ts index 397961085..0ea823b50 100644 --- a/game-server/app/servers/user.rpc.define.ts +++ b/game-server/app/servers/user.rpc.define.ts @@ -4,7 +4,7 @@ // UserRpc的命名空间自动合并 import { FrontendSession, RemoterClass } from 'pinus'; import { ChatRemote } from './chat/remote/chatRemote'; -import { ComBattleRemote } from './battle/remote/comBattleRemote'; +import { ComBattleRemote } from './comBattle/remote/comBattleRemote'; import { BattleRemote } from './battle/remote/battleRemote'; import { ConnectorRemote } from './connector/remote/connectorRemote'; import { SystimerRemote } from './systimer/remote/systimerRemote'; @@ -20,9 +20,11 @@ declare global { activityRemote: RemoterClass; }; battle: { - comBattleRemote: RemoterClass; battleRemote: RemoterClass; }; + comBattle: { + comBattleRemote: RemoterClass; + }; chat: { chatRemote: RemoterClass; }; diff --git a/game-server/app/services/battle/comBattleService.ts b/game-server/app/services/battle/comBattleService.ts index 973e15711..64acb98d9 100644 --- a/game-server/app/services/battle/comBattleService.ts +++ b/game-server/app/services/battle/comBattleService.ts @@ -574,7 +574,7 @@ export async function addToSearchingTeams(roleId: string, sid: string, lvs: numb let battleServer = await getComTeamSidByCode(lv, teamCode); if(!battleServer) return false; - return await pinus.app.rpc.battle.comBattleRemote.addToSearchingTeams.toServer(battleServer, teamCode, roleId, sid); + return await pinus.app.rpc.comBattle.comBattleRemote.addToSearchingTeams.toServer(battleServer, teamCode, roleId, sid); } export async function _addToSearchingTeams(teamCode: string, roleId: string, sid: string) { diff --git a/game-server/app/services/chatService.ts b/game-server/app/services/chatService.ts index 094340a71..055b20de8 100644 --- a/game-server/app/services/chatService.ts +++ b/game-server/app/services/chatService.ts @@ -497,4 +497,5 @@ export async function setApiIsCloseToRemote(isClose: boolean) { await pinus.app.rpc.order.orderRemote.setApiIsClose.broadcast(isClose); await pinus.app.rpc.role.roleRemote.setApiIsClose.broadcast(isClose); await pinus.app.rpc.systimer.systimerRemote.setApiIsClose.broadcast(isClose); + await pinus.app.rpc.comBattle.comBattleRemote.setApiIsClose.broadcast(isClose); } \ No newline at end of file diff --git a/game-server/app/services/checkParam.ts b/game-server/app/services/checkParam.ts index 9e8754097..b58bef985 100644 --- a/game-server/app/services/checkParam.ts +++ b/game-server/app/services/checkParam.ts @@ -10,12 +10,12 @@ export function checkRouteParam(route: string, msg: any) { case 'activity.gachaHandler.getVisitedHero': case 'activity.gachaHandler.getGuideGachaData': case 'activity.selfServiceShopHandler.getSelfServiceShopActivity': - case "battle.comBattleHandler.cancelSearch": - case "battle.comBattleHandler.getTeamRec": - case "battle.comBattleHandler.getAssistCnt": - case "battle.comBattleHandler.getComBtlCnt": - case "battle.comBattleHandler.getRecentTeammates": - case "battle.comBattleHandler.getTeamInvitation": + case "comBattle.comBattleHandler.cancelSearch": + case "comBattle.comBattleHandler.getTeamRec": + case "comBattle.comBattleHandler.getAssistCnt": + case "comBattle.comBattleHandler.getComBtlCnt": + case "comBattle.comBattleHandler.getRecentTeammates": + case "comBattle.comBattleHandler.getTeamInvitation": case "battle.dailyBattleHandler.getData": case "battle.dungeonBattleHandler.getData": case "battle.eventBattleHandler.getEvents": @@ -505,54 +505,54 @@ export function checkRouteParam(route: string, msg: any) { if(!checkNaturalStrings(rid, index, content)) return false; break; } - case "battle.comBattleHandler.createTeam": + case "comBattle.comBattleHandler.createTeam": { let { blueprtId, pub, ceLimit } = msg; if(!checkNaturalNumbers(blueprtId, ceLimit)) return false; if(!checkBoolean(pub)) return false; break; } - case "battle.comBattleHandler.searchTeam": + case "comBattle.comBattleHandler.searchTeam": { let { lv, magicWord } = msg; if(!checkNumberArray(lv)) return false; if(!!magicWord && magicWord != DEBUG_MAGIC_WORD) return false; break; } - case "battle.comBattleHandler.joinTeam": + case "comBattle.comBattleHandler.joinTeam": { if(!checkNaturalStrings(msg.teamCode)) return false; if(!checkBoolean(msg.isFrd)) return false; break; } - case "battle.comBattleHandler.setFrdAssistance": + case "comBattle.comBattleHandler.setFrdAssistance": { if(!checkNaturalStrings(msg.teamCode)) return false; if(!checkBoolean(msg.isFrd)) return false; break; } - case "battle.comBattleHandler.setupHeroes": + case "comBattle.comBattleHandler.setupHeroes": { let { teamCode, heroes, battleCode } = msg; if(!checkNaturalStrings(teamCode, battleCode)) return false; if(!checkNumberArray(heroes)) return false; break; } - case "battle.comBattleHandler.rmTeammate": + case "comBattle.comBattleHandler.rmTeammate": { if(!checkNaturalStrings(msg.teamCode, msg.roleIdToRm)) return false; break; } - case "battle.comBattleHandler.dismiss": - case "battle.comBattleHandler.startBattle": - case "battle.comBattleHandler.autoInvite": - case "battle.comBattleHandler.comBattleEnd": - case "battle.comBattleHandler.getComBtlStatus": + case "comBattle.comBattleHandler.dismiss": + case "comBattle.comBattleHandler.startBattle": + case "comBattle.comBattleHandler.autoInvite": + case "comBattle.comBattleHandler.comBattleEnd": + case "comBattle.comBattleHandler.getComBtlStatus": { if(!checkNaturalStrings(msg.teamCode)) return false; break; } - case "battle.comBattleHandler.action": + case "comBattle.comBattleHandler.action": { let { teamCode, bossHurts, killed, curRnd } = msg; if(!checkNaturalStrings(teamCode)) return false; @@ -566,12 +566,12 @@ export function checkRouteParam(route: string, msg: any) { } break; } - case "battle.comBattleHandler.getBlueprtCount": + case "comBattle.comBattleHandler.getBlueprtCount": { if(!checkNumberArray(msg.ids)) return false; break; } - case "battle.comBattleHandler.sendTeamMsg": + case "comBattle.comBattleHandler.sendTeamMsg": { let { teamCode, type, content, targetRoleId, targetMsgCode } = msg; if(!checkNaturalStrings(teamCode, content)) return false; @@ -579,7 +579,7 @@ export function checkRouteParam(route: string, msg: any) { if(!checkNaturalNumbers(type)) return false; break; } - case "battle.comBattleHandler.inviteTeammate": + case "comBattle.comBattleHandler.inviteTeammate": { if(!checkNaturalStrings(msg.teamCode, msg.targetRoleId)) return false; break; @@ -2105,9 +2105,9 @@ export function checkRouteParam(route: string, msg: any) { if (msg.magicWord !== DEBUG_MAGIC_WORD || !isDevelopEnv()) return false; break; } - case "battle.comBattleHandler.getTeams": - case "battle.comBattleHandler.teammateReady": - case "battle.comBattleHandler.battleEnd": + case "comBattle.comBattleHandler.getTeams": + case "comBattle.comBattleHandler.teammateReady": + case "comBattle.comBattleHandler.battleEnd": case "connector.entryHandler.addSession": case "connector.entryHandler.getIp": case "chat.chatHandler.getInitMessage": diff --git a/game-server/app/services/connectorService.ts b/game-server/app/services/connectorService.ts index 5b62c8026..7f30d9931 100644 --- a/game-server/app/services/connectorService.ts +++ b/game-server/app/services/connectorService.ts @@ -354,6 +354,7 @@ export async function assignServer(roleId: string, session: FrontendOrBackendSes let guild = await _assignServer(roleId, 'guild'); let role = await _assignServer(roleId, 'role'); let order = await _assignServer(roleId, 'order'); + let comBattle = await _assignServer(roleId, 'comBattle'); if(activity) { session.set('activityServer', activity); session.push('activityServer', () => { }); @@ -378,6 +379,10 @@ export async function assignServer(roleId: string, session: FrontendOrBackendSes session.set('orderServer', order); session.push('orderServer', () => { }); } + if(comBattle) { + session.set('comBattleServer', comBattle); + session.push('comBattleServer', () => { }); + } } catch(e) { console.log(e) } diff --git a/game-server/app/services/dataService.ts b/game-server/app/services/dataService.ts index 005043d35..71e4fdbf2 100644 --- a/game-server/app/services/dataService.ts +++ b/game-server/app/services/dataService.ts @@ -13,6 +13,7 @@ export async function setHiddenDataToMemory(data: HiddenDataModelType, nextData: sendUpdateMessage(getHiddenData(), heroes, goods, refTime); pinus.app.rpc.activity.activityRemote.setHiddenData.broadcast(heroes, goods, refTime); pinus.app.rpc.battle.battleRemote.setHiddenData.broadcast(heroes, goods, refTime); + pinus.app.rpc.comBattle.comBattleRemote.setHiddenData.broadcast(heroes, goods, refTime); pinus.app.rpc.chat.chatRemote.setHiddenData.broadcast(heroes, goods, refTime); pinus.app.rpc.connector.connectorRemote.setHiddenData.broadcast(heroes, goods, refTime); pinus.app.rpc.guild.guildRemote.setHiddenData.broadcast(heroes, goods, refTime); diff --git a/game-server/app/services/log/memoryLogService.ts b/game-server/app/services/log/memoryLogService.ts index 3697bb253..65e5bdef9 100644 --- a/game-server/app/services/log/memoryLogService.ts +++ b/game-server/app/services/log/memoryLogService.ts @@ -101,7 +101,7 @@ export async function saveGuildActivityIndexMemory() { } async function _saveComBattleMemory() { - await pinus.app.rpc.battle.comBattleRemote.saveComBattleMemory.broadcast(); + await pinus.app.rpc.comBattle.comBattleRemote.saveComBattleMemory.broadcast(); } export async function saveComBattleMemory() { diff --git a/game-server/app/services/pushService.ts b/game-server/app/services/pushService.ts index 5e811c78f..31d5e2dad 100644 --- a/game-server/app/services/pushService.ts +++ b/game-server/app/services/pushService.ts @@ -223,6 +223,7 @@ function setKvToRemote(originK: string, originV: string, aesKey: string, aesIV: pinus.app.rpc.order.orderRemote.setKvToMemory.broadcast(originK, originV, aesKey, aesIV, now); pinus.app.rpc.role.roleRemote.setKvToMemory.broadcast(originK, originV, aesKey, aesIV, now); pinus.app.rpc.systimer.systimerRemote.setKvToMemory.broadcast(originK, originV, aesKey, aesIV, now); + pinus.app.rpc.comBattle.comBattleRemote.setKvToMemory.broadcast(originK, originV, aesKey, aesIV, now); } export function setKvToMemory(originK: string, originV: string, aesKey: string, aesIV: string, now: number) { diff --git a/game-server/app/services/timeTaskService.ts b/game-server/app/services/timeTaskService.ts index 0a4881be6..4943daeb7 100644 --- a/game-server/app/services/timeTaskService.ts +++ b/game-server/app/services/timeTaskService.ts @@ -644,6 +644,7 @@ async function startMaintenanceSchedule(batchCode: string) { pinus.app.rpc.connector.connectorRemote.setServerMainten.broadcast(serverIds, maintenance.startTime, maintenance.endTime); pinus.app.rpc.activity.activityRemote.setServerMainten.broadcast(serverIds, maintenance.startTime, maintenance.endTime); pinus.app.rpc.battle.battleRemote.setServerMainten.broadcast(serverIds, maintenance.startTime, maintenance.endTime); + pinus.app.rpc.comBattle.comBattleRemote.setServerMainten.broadcast(serverIds, maintenance.startTime, maintenance.endTime); pinus.app.rpc.chat.chatRemote.setServerMainten.broadcast(serverIds, maintenance.startTime, maintenance.endTime); pinus.app.rpc.guild.guildRemote.setServerMainten.broadcast(serverIds, maintenance.startTime, maintenance.endTime); pinus.app.rpc.order.orderRemote.setServerMainten.broadcast(serverIds, maintenance.startTime, maintenance.endTime); @@ -678,6 +679,7 @@ export async function stopMaintenance(batchCode: string, serverIds: number[]) { pinus.app.rpc.connector.connectorRemote.stopServerMainten.broadcast(serverIds); pinus.app.rpc.activity.activityRemote.stopServerMainten.broadcast(serverIds); pinus.app.rpc.battle.battleRemote.stopServerMainten.broadcast(serverIds); + pinus.app.rpc.comBattle.comBattleRemote.stopServerMainten.broadcast(serverIds); pinus.app.rpc.chat.chatRemote.stopServerMainten.broadcast(serverIds); pinus.app.rpc.guild.guildRemote.stopServerMainten.broadcast(serverIds); pinus.app.rpc.order.orderRemote.stopServerMainten.broadcast(serverIds); diff --git a/game-server/app/util/routeUtil.ts b/game-server/app/util/routeUtil.ts index 3de5ae310..a1113f946 100644 --- a/game-server/app/util/routeUtil.ts +++ b/game-server/app/util/routeUtil.ts @@ -23,17 +23,30 @@ export async function battle(session: Session, msg: any, app: Application, cb: ( return; } + let rid = session.get('roleId'); + let id = session.get('battleServer')||(await dispatch(redisClient(), rid, battleServers, 'battle')).id; + cb(null, id); +} + +export async function comBattle(session: Session, msg: any, app: Application, cb: (err: Error, serverId?: string) => void) { + let battleServers = app.getServersByType('comBattle'); + + if (!battleServers || battleServers.length === 0) { + cb(new Error('can not find comBattle servers.')); + return; + } + let rid = session.get('roleId'); let needDispatch = false; if (msg.args && msg.args.length > 0) { for (let arg of msg.args) { if (!arg.route) continue; - if (['battle.comBattleHandler.createTeam', 'battle.comBattleHandler.searchTeam'].indexOf(arg.route) !== -1) { + if (['comBattle.comBattleHandler.createTeam', 'comBattle.comBattleHandler.searchTeam'].indexOf(arg.route) !== -1) { needDispatch = true; rid = Math.random().toString(36).slice(-8); session.set('teamCode', rid); - } else if (arg.route.indexOf('battle.comBattleHandler') !== -1) { + } else if (arg.route.indexOf('comBattle.comBattleHandler') !== -1) { if (arg.body.teamCode) { needDispatch = true; rid = arg.body.teamCode; @@ -43,15 +56,14 @@ export async function battle(session: Session, msg: any, app: Application, cb: ( } if(needDispatch) { - let id = (await dispatch(redisClient(), rid, battleServers, 'battle')).id; + let id = (await dispatch(redisClient(), rid, battleServers, 'comBattle')).id; cb(null, id); } else { - let id = session.get('battleServer')||(await dispatch(redisClient(), rid, battleServers, 'battle')).id; + let id = session.get('comBattleServer')||(await dispatch(redisClient(), rid, battleServers, 'comBattle')).id; cb(null, id); } } - export async function guild(session: Session, msg: any, app: Application, cb: (err: Error, serverId?: string) => void) { let guildServers = app.getServersByType('guild'); diff --git a/game-server/config/adminServer.ts b/game-server/config/adminServer.ts index 0c52d873f..1dd3555d2 100644 --- a/game-server/config/adminServer.ts +++ b/game-server/config/adminServer.ts @@ -28,4 +28,7 @@ module.exports = [{ }, { 'type': 'order', 'token': 'agarxhqb98rpajloaxn34ga8xrunpagkjwlaw3ruxnpaagl29w4rxn' +}, { + 'type': 'comBattle', + 'token': 'agarxhqb98rpajloaxn34ga8xrunpagkjwlaw3ruxnpaagl29w4rxn' }]; \ No newline at end of file diff --git a/game-server/config/genServers.ts b/game-server/config/genServers.ts index d381a19dc..d9bb238e0 100644 --- a/game-server/config/genServers.ts +++ b/game-server/config/genServers.ts @@ -18,26 +18,27 @@ const ACTIVITY_START_PORT = 6051; const ORDER_START_PORT = 6061; const GM_START_PORT = 6071; const SYSTIMER_START_PORT = 6081; +const COM_BATTLE_START_PORT = 6091; -interface ServerConfig { name: string, host: string, clientHost: string, connectorCnt: number, chatCnt: number, roleCnt: number, battleCnt: number, guildCnt: number, activityCnt: number, orderCnt: number, gmCnt: number, systimerCnt: number, gmConnectorCnt: number }; +interface ServerConfig { name: string, host: string, clientHost: string, connectorCnt: number, chatCnt: number, roleCnt: number, battleCnt: number, comBattleCnt: number, guildCnt: number, activityCnt: number, orderCnt: number, gmCnt: number, systimerCnt: number, gmConnectorCnt: number }; -let [totalConnector, totalChat, totalRole, totalBattle, totalGuild, totalActivity, totalOrder, totalGm, totalSystimer, totalGmConnector] = Array(10).fill(0); +let [totalConnector, totalChat, totalRole, totalBattle, totalComBattle, totalGuild, totalActivity, totalOrder, totalGm, totalSystimer, totalGmConnector] = Array(11).fill(0); // 服务器配置:公测渠道 const CH_SERVERS_FILE = 'yjz_ch.ts'; const ch1ServerConfig: ServerConfig[] = [ - { name: 'ch1', host: '172.16.4.144', clientHost: 'yjz-ch-game1.fdd73.com', connectorCnt: 6, chatCnt: 2, roleCnt: 6, battleCnt: 2, guildCnt: 6, activityCnt: 2, orderCnt: 2, gmCnt: 1, systimerCnt: 1, gmConnectorCnt: 0 }, - { name: 'ch2', host: '172.16.4.139', clientHost: 'yjz-ch-game2.fdd73.com', connectorCnt: 6, chatCnt: 2, roleCnt: 6, battleCnt: 4, guildCnt: 6, activityCnt: 3, orderCnt: 2, gmCnt: 0, systimerCnt: 0, gmConnectorCnt: 0 }, - { name: 'ch3', host: '172.16.4.143', clientHost: 'yjz-ch-game3.fdd73.com', connectorCnt: 6, chatCnt: 2, roleCnt: 6, battleCnt: 2, guildCnt: 6, activityCnt: 2, orderCnt: 2, gmCnt: 2, systimerCnt: 0, gmConnectorCnt: 1 }, - { name: 'ch4', host: '172.16.4.175', clientHost: 'yjz-ch-game4.fdd73.com', connectorCnt: 6, chatCnt: 2, roleCnt: 6, battleCnt: 4, guildCnt: 6, activityCnt: 4, orderCnt: 2, gmCnt: 0, systimerCnt: 0, gmConnectorCnt: 0 }, - { name: 'ch5', host: '172.16.4.172', clientHost: 'yjz-ch-game5.fdd73.com', connectorCnt: 6, chatCnt: 2, roleCnt: 6, battleCnt: 4, guildCnt: 6, activityCnt: 4, orderCnt: 2, gmCnt: 0, systimerCnt: 0, gmConnectorCnt: 0 }, - { name: 'ch6', host: '172.16.4.170', clientHost: 'yjz-ch-game6.fdd73.com', connectorCnt: 6, chatCnt: 2, roleCnt: 6, battleCnt: 4, guildCnt: 6, activityCnt: 4, orderCnt: 2, gmCnt: 0, systimerCnt: 0, gmConnectorCnt: 0 }, + { name: 'ch1', host: '172.16.4.144', clientHost: 'yjz-ch-game1.fdd73.com', connectorCnt: 6, chatCnt: 2, roleCnt: 6, battleCnt: 2, comBattleCnt: 1, guildCnt: 6, activityCnt: 2, orderCnt: 2, gmCnt: 1, systimerCnt: 1, gmConnectorCnt: 0 }, + { name: 'ch2', host: '172.16.4.139', clientHost: 'yjz-ch-game2.fdd73.com', connectorCnt: 6, chatCnt: 2, roleCnt: 6, battleCnt: 4, comBattleCnt: 1, guildCnt: 6, activityCnt: 3, orderCnt: 2, gmCnt: 0, systimerCnt: 0, gmConnectorCnt: 0 }, + { name: 'ch3', host: '172.16.4.143', clientHost: 'yjz-ch-game3.fdd73.com', connectorCnt: 6, chatCnt: 2, roleCnt: 6, battleCnt: 2, comBattleCnt: 1, guildCnt: 6, activityCnt: 2, orderCnt: 2, gmCnt: 2, systimerCnt: 0, gmConnectorCnt: 1 }, + { name: 'ch4', host: '172.16.4.175', clientHost: 'yjz-ch-game4.fdd73.com', connectorCnt: 6, chatCnt: 2, roleCnt: 6, battleCnt: 4, comBattleCnt: 1, guildCnt: 6, activityCnt: 4, orderCnt: 2, gmCnt: 0, systimerCnt: 0, gmConnectorCnt: 0 }, + { name: 'ch5', host: '172.16.4.172', clientHost: 'yjz-ch-game5.fdd73.com', connectorCnt: 6, chatCnt: 2, roleCnt: 6, battleCnt: 4, comBattleCnt: 1, guildCnt: 6, activityCnt: 4, orderCnt: 2, gmCnt: 0, systimerCnt: 0, gmConnectorCnt: 0 }, + { name: 'ch6', host: '172.16.4.170', clientHost: 'yjz-ch-game6.fdd73.com', connectorCnt: 6, chatCnt: 2, roleCnt: 6, battleCnt: 4, comBattleCnt: 1, guildCnt: 6, activityCnt: 4, orderCnt: 2, gmCnt: 0, systimerCnt: 0, gmConnectorCnt: 0 }, ]; function genServer(config: ServerConfig) { const servers = {}; - const { host, clientHost, connectorCnt, chatCnt, roleCnt, battleCnt, guildCnt, activityCnt, orderCnt, gmCnt, systimerCnt, gmConnectorCnt } = config; + const { host, clientHost, connectorCnt, chatCnt, roleCnt, battleCnt, comBattleCnt, guildCnt, activityCnt, orderCnt, gmCnt, systimerCnt, gmConnectorCnt } = config; const connectorServers = []; for (let i = 0; i < connectorCnt; i++) { @@ -71,6 +72,13 @@ function genServer(config: ServerConfig) { } servers['battle'] = battleServers; + const comBattleServers = []; + for (let i = 0; i < comBattleCnt; i++) { + comBattleServers.push({ 'id': `comBattle-server-${totalComBattle + 1}`, 'host': host, 'port': COM_BATTLE_START_PORT + i }); + totalComBattle++; + } + servers['comBattle'] = comBattleServers; + const guildServers = []; for (let i = 0; i < guildCnt; i++) { guildServers.push({ 'id': `guild-server-${totalGuild + 1}`, 'host': host, 'port': GUILD_START_PORT + i }); diff --git a/game-server/config/servers.ts b/game-server/config/servers.ts index 60a409b6b..1f1f55b6c 100644 --- a/game-server/config/servers.ts +++ b/game-server/config/servers.ts @@ -18,6 +18,9 @@ module.exports = { 'battle': [ { 'id': 'battle-server-1', 'host': '127.0.0.1', 'port': 6054, "args": " --inspect=9238" } ], + 'comBattle': [ + { 'id': 'comBattle-server-1', 'host': '127.0.0.1', 'port': 6066, "args": " --inspect=9246" } + ], 'gm': [ { 'id': 'gm-server-1', 'host': '127.0.0.1', 'port': 6055, "args": " --inspect=9234" } ], @@ -76,6 +79,9 @@ module.exports = { { 'id': 'battle-server-2', 'host': '172.26.145.155', 'port': 6063 }, { 'id': 'battle-server-3', 'host': '172.26.145.155', 'port': 6064 } ], + 'comBattle': [ + { 'id': 'comBattle-server-1', 'host': '172.26.145.155', 'port': 6067 }, + ], // 'gate': [ // { 'id': 'gate-server-1', 'host': '172.26.145.155', 'clientHost': 'zyz_web.trgame.cn', 'clientPort': 3014, 'frontend': true } // ], @@ -111,6 +117,9 @@ module.exports = { 'battle': [ { 'id': 'battle-server-1', 'host': '172.26.145.159', 'port': 6054 } ], + 'comBattle': [ + { 'id': 'battle-server-1', 'host': '172.26.145.159', 'port': 6065 } + ], 'gate': [ { 'id': 'gate-server-1', 'host': '172.26.145.159', 'clientHost': 'pinus_test.trgame.cn', 'clientPort': 3014, 'frontend': true } ], @@ -121,39 +130,42 @@ module.exports = { { 'id': 'systimer-server-1', 'host': '172.26.145.159', 'port': 6056 } ], 'guild': [ - { 'id': 'guild-server-1', 'host': '172.26.145.159', 'port': 6061, "args": " --inspect=9239" }, - { 'id': 'guild-server-2', 'host': '172.26.145.159', 'port': 6062, "args": " --inspect=9239" }, - { 'id': 'guild-server-3', 'host': '172.26.145.159', 'port': 6063, "args": " --inspect=9239" }, - { 'id': 'guild-server-4', 'host': '172.26.145.159', 'port': 6064, "args": " --inspect=9239" }, + { 'id': 'guild-server-1', 'host': '172.26.145.159', 'port': 6061 }, + { 'id': 'guild-server-2', 'host': '172.26.145.159', 'port': 6062 }, + { 'id': 'guild-server-3', 'host': '172.26.145.159', 'port': 6063 }, + { 'id': 'guild-server-4', 'host': '172.26.145.159', 'port': 6064 }, ], 'activity': [ - { 'id': 'activity-server-1', 'host': '172.26.145.159', 'port': 6059, "args": " --inspect=9241" }, + { 'id': 'activity-server-1', 'host': '172.26.145.159', 'port': 6059 }, ], 'order': [ - { 'id': 'order-server-1', 'host': '172.26.145.159', 'port': 6060, "args": " --inspect=9242" }, + { 'id': 'order-server-1', 'host': '172.26.145.159', 'port': 6060 }, ] }, 'dev': { 'connector': [ - { 'id': 'connector-server-1', 'port': 4050, 'clientHost': 'zyzdev.trgame.cn', 'host': '172.26.145.161', 'clientPort': 3050, 'frontend': true, "args": " --inspect=9237" }, + { 'id': 'connector-server-1', 'port': 4050, 'clientHost': 'zyzdev.trgame.cn', 'host': '172.26.145.161', 'clientPort': 3050, 'frontend': true }, ], 'chat': [ - { 'id': 'chat-server-1', 'host': '172.26.145.161', 'port': 6050, "args": " --inspect=9234" }, + { 'id': 'chat-server-1', 'host': '172.26.145.161', 'port': 6050 }, ], 'role': [ - { 'id': 'role-server-1', 'host': '172.26.145.161', 'port': 6053, "args": " --inspect=9231" } + { 'id': 'role-server-1', 'host': '172.26.145.161', 'port': 6053 } ], 'battle': [ - { 'id': 'battle-server-1', 'host': '172.26.145.161', 'port': 6054, "args": " --inspect=9230" } + { 'id': 'battle-server-1', 'host': '172.26.145.161', 'port': 6054 } + ], + 'comBattle': [ + { 'id': 'comBattle-server-1', 'host': '172.26.145.161', 'port': 6065 } ], 'gate': [ - { 'id': 'gate-server-1', 'host': '172.26.145.161', 'clientHost': 'zyzdev.trgame.cn', 'clientPort': 3014, 'frontend': true, "args": " --inspect=9227" }, + { 'id': 'gate-server-1', 'host': '172.26.145.161', 'clientHost': 'zyzdev.trgame.cn', 'clientPort': 3014, 'frontend': true }, ], 'gm': [ - { 'id': 'gm-server-1', 'host': '127.0.0.1', 'port': 6055, "args": " --inspect=9232" } + { 'id': 'gm-server-1', 'host': '127.0.0.1', 'port': 6055 } ], 'systimer': [ - { 'id': 'systimer-server-1', 'host': '172.26.145.161', 'port': 6056, "args": " --inspect=9233" } + { 'id': 'systimer-server-1', 'host': '172.26.145.161', 'port': 6056 } ], 'guild': [ { 'id': 'guild-server-1', 'host': '172.26.145.161', 'port': 6057 }, @@ -162,10 +174,10 @@ module.exports = { { 'id': 'guild-server-4', 'host': '172.26.145.161', 'port': 6063 }, ], 'activity': [ - { 'id': 'activity-server-1', 'host': '172.26.145.161', 'port': 6059, "args": " --inspect=9241" }, + { 'id': 'activity-server-1', 'host': '172.26.145.161', 'port': 6059 }, ], 'order': [ - { 'id': 'order-server-1', 'host': '172.26.145.161', 'port': 6060, "args": " --inspect=9242" }, + { 'id': 'order-server-1', 'host': '172.26.145.161', 'port': 6060 }, ] }, 'isbn': { @@ -184,6 +196,9 @@ module.exports = { 'battle': [ { 'id': 'battle-server-1', 'host': '127.0.0.1', 'port': 6054 } ], + 'comBattle': [ + { 'id': 'comBattle-server-1', 'host': '127.0.0.1', 'port': 6065 } + ], 'gate': [ { 'id': 'gate-server-1', 'host': '127.0.0.1', 'clientHost': 'zyz_isbn.trgame.cn', 'clientPort': 3014, 'frontend': true }, { @@ -226,6 +241,9 @@ module.exports = { 'battle': [ { 'id': 'battle-server-1', 'host': '127.0.0.1', 'port': 6054 } ], + 'comBattle': [ + { 'id': 'comBattle-server-1', 'host': '127.0.0.1', 'port': 6065 } + ], 'gate': [ { 'id': 'gate-server-1', 'host': '127.0.0.1', 'clientHost': 'zyz_isbn_hk.trgame.cn', 'clientPort': 3014, 'frontend': true }, { @@ -243,13 +261,13 @@ module.exports = { { 'id': 'systimer-server-1', 'host': '127.0.0.1', 'port': 6056 } ], 'guild': [ - { 'id': 'guild-server-1', 'host': '127.0.0.1', 'port': 6057, "args": " --inspect=9239" }, + { 'id': 'guild-server-1', 'host': '127.0.0.1', 'port': 6057 }, ], 'activity': [ - { 'id': 'activity-server-1', 'host': '127.0.0.1', 'port': 6059, "args": " --inspect=9241" }, + { 'id': 'activity-server-1', 'host': '127.0.0.1', 'port': 6059 }, ], 'order': [ - { 'id': 'order-server-1', 'host': '127.0.0.1', 'port': 6060, "args": " --inspect=9242" }, + { 'id': 'order-server-1', 'host': '127.0.0.1', 'port': 6060 }, ] }, 'monitor': { @@ -269,6 +287,9 @@ module.exports = { 'battle': [ { 'id': 'battle-server-1', 'host': '127.0.0.1', 'port': 6054 } ], + 'comBattle': [ + { 'id': 'comBattle-server-1', 'host': '127.0.0.1', 'port': 6065 } + ], 'gate': [ { 'id': 'gate-server-1', 'host': '127.0.0.1', 'clientHost': 'zyz_monitor.trgame.cn', 'clientPort': 3014, 'frontend': true }, // { 'id': 'gate-server-2', 'host': '127.0.0.1', 'clientHost': 'zyz_monitor.trgame.cn', 'clientPort': 3015, 'frontend': true } @@ -280,14 +301,14 @@ module.exports = { { 'id': 'systimer-server-1', 'host': '127.0.0.1', 'port': 6056 } ], 'guild': [ - { 'id': 'guild-server-1', 'host': '127.0.0.1', 'port': 6057, "args": " --inspect=9239" }, - // { 'id': 'guild-server-2', 'host': '127.0.0.1', 'port': 6058, "args": " --inspect=9240" } + { 'id': 'guild-server-1', 'host': '127.0.0.1', 'port': 6057 }, + // { 'id': 'guild-server-2', 'host': '127.0.0.1', 'port': 6058 } ], 'activity': [ - { 'id': 'activity-server-1', 'host': '127.0.0.1', 'port': 6059, "args": " --inspect=9241" }, + { 'id': 'activity-server-1', 'host': '127.0.0.1', 'port': 6059 }, ], 'order': [ - { 'id': 'order-server-1', 'host': '127.0.0.1', 'port': 6060, "args": " --inspect=9242" }, + { 'id': 'order-server-1', 'host': '127.0.0.1', 'port': 6060 }, ] }, 'monitor2': { @@ -303,6 +324,9 @@ module.exports = { 'battle': [ { 'id': 'battle-server-1', 'host': '172.26.145.170', 'port': 6054 } ], + 'comBattle': [ + { 'id': 'comBattle-server-1', 'host': '172.26.145.170', 'port': 6065 } + ], 'gate': [ { 'id': 'gate-server-1', 'host': '172.26.145.170', 'clientHost': '8.142.30.128', 'clientPort': 3014, 'frontend': true }, ], @@ -324,7 +348,7 @@ module.exports = { }, 'distribute': { 'connector': [ - { 'id': 'connector-server-4', 'host': '172.26.145.171', 'port': 9061, 'clientHost': '121.89.211.172', 'clientPort': 3051, 'frontend': true, "args": " --inspect=9237" }, + { 'id': 'connector-server-4', 'host': '172.26.145.171', 'port': 9061, 'clientHost': '121.89.211.172', 'clientPort': 3051, 'frontend': true }, ], 'battle': [ { 'id': 'battle-server-2', 'host': '172.26.145.171', 'port': 9062 }, @@ -359,20 +383,23 @@ module.exports = { { 'id': 'battle-server-1', 'host': '172.16.4.108', 'port': 6054 }, { 'id': 'battle-server-2', 'host': '172.16.4.108', 'port': 6067 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-1', 'host': '172.16.4.108', 'port': 6069 }, + ], 'gm': [], 'systimer': [ { 'id': 'systimer-server-1', 'host': '172.16.4.108', 'port': 6056 } ], 'guild': [ - { 'id': 'guild-server-1', 'host': '172.16.4.108', 'port': 6057, "args": " --inspect=9239" }, - { 'id': 'guild-server-2', 'host': '172.16.4.108', 'port': 6058, "args": " --inspect=9240" } + { 'id': 'guild-server-1', 'host': '172.16.4.108', 'port': 6057 }, + { 'id': 'guild-server-2', 'host': '172.16.4.108', 'port': 6058 } ], 'activity': [ { 'id': 'activity-server-1', 'host': '172.16.4.108', 'port': 6059 }, { 'id': 'activity-server-2', 'host': '172.16.4.108', 'port': 6068 }, ], 'order': [ - { 'id': 'order-server-1', 'host': '172.16.4.108', 'port': 6060, "args": " --inspect=9242" }, + { 'id': 'order-server-1', 'host': '172.16.4.108', 'port': 6060 }, ] }, 'sq2': { @@ -400,6 +427,9 @@ module.exports = { { 'id': 'battle-server-1', 'host': '172.16.4.106', 'port': 6054 }, { 'id': 'battle-server-2', 'host': '172.16.4.106', 'port': 6067 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-1', 'host': '172.16.4.106', 'port': 6069 }, + ], 'gm': [ { 'id': 'gm-server-1', 'host': '172.16.4.106', 'port': 6055 } ], @@ -436,6 +466,9 @@ module.exports = { { 'id': 'battle-server-1', 'host': '172.16.4.122', 'port': 6075 }, { 'id': 'battle-server-2', 'host': '172.16.4.122', 'port': 6076 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-1', 'host': '172.16.4.122', 'port': 6085 }, + ], 'guild': [ { 'id': 'guild-server-1', 'host': '172.16.4.122', 'port': 6077 }, { 'id': 'guild-server-2', 'host': '172.16.4.122', 'port': 6078 }, @@ -472,6 +505,9 @@ module.exports = { { 'id': 'battle-server-1', 'host': '172.16.4.126', 'port': 6053 }, { 'id': 'battle-server-2', 'host': '172.16.4.126', 'port': 6054 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-1', 'host': '172.16.4.126', 'port': 6060 }, + ], 'gm': [], 'systimer': [ { 'id': 'systimer-server-1', 'host': '172.16.4.126', 'port': 6055 } @@ -503,6 +539,9 @@ module.exports = { 'battle': [ { 'id': 'battle-server-3', 'host': '172.16.4.121', 'port': 6064 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-3', 'host': '172.16.4.121', 'port': 6070 }, + ], 'gm': [], 'systimer': [], 'guild': [ @@ -534,6 +573,9 @@ module.exports = { { 'id': 'battle-server-4', 'host': '172.16.4.127', 'port': 6074 }, { 'id': 'battle-server-5', 'host': '172.16.4.127', 'port': 6075 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-4', 'host': '172.16.4.127', 'port': 6081 }, + ], 'gm': [ { 'id': 'gm-server-1', 'host': '172.16.4.127', 'port': 6076 } ], @@ -566,6 +608,9 @@ module.exports = { { 'id': 'battle-server-1', 'host': '172.16.4.132', 'port': 6075 }, { 'id': 'battle-server-2', 'host': '172.16.4.132', 'port': 6076 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-1', 'host': '172.16.4.132', 'port': 6085 }, + ], 'guild': [ { 'id': 'guild-server-1', 'host': '172.16.4.132', 'port': 6077 }, { 'id': 'guild-server-2', 'host': '172.16.4.132', 'port': 6078 }, @@ -603,6 +648,9 @@ module.exports = { 'battle': [ { 'id': 'battle-server-3', 'host': '172.16.4.131', 'port': 6064 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-3', 'host': '172.16.4.131', 'port': 6070 }, + ], 'gm': [], 'systimer': [], 'guild': [ diff --git a/game-server/config/yjz_ch.ts b/game-server/config/yjz_ch.ts index 6e855b751..8ce6d1042 100644 --- a/game-server/config/yjz_ch.ts +++ b/game-server/config/yjz_ch.ts @@ -106,6 +106,13 @@ export const ch1 = { "port": 6032 } ], + "comBattle": [ + { + "id": "comBattle-server-1", + "host": "172.16.4.144", + "port": 6091 + } + ], "guild": [ { "id": "guild-server-1", @@ -294,6 +301,13 @@ export const ch2 = { "port": 6034 } ], + "comBattle": [ + { + "id": "comBattle-server-2", + "host": "172.16.4.139", + "port": 6091 + } + ], "guild": [ { "id": "guild-server-7", @@ -474,6 +488,13 @@ export const ch3 = { "port": 6032 } ], + "comBattle": [ + { + "id": "comBattle-server-3", + "host": "172.16.4.143", + "port": 6091 + } + ], "guild": [ { "id": "guild-server-13", @@ -661,6 +682,13 @@ export const ch4 = { "port": 6034 } ], + "comBattle": [ + { + "id": "comBattle-server-4", + "host": "172.16.4.175", + "port": 6091 + } + ], "guild": [ { "id": "guild-server-19", @@ -847,6 +875,13 @@ export const ch5 = { "port": 6034 } ], + "comBattle": [ + { + "id": "comBattle-server-5", + "host": "172.16.4.172", + "port": 6091 + } + ], "guild": [ { "id": "guild-server-25", @@ -1033,6 +1068,13 @@ export const ch6 = { "port": 6034 } ], + "comBattle": [ + { + "id": "comBattle-server-6", + "host": "172.16.4.170", + "port": 6091 + } + ], "guild": [ { "id": "guild-server-31", diff --git a/game-server/config/yjz_zy.ts b/game-server/config/yjz_zy.ts index baf7fc9e4..face8b6c0 100644 --- a/game-server/config/yjz_zy.ts +++ b/game-server/config/yjz_zy.ts @@ -24,6 +24,9 @@ export const zy1 = { { 'id': 'battle-server-1', 'host': '172.16.4.140', 'port': 6031 }, { 'id': 'battle-server-2', 'host': '172.16.4.140', 'port': 6032 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-1', 'host': '172.16.4.140', 'port': 6091 }, + ], 'gm': [], 'systimer': [], 'guild': [ @@ -68,6 +71,9 @@ export const zy2 = { { 'id': 'battle-server-5', 'host': '172.16.4.146', 'port': 6033 }, { 'id': 'battle-server-6', 'host': '172.16.4.146', 'port': 6034 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-2', 'host': '172.16.4.146', 'port': 6091 }, + ], 'gm': [ { 'id': 'gm-server-1', 'host': '172.16.4.146', 'port': 6071 }, ], @@ -111,6 +117,9 @@ export const zy3 = { { 'id': 'battle-server-9', 'host': '172.16.4.142', 'port': 6033 }, { 'id': 'battle-server-10', 'host': '172.16.4.142', 'port': 6034 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-3', 'host': '172.16.4.142', 'port': 6091 }, + ], 'gm': [ { 'id': 'gm-server-2', 'host': '172.16.4.142', 'port': 6071 }, { 'id': 'gm-server-3', 'host': '172.16.4.142', 'port': 6072 }, @@ -158,6 +167,9 @@ export const zy4 = { { 'id': 'battle-server-11', 'host': '172.16.4.145', 'port': 6031 }, { 'id': 'battle-server-12', 'host': '172.16.4.145', 'port': 6032 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-4', 'host': '172.16.4.145', 'port': 6091 }, + ], 'gm': [], 'systimer': [], 'guild': [ @@ -205,6 +217,9 @@ export const zy5 = { { 'id': 'battle-server-13', 'host': '172.16.4.141', 'port': 6031 }, { 'id': 'battle-server-14', 'host': '172.16.4.141', 'port': 6032 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-5', 'host': '172.16.4.141', 'port': 6091 }, + ], 'gm': [], 'systimer': [], 'guild': [ @@ -253,6 +268,9 @@ export const zy6 = { { 'id': 'battle-server-15', 'host': '172.16.4.174', 'port': 6031 }, { 'id': 'battle-server-16', 'host': '172.16.4.174', 'port': 6032 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-6', 'host': '172.16.4.174', 'port': 6091 }, + ], 'gm': [], 'systimer': [], 'guild': [ @@ -301,6 +319,9 @@ export const zy7 = { { 'id': 'battle-server-17', 'host': '172.16.4.173', 'port': 6031 }, { 'id': 'battle-server-18', 'host': '172.16.4.173', 'port': 6032 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-7', 'host': '172.16.4.173', 'port': 6091 }, + ], 'gm': [], 'systimer': [], 'guild': [ @@ -349,6 +370,9 @@ export const zy8 = { { 'id': 'battle-server-19', 'host': '172.16.4.169', 'port': 6031 }, { 'id': 'battle-server-20', 'host': '172.16.4.169', 'port': 6032 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-8', 'host': '172.16.4.169', 'port': 6091 }, + ], 'gm': [], 'systimer': [], 'guild': [ @@ -397,6 +421,9 @@ export const zy9 = { { 'id': 'battle-server-21', 'host': '172.16.4.176', 'port': 6031 }, { 'id': 'battle-server-22', 'host': '172.16.4.176', 'port': 6032 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-9', 'host': '172.16.4.176', 'port': 6091 }, + ], 'gm': [], 'systimer': [], 'guild': [ @@ -445,6 +472,9 @@ export const zy10 = { { 'id': 'battle-server-23', 'host': '172.16.4.171', 'port': 6031 }, { 'id': 'battle-server-24', 'host': '172.16.4.171', 'port': 6032 }, ], + 'comBattle': [ + { 'id': 'comBattle-server-10', 'host': '172.16.4.171', 'port': 6091 }, + ], 'gm': [], 'systimer': [], 'guild': [ @@ -481,6 +511,9 @@ export const yjzios = { 'battle': [ { 'id': 'battle-server-1', 'host': '127.0.0.1', 'port': 6054 } ], + 'comBattle': [ + { 'id': 'comBattle-server-1', 'host': '127.0.0.1', 'port': 6091 } + ], 'gm': [ { 'id': 'gm-server-1', 'host': '127.0.0.1', 'port': 6055 } ],