From 5b6a5ad5d3882a09f76f492d957dbacd98a99cda Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Wed, 4 Sep 2024 11:54:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=9E=E6=8A=80=E9=A6=86=E6=88=BF=E9=97=B4?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/scenemgr.go | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/worldsrv/scenemgr.go b/worldsrv/scenemgr.go index 42c33e6..702bc49 100644 --- a/worldsrv/scenemgr.go +++ b/worldsrv/scenemgr.go @@ -192,25 +192,26 @@ func (m *SceneMgr) MarshalAllRoom(platform string, groupId, gameId int, gameMode } si := &webapiproto.RoomInfo{ - Platform: platformName, - SceneId: int32(s.sceneId), - GameId: int32(s.gameId), - GameMode: int32(s.gameMode), - SceneMode: int32(s.sceneMode), - GroupId: s.groupId, - Creator: s.creator, - ReplayCode: s.replayCode, - Params: common.CopySliceInt64ToInt32(s.params), - PlayerCnt: int32(len(s.players) - s.robotNum), - RobotCnt: int32(s.robotNum), - CreateTime: s.createTime.Unix(), - BaseScore: s.dbGameFree.BaseScore, - GameFreeId: s.dbGameFree.GetId(), - MaxRound: s.totalRound, - Password: s.GetPassword(), - CostType: s.GetCostType(), - Voice: s.GetVoice(), - CurrRound: s.currRound, + Platform: platformName, + SceneId: int32(s.sceneId), + GameId: int32(s.gameId), + GameMode: int32(s.gameMode), + SceneMode: int32(s.sceneMode), + GroupId: s.groupId, + GameFreeId: s.dbGameFree.GetId(), + Creator: s.creator, + ReplayCode: s.replayCode, + Params: common.CopySliceInt64ToInt32(s.params), + PlayerCnt: int32(len(s.players) - s.robotNum), + RobotCnt: int32(s.robotNum), + CreateTime: s.createTime.Unix(), + BaseScore: s.dbGameFree.BaseScore, + RoomConfigId: s.GetRoomConfigId(), + CurrRound: s.currRound, + MaxRound: s.totalRound, + Password: s.GetPassword(), + CostType: s.GetCostType(), + Voice: s.GetVoice(), } if s.starting { si.Start = 1