This commit is contained in:
aozhiwei 2024-04-15 11:03:02 +08:00
parent 227c298dd7
commit 2977d97800
3 changed files with 46 additions and 0 deletions

View File

@ -50,6 +50,7 @@ type MsgHandler interface {
CMAddBlacklist(*f5.MsgHdr, *CMAddBlacklist)
CMRemoveBlacklist(*f5.MsgHdr, *CMRemoveBlacklist)
CMInviteFriendMsg(*f5.MsgHdr, *CMInviteFriendMsg)
CMRecommendList(*f5.MsgHdr, *CMRecommendList)
CMSendChatMsg(*f5.MsgHdr, *CMSendChatMsg)
CMReadMsgAndOpenChatNotify(*f5.MsgHdr, *CMReadMsgAndOpenChatNotify)
CMSetCurrPrivateChatTarget(*f5.MsgHdr, *CMSetCurrPrivateChatTarget)
@ -120,6 +121,9 @@ func (this *MsgHandlerImpl) CMRemoveBlacklist(hdr *f5.MsgHdr, msg *CMRemoveBlack
func (this *MsgHandlerImpl) CMInviteFriendMsg(hdr *f5.MsgHdr, msg *CMInviteFriendMsg) {
}
func (this *MsgHandlerImpl) CMRecommendList(hdr *f5.MsgHdr, msg *CMRecommendList) {
}
func (this *MsgHandlerImpl) CMSendChatMsg(hdr *f5.MsgHdr, msg *CMSendChatMsg) {
}
@ -313,6 +317,14 @@ func (this *SMInviteFriendMsg) GetNetMsgId() uint16 {
return uint16(SMMessageIdE__SMInviteFriendMsg)
}
func (this *CMRecommendList) GetNetMsgId() uint16 {
return uint16(CMMessageIdE__CMRecommendList)
}
func (this *SMRecommendList) GetNetMsgId() uint16 {
return uint16(SMMessageIdE__SMRecommendList)
}
func (this *CMSendChatMsg) GetNetMsgId() uint16 {
return uint16(CMMessageIdE__CMSendChatMsg)
}
@ -605,6 +617,12 @@ func (this *SMInviteFriendMsg) Err(errCode int32, errMsg string) *SMInviteFriend
return this
}
func (this *SMRecommendList) Err(errCode int32, errMsg string) *SMRecommendList {
this.Errcode = proto.Int32(errCode)
this.Errmsg = proto.String(errMsg)
return this
}
func (this *SMGuildInfo) Err(errCode int32, errMsg string) *SMGuildInfo {
this.Errcode = proto.Int32(errCode)
this.Errmsg = proto.String(errMsg)
@ -901,6 +919,18 @@ func init() {
},
}
handlers[int(CMMessageIdE__CMRecommendList)] = &CsNetMsgHandler{
MsgId: int(CMMessageIdE__CMRecommendList),
ParseCb: func (data []byte) interface{} {
msg := &CMRecommendList{}
proto.Unmarshal(data, msg)
return msg
},
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
handler.CMRecommendList(hdr, hdr.Msg.(*CMRecommendList))
},
}
handlers[int(CMMessageIdE__CMSendChatMsg)] = &CsNetMsgHandler{
MsgId: int(CMMessageIdE__CMSendChatMsg),
ParseCb: func (data []byte) interface{} {

View File

@ -24,6 +24,7 @@ enum CMMessageId_e
_CMRemoveBlacklist = 114;
_CMBlacklist = 116;
_CMInviteFriendMsg = 117;
_CMRecommendList = 118;
//
_CMSetCurrPrivateChatTarget = 200;
@ -73,6 +74,7 @@ enum SMMessageId_e
_SMRemoveBlacklist = 114;
_SMBlacklist = 116;
_SMInviteFriendMsg = 117;
_SMRecommendList = 118;
//
_SMGuildInfo = 120;

View File

@ -163,6 +163,7 @@ message MFUser {
optional int32 last_login_time = 9;
optional int32 is_friendship = 10; // default:0, friend:1
optional int32 is_pending_request = 11; // default:0, pending:1
optional int32 battling = 12;
}
//end mfmsg
@ -358,6 +359,19 @@ message SMInviteFriendMsg
optional string msg = 3;
}
//
message CMRecommendList
{
optional int32 type = 1; //0: 1: 2
}
message SMRecommendList
{
optional int32 errcode = 1;
optional string errmsg = 2;
repeated MFUser users = 3;
}
// --- ---
//
message CMSendChatMsg