This commit is contained in:
aozhiwei 2023-09-11 16:43:57 +08:00
parent eb5b708a3e
commit 89f73cc4d9
4 changed files with 7 additions and 7 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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; //

View File

@ -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 {