From 89f73cc4d9b204a4308d0ad71eebdbc128e924f1 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 11 Sep 2023 16:43:57 +0800 Subject: [PATCH] 1 --- server/hallserver/listener/handlermgr.go | 2 +- server/hallserver/proto/cs_msgid.proto | 4 ++-- server/hallserver/proto/cs_proto.proto | 4 ++-- server/hallserver/room/roommgr.go | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/hallserver/listener/handlermgr.go b/server/hallserver/listener/handlermgr.go index b3f066b9..8a904650 100644 --- a/server/hallserver/listener/handlermgr.go +++ b/server/hallserver/listener/handlermgr.go @@ -20,7 +20,7 @@ func (this *HandlerMgr) Init() { cs.RegHandlerId(int(cs.CMMessageIdE__CMCreateRoom), constant.ROOM_MGR_HANDLER_ID) cs.RegHandlerId(int(cs.CMMessageIdE__CMJoinRoom), constant.ROOM_MGR_HANDLER_ID) - cs.RegHandlerId(int(cs.CMMessageIdE__CMRoomList), constant.ROOM_MGR_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMSearchRoom), constant.ROOM_MGR_HANDLER_ID) cs.RegHandlerId(int(cs.CMMessageIdE__CMDisbandRoom), constant.ROOM_HANDLER_ID) cs.RegHandlerId(int(cs.CMMessageIdE__CMLeaveRoom), constant.ROOM_HANDLER_ID) diff --git a/server/hallserver/proto/cs_msgid.proto b/server/hallserver/proto/cs_msgid.proto index 259a5e5d..516033b5 100644 --- a/server/hallserver/proto/cs_msgid.proto +++ b/server/hallserver/proto/cs_msgid.proto @@ -10,7 +10,7 @@ enum CMMessageId_e _CMReconnect = 104; _CMCreateRoom = 105; - _CMRoomList = 106; + _CMSearchRoom = 106; _CMJoinRoom = 107; _CMDisbandRoom = 108; _CMLeaveRoom = 109; @@ -28,7 +28,7 @@ enum SMMessageId_e _SMReconnect = 104; _SMCreateRoom = 105; - _SMRoomList = 106; + _SMSearchRoom = 106; _SMJoinRoom = 107; _SMDisbandRoom = 108; _SMLeaveRoom = 109; diff --git a/server/hallserver/proto/cs_proto.proto b/server/hallserver/proto/cs_proto.proto index e8ac0c27..8ee0153a 100644 --- a/server/hallserver/proto/cs_proto.proto +++ b/server/hallserver/proto/cs_proto.proto @@ -191,13 +191,13 @@ message SMCreateRoom } //获取房间列表 -message CMRoomList +message CMSearchRoom { optional int32 page = 1; //第几页 optional int32 room_id = 2; //房间id } -message SMRoomList +message SMSearchRoom { optional MFPagination Pagination = 1; //分页信息 repeated MFRoom rows = 2; //数据 diff --git a/server/hallserver/room/roommgr.go b/server/hallserver/room/roommgr.go index 42c4eb2b..5a598118 100644 --- a/server/hallserver/room/roommgr.go +++ b/server/hallserver/room/roommgr.go @@ -101,9 +101,9 @@ func (this *roomMgr) CMJoinRoom(hdr *f5.MsgHdr, msg *cs.CMJoinRoom) { hum.SendMsg(&rspMsg) } -func (this *roomMgr) CMRoomList(hdr *f5.MsgHdr, msg *cs.CMRoomList) { +func (this *roomMgr) CMSearchRoom(hdr *f5.MsgHdr, msg *cs.CMSearchRoom) { hum := hdr.Context.(common.Player) - rspMsg := cs.SMRoomList{} + rspMsg := cs.SMSearchRoom{} rspMsg.Pagination = &cs.MFPagination{} lastIdx := this.getSearchRoomLastIdx(hum.GetAccountId()) if msg.GetPage() <= 0 {