1
This commit is contained in:
parent
227c298dd7
commit
2977d97800
@ -50,6 +50,7 @@ type MsgHandler interface {
|
|||||||
CMAddBlacklist(*f5.MsgHdr, *CMAddBlacklist)
|
CMAddBlacklist(*f5.MsgHdr, *CMAddBlacklist)
|
||||||
CMRemoveBlacklist(*f5.MsgHdr, *CMRemoveBlacklist)
|
CMRemoveBlacklist(*f5.MsgHdr, *CMRemoveBlacklist)
|
||||||
CMInviteFriendMsg(*f5.MsgHdr, *CMInviteFriendMsg)
|
CMInviteFriendMsg(*f5.MsgHdr, *CMInviteFriendMsg)
|
||||||
|
CMRecommendList(*f5.MsgHdr, *CMRecommendList)
|
||||||
CMSendChatMsg(*f5.MsgHdr, *CMSendChatMsg)
|
CMSendChatMsg(*f5.MsgHdr, *CMSendChatMsg)
|
||||||
CMReadMsgAndOpenChatNotify(*f5.MsgHdr, *CMReadMsgAndOpenChatNotify)
|
CMReadMsgAndOpenChatNotify(*f5.MsgHdr, *CMReadMsgAndOpenChatNotify)
|
||||||
CMSetCurrPrivateChatTarget(*f5.MsgHdr, *CMSetCurrPrivateChatTarget)
|
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) CMInviteFriendMsg(hdr *f5.MsgHdr, msg *CMInviteFriendMsg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *MsgHandlerImpl) CMRecommendList(hdr *f5.MsgHdr, msg *CMRecommendList) {
|
||||||
|
}
|
||||||
|
|
||||||
func (this *MsgHandlerImpl) CMSendChatMsg(hdr *f5.MsgHdr, msg *CMSendChatMsg) {
|
func (this *MsgHandlerImpl) CMSendChatMsg(hdr *f5.MsgHdr, msg *CMSendChatMsg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,6 +317,14 @@ func (this *SMInviteFriendMsg) GetNetMsgId() uint16 {
|
|||||||
return uint16(SMMessageIdE__SMInviteFriendMsg)
|
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 {
|
func (this *CMSendChatMsg) GetNetMsgId() uint16 {
|
||||||
return uint16(CMMessageIdE__CMSendChatMsg)
|
return uint16(CMMessageIdE__CMSendChatMsg)
|
||||||
}
|
}
|
||||||
@ -605,6 +617,12 @@ func (this *SMInviteFriendMsg) Err(errCode int32, errMsg string) *SMInviteFriend
|
|||||||
return this
|
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 {
|
func (this *SMGuildInfo) Err(errCode int32, errMsg string) *SMGuildInfo {
|
||||||
this.Errcode = proto.Int32(errCode)
|
this.Errcode = proto.Int32(errCode)
|
||||||
this.Errmsg = proto.String(errMsg)
|
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{
|
handlers[int(CMMessageIdE__CMSendChatMsg)] = &CsNetMsgHandler{
|
||||||
MsgId: int(CMMessageIdE__CMSendChatMsg),
|
MsgId: int(CMMessageIdE__CMSendChatMsg),
|
||||||
ParseCb: func (data []byte) interface{} {
|
ParseCb: func (data []byte) interface{} {
|
||||||
|
@ -24,6 +24,7 @@ enum CMMessageId_e
|
|||||||
_CMRemoveBlacklist = 114;
|
_CMRemoveBlacklist = 114;
|
||||||
_CMBlacklist = 116;
|
_CMBlacklist = 116;
|
||||||
_CMInviteFriendMsg = 117;
|
_CMInviteFriendMsg = 117;
|
||||||
|
_CMRecommendList = 118;
|
||||||
|
|
||||||
// 聊天相关
|
// 聊天相关
|
||||||
_CMSetCurrPrivateChatTarget = 200;
|
_CMSetCurrPrivateChatTarget = 200;
|
||||||
@ -73,6 +74,7 @@ enum SMMessageId_e
|
|||||||
_SMRemoveBlacklist = 114;
|
_SMRemoveBlacklist = 114;
|
||||||
_SMBlacklist = 116;
|
_SMBlacklist = 116;
|
||||||
_SMInviteFriendMsg = 117;
|
_SMInviteFriendMsg = 117;
|
||||||
|
_SMRecommendList = 118;
|
||||||
|
|
||||||
// 公会相关
|
// 公会相关
|
||||||
_SMGuildInfo = 120;
|
_SMGuildInfo = 120;
|
||||||
|
@ -163,6 +163,7 @@ message MFUser {
|
|||||||
optional int32 last_login_time = 9;
|
optional int32 last_login_time = 9;
|
||||||
optional int32 is_friendship = 10; // 是否成为好友关系 default:0, friend:1
|
optional int32 is_friendship = 10; // 是否成为好友关系 default:0, friend:1
|
||||||
optional int32 is_pending_request = 11; // 是否发送添加好友请求 default:0, pending:1
|
optional int32 is_pending_request = 11; // 是否发送添加好友请求 default:0, pending:1
|
||||||
|
optional int32 battling = 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
//end mfmsg
|
//end mfmsg
|
||||||
@ -358,6 +359,19 @@ message SMInviteFriendMsg
|
|||||||
optional string msg = 3;
|
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
|
message CMSendChatMsg
|
||||||
|
Loading…
x
Reference in New Issue
Block a user