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, }