From f2c4be64435d130a6ad783a3341127e2e4a989aa Mon Sep 17 00:00:00 2001 From: luying Date: Sat, 8 Jan 2022 14:42:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=EF=BC=9A=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app.ts | 2 +- game-server/app/servers/battle/handler/comBattleHandler.ts | 3 ++- game-server/config/servers.ts | 7 ++----- game-server/xtransitConfig/sq.js | 2 +- shared/consts/statusCode.ts | 1 + 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/game-server/app.ts b/game-server/app.ts index cc8e9159f..d20d75672 100644 --- a/game-server/app.ts +++ b/game-server/app.ts @@ -1,5 +1,5 @@ require('xprofiler').start({ - log_dir: '/root/zyz/game-server/logs', + log_dir: '/zyz_logs/xprofiler', }); import { COM_TEAM_STATUS, STATUS } from './app/consts'; import { diff --git a/game-server/app/servers/battle/handler/comBattleHandler.ts b/game-server/app/servers/battle/handler/comBattleHandler.ts index 1c582f9a3..bd12666ad 100644 --- a/game-server/app/servers/battle/handler/comBattleHandler.ts +++ b/game-server/app/servers/battle/handler/comBattleHandler.ts @@ -182,7 +182,8 @@ export class ComBattleHandler { let sid = session.get('sid'); let { teamCode, isFrd } = msg; let teamStatus = this.teamMap.get(teamCode); - if (!teamStatus || teamStatus.status !== COM_TEAM_STATUS.DEFAULT) return resResult(STATUS.COM_BATTLE_TEAM_INVALID); + if (!teamStatus) return resResult(STATUS.COM_BATTLE_TEAM_INVALID); + if(teamStatus.status !== COM_TEAM_STATUS.DEFAULT) return resResult(STATUS.COM_BATTLE_TEAM_NOT_DEFAULT); if (teamIsFullToStart(teamStatus)) return resResult(STATUS.COM_BATTLE_MEMBER_LIMIT); if (teamStatus.roleIds.indexOf(roleId) !== -1) return resResult(STATUS.COM_BATTLE_DUP_ENTER); if (teamStatus.blacklist.indexOf(roleId) != -1) return resResult(STATUS.COM_BATTLE_BE_KICKED); diff --git a/game-server/config/servers.ts b/game-server/config/servers.ts index 2d5905dce..a170502f1 100644 --- a/game-server/config/servers.ts +++ b/game-server/config/servers.ts @@ -260,11 +260,8 @@ module.exports = { { 'id': 'role-server-3', 'host': '172.16.4.108', 'port': 6062 }, ], 'battle': [ - { 'id': 'battle-server-1', 'host': '172.16.4.108', 'port': 6054 } - ], - 'gate': [ - { 'id': 'gate-server-1', 'host': '172.16.4.108', 'clientHost': 'sq1-game1-sgzyz.37wan.com', 'clientPort': 3014, 'frontend': true }, - { 'id': 'gate-server-2', 'host': '172.16.4.108', 'clientHost': 'sq1-game1-sgzyz.37wan.com', 'clientPort': 3015, 'frontend': true } + { 'id': 'battle-server-1', 'host': '172.16.4.108', 'port': 6054 }, + { 'id': 'battle-server-2', 'host': '172.16.4.108', 'port': 6067 }, ], 'gm': [], 'systimer': [ diff --git a/game-server/xtransitConfig/sq.js b/game-server/xtransitConfig/sq.js index 2a6a74bde..70512ee62 100644 --- a/game-server/xtransitConfig/sq.js +++ b/game-server/xtransitConfig/sq.js @@ -12,7 +12,7 @@ module.exports = { packages: [], // 数组,配置需要监控的项目依赖文件全路径 // III. 不是很重要的可选的配置 - logDir: './game-server/logs', // xprofiler 插件生成性能日志文件的目录,默认两者均为 os.tmpdir() + logDir: '/zyz_logs/xprofiler', // xprofiler 插件生成性能日志文件的目录,默认两者均为 os.tmpdir() docker: false, // 默认 false, 系统数据采集会依赖当前是否是 docker 环境而进行一些特殊处理,可以手动强制指定当前实例是否为 docker 环境 ipMode: false, // 默认 false,此时仅使用 hostname 作为 agentId;设置为 true 后 agentId 组装形式为 ${ip}_${hostname} libMode: false, // 默认 false,此时采集如果收到 shutdown 事件会退出当前进程;如果是以第三方库的形式引用接入应用内,请将此属性设置为 true diff --git a/shared/consts/statusCode.ts b/shared/consts/statusCode.ts index 12c845736..a088a2cc8 100644 --- a/shared/consts/statusCode.ts +++ b/shared/consts/statusCode.ts @@ -134,6 +134,7 @@ export const STATUS = { COM_BATTLE_BLACKLIST: { code: 20633, simStr: '队伍中存在黑名单玩家' }, COM_BATTLE_BE_KICKED: { code: 20634, simStr: '您已被队伍踢出,无法加入'}, COM_BATTLE_CREATE_CE_LIMIT: { code: 20635, simStr: '你的战力不足,不可设置该级别限制' }, + COM_BATTLE_TEAM_NOT_DEFAULT: { code: 20636, simStr: '队伍已过期' }, // 共斗藏宝图合成 COM_BLUEPRT_QUALITY_CANNOT_COMPOSE: { code: 20650, simStr: '该品质藏宝图不可合成' }, COM_BLUEPRT_COUNT_ERROR: { code: 20651, simStr: '材料数量不足' },