From 62ae866b1e67c71c729a385b1a7da82932f73219 Mon Sep 17 00:00:00 2001 From: UnKownOwO <80520429@qq.com> Date: Sun, 15 Jan 2023 15:29:17 +0800 Subject: [PATCH] =?UTF-8?q?GS=E5=8D=8F=E8=AE=AE=E4=BB=A3=E7=90=86=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gs/game/game_manager.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gs/game/game_manager.go b/gs/game/game_manager.go index 7a1bda2d..68b48923 100644 --- a/gs/game/game_manager.go +++ b/gs/game/game_manager.go @@ -56,16 +56,14 @@ type GameManager struct { func NewGameManager(dao *dao.Dao, messageQueue *mq.MessageQueue, gsId uint32, gsAppid string, mainGsAppid string) (r *GameManager) { r = new(GameManager) - if appConfig.CONF.Hk4e.ClientProtoProxyEnable { - // 反射调用的方法在启动时测试是否正常防止中途panic - r.GetClientProtoObjByName("PingReq") - } r.dao = dao MESSAGE_QUEUE = messageQueue r.snowflake = alg.NewSnowflakeWorker(int64(gsId)) if appConfig.CONF.Hk4e.ClientProtoProxyEnable { r.clientCmdProtoMap = client_proto.NewClientCmdProtoMap() r.clientCmdProtoMapRefValue = reflect.ValueOf(r.clientCmdProtoMap) + // 反射调用的方法在启动时测试是否正常防止中途panic + r.GetClientProtoObjByName("PingReq") } r.gsId = gsId r.gsAppid = gsAppid