From f4e5dfd26624ba21ab1709cce1a5f6161a67c5e9 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 8 Sep 2023 14:14:59 +0800 Subject: [PATCH] 1 --- server/hallserver/listener/handlermgr.go | 11 ++++++++++ server/hallserver/player/player.go | 27 ++++++++++++++++++++++++ server/hallserver/proto/cs_msgid.proto | 20 ++++++++++++++++++ 3 files changed, 58 insertions(+) diff --git a/server/hallserver/listener/handlermgr.go b/server/hallserver/listener/handlermgr.go index 0a157014..9d493151 100644 --- a/server/hallserver/listener/handlermgr.go +++ b/server/hallserver/listener/handlermgr.go @@ -16,6 +16,17 @@ func (this *HandlerMgr) Init() { cs.RegHandlerId(int(cs.CMMessageIdE__CMPing), constant.PLAYER_MGR_HANDLER_ID) cs.RegHandlerId(int(cs.CMMessageIdE__CMLogin), constant.PLAYER_MGR_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMReconnect), constant.PLAYER_MGR_HANDLER_ID) + + cs.RegHandlerId(int(cs.CMMessageIdE__CMCreateRoom), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMRoomList), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMJoinRoom), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMDisbandRoom), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMLeaveRoom), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMModifyRoom), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMStartGame), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMSetPrepare), constant.PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMKickout), constant.PLAYER_HANDLER_ID) } func (this *HandlerMgr) UnInit() { diff --git a/server/hallserver/player/player.go b/server/hallserver/player/player.go index c9949f68..9f7bdbb4 100644 --- a/server/hallserver/player/player.go +++ b/server/hallserver/player/player.go @@ -34,3 +34,30 @@ func (this *player) init(req *pendingLoginRequest){ this.accountId = req.msg.GetAccountId() this.sessionId = req.msg.GetSessionId() } + +func (this *player) CMCreateRoom(hdr *f5.MsgHdr, msg *cs.CMCreateRoom) { +} + +func (this *player) CMRoomList(hdr *f5.MsgHdr, msg *cs.CMRoomList) { +} + +func (this *player) CMJoinRoom(hdr *f5.MsgHdr, msg *cs.CMJoinRoom) { +} + +func (this *player) CMDisbandRoom(hdr *f5.MsgHdr, msg *cs.CMDisbandRoom) { +} + +func (this *player) CMLeaveRoom(hdr *f5.MsgHdr, msg *cs.CMLeaveRoom) { +} + +func (this *player) CMModifyRoom(hdr *f5.MsgHdr, msg *cs.CMModifyRoom) { +} + +func (this *player) CMStartGame(hdr *f5.MsgHdr, msg *cs.CMStartGame) { +} + +func (this *player) CMSetPrepare(hdr *f5.MsgHdr, msg *cs.CMSetPrepare) { +} + +func (this *player) CMKickout(hdr *f5.MsgHdr, msg *cs.CMKickout) { +} diff --git a/server/hallserver/proto/cs_msgid.proto b/server/hallserver/proto/cs_msgid.proto index a79c00a8..259a5e5d 100644 --- a/server/hallserver/proto/cs_msgid.proto +++ b/server/hallserver/proto/cs_msgid.proto @@ -8,6 +8,16 @@ enum CMMessageId_e _CMPing = 101; _CMLogin = 103; _CMReconnect = 104; + + _CMCreateRoom = 105; + _CMRoomList = 106; + _CMJoinRoom = 107; + _CMDisbandRoom = 108; + _CMLeaveRoom = 109; + _CMModifyRoom = 110; + _CMStartGame = 111; + _CMSetPrepare = 112; + _CMKickout = 113; } enum SMMessageId_e @@ -16,4 +26,14 @@ enum SMMessageId_e _SMRpcError = 102; _SMLogin = 103; _SMReconnect = 104; + + _SMCreateRoom = 105; + _SMRoomList = 106; + _SMJoinRoom = 107; + _SMDisbandRoom = 108; + _SMLeaveRoom = 109; + _SMModifyRoom = 110; + _SMStartGame = 111; + _SMSetPrepare = 112; + _SMKickout = 113; }