From ceeae6f6a16890c154972621eacaf18a00dcd3f1 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 15 Feb 2023 16:21:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0cmd=20=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/gameconfig.go | 1 + services/cmd/main.go | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/comm/gameconfig.go b/comm/gameconfig.go index c593f99b6..3fa0e52ea 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 //工作服 + BattleAddr string //战斗服地址 } //区服db配置 diff --git a/services/cmd/main.go b/services/cmd/main.go index cc347f900..d1c4ceefd 100644 --- a/services/cmd/main.go +++ b/services/cmd/main.go @@ -306,6 +306,12 @@ func convertServiceSttings(config *comm.GameConfig, id int, stype string, ip str sseting.Id = fmt.Sprintf("%s_%s%d", config.AreaId, comm.Service_Worker, id) sseting.Type = comm.Service_Worker sseting.Sys["rpcx"]["RpcxStartType"] = 2 + if config.BattleAddr != "" { + sseting.Modules["battle"]["OpenCheck"] = true + sseting.Modules["battle"]["BattleServerAddr"] = config.BattleAddr + } else { + sseting.Modules["battle"]["OpenCheck"] = false + } break case comm.Service_Mainte: //维护服务 sseting.Id = fmt.Sprintf("%s_%s", config.AreaId, comm.Service_Mainte)