mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
GS协议代理修复
This commit is contained in:
@@ -56,16 +56,14 @@ type GameManager struct {
|
|||||||
|
|
||||||
func NewGameManager(dao *dao.Dao, messageQueue *mq.MessageQueue, gsId uint32, gsAppid string, mainGsAppid string) (r *GameManager) {
|
func NewGameManager(dao *dao.Dao, messageQueue *mq.MessageQueue, gsId uint32, gsAppid string, mainGsAppid string) (r *GameManager) {
|
||||||
r = new(GameManager)
|
r = new(GameManager)
|
||||||
if appConfig.CONF.Hk4e.ClientProtoProxyEnable {
|
|
||||||
// 反射调用的方法在启动时测试是否正常防止中途panic
|
|
||||||
r.GetClientProtoObjByName("PingReq")
|
|
||||||
}
|
|
||||||
r.dao = dao
|
r.dao = dao
|
||||||
MESSAGE_QUEUE = messageQueue
|
MESSAGE_QUEUE = messageQueue
|
||||||
r.snowflake = alg.NewSnowflakeWorker(int64(gsId))
|
r.snowflake = alg.NewSnowflakeWorker(int64(gsId))
|
||||||
if appConfig.CONF.Hk4e.ClientProtoProxyEnable {
|
if appConfig.CONF.Hk4e.ClientProtoProxyEnable {
|
||||||
r.clientCmdProtoMap = client_proto.NewClientCmdProtoMap()
|
r.clientCmdProtoMap = client_proto.NewClientCmdProtoMap()
|
||||||
r.clientCmdProtoMapRefValue = reflect.ValueOf(r.clientCmdProtoMap)
|
r.clientCmdProtoMapRefValue = reflect.ValueOf(r.clientCmdProtoMap)
|
||||||
|
// 反射调用的方法在启动时测试是否正常防止中途panic
|
||||||
|
r.GetClientProtoObjByName("PingReq")
|
||||||
}
|
}
|
||||||
r.gsId = gsId
|
r.gsId = gsId
|
||||||
r.gsAppid = gsAppid
|
r.gsAppid = gsAppid
|
||||||
|
|||||||
Reference in New Issue
Block a user