查询房间信息

This commit is contained in:
sk 2024-09-18 18:22:46 +08:00
parent 03e0cdb6d7
commit e36c6608c3
2 changed files with 8 additions and 6 deletions

View File

@ -106,7 +106,7 @@ func init() {
if err != nil {
pack.Tag = webapiproto.TagCode_FAILED
pack.Msg = "数据序列化失败"
return common.ResponseTag_Ok, pack
return common.ResponseTag_ParamError, pack
}
pack.Tag = webapiproto.TagCode_SUCCESS
@ -114,7 +114,7 @@ func init() {
if scene == nil || scene.ExtraData == nil {
pack.Tag = webapiproto.TagCode_NotFound
pack.Msg = "房间没找到"
return common.ResponseTag_TransactYield, pack
return common.ResponseTag_NoFindRoom, pack
}
switch d := scene.ExtraData.(type) {
@ -140,11 +140,11 @@ func init() {
}
pack.List = append(pack.List, item)
}
return common.ResponseTag_Ok, pack
default:
pack.Tag = webapiproto.TagCode_FAILED
pack.Msg = "未实现"
}
return common.ResponseTag_Ok, pack
return common.ResponseTag_NoData, pack
}))
}

View File

@ -173,8 +173,10 @@ func init() {
}),
OnChildRespWrapper: transact.OnChildRespWrapper(func(tNode *transact.TransNode, hChild transact.TransNodeID, retCode int, ud interface{}) transact.TransExeResult {
logger.Logger.Tracef("GameSrvApi OnChildRespWrapper %v:%v", hChild, ud)
tNode.TransEnv.SetField(GAMESRVAPI_TRANSACTE_RESPONSE, ud)
return transact.TransExeResult(retCode)
if retCode == common.ResponseTag_Ok {
tNode.TransEnv.SetField(GAMESRVAPI_TRANSACTE_RESPONSE, ud)
}
return transact.TransExeResult_Success
}),
})
// 对局详情