From a1e851c749748bffc872f32b25cce7660e3ba1b9 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 8 Sep 2023 17:03:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=88=98=E6=96=97=E6=9C=8D?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/gameconfig.go | 1 + services/cmd/main.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/comm/gameconfig.go b/comm/gameconfig.go index 3fa0e52ea..b2932aa99 100644 --- a/comm/gameconfig.go +++ b/comm/gameconfig.go @@ -18,6 +18,7 @@ type GameConfig struct { Gateways []string //网关服务["127.0.0.1:7895"] GatewayPorts []int //网关通信端口 Workers []string //工作服 + BattleOpen bool //是否启用战斗 BattleAddr string //战斗服地址 } diff --git a/services/cmd/main.go b/services/cmd/main.go index 455c69efd..ef8d6d959 100644 --- a/services/cmd/main.go +++ b/services/cmd/main.go @@ -308,7 +308,7 @@ func convertServiceSttings(config *comm.GameConfig, id int, stype string, ip str sseting.Sys["rpcx"]["RpcxStartType"] = 2 if config.BattleAddr != "" { sseting.Modules["battle"] = map[string]interface{}{ - "OpenCheck": true, + "OpenCheck": config.BattleOpen, "BattleServerAddr": config.BattleAddr, }