1
This commit is contained in:
parent
eb5b708a3e
commit
89f73cc4d9
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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; //数据
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user