794 lines
28 KiB
Go
794 lines
28 KiB
Go
package cs
|
|
|
|
import (
|
|
"f5"
|
|
proto "github.com/golang/protobuf/proto"
|
|
)
|
|
|
|
type CsNetMsgHandler f5.NetMsgHandler[MsgHandler];
|
|
|
|
type MsgHandlerImpl struct {
|
|
}
|
|
|
|
var handlers [2000]*CsNetMsgHandler
|
|
|
|
func GetNetMsgHandler(msgId uint16) *CsNetMsgHandler {
|
|
handler := handlers[msgId]
|
|
return handler
|
|
}
|
|
|
|
func DispatchMsg(handler *CsNetMsgHandler, hdr *f5.MsgHdr, msgHandler MsgHandler) {
|
|
handler.Cb(hdr, msgHandler)
|
|
}
|
|
|
|
func RegHandlerId(msgId int, handlerId int) {
|
|
handler := handlers[msgId]
|
|
handler.HandlerId = handlerId
|
|
}
|
|
|
|
func ParsePb(msgId uint16, data []byte) interface{} {
|
|
handler := handlers[msgId]
|
|
if handler == nil {
|
|
return nil
|
|
}
|
|
return handler.ParseCb(data)
|
|
}
|
|
|
|
type MsgHandler interface {
|
|
CMPing(*f5.MsgHdr, *CMPing)
|
|
CMLogin(*f5.MsgHdr, *CMLogin)
|
|
CMReconnect(*f5.MsgHdr, *CMReconnect)
|
|
CMFriendInfo(*f5.MsgHdr, *CMFriendInfo)
|
|
CMSearchUser(*f5.MsgHdr, *CMSearchUser)
|
|
CMSearchUserByAccountId(*f5.MsgHdr, *CMSearchUserByAccountId)
|
|
CMAddFriendRequest(*f5.MsgHdr, *CMAddFriendRequest)
|
|
CMAcceptFriendRequest(*f5.MsgHdr, *CMAcceptFriendRequest)
|
|
CMRejectFriendRequest(*f5.MsgHdr, *CMRejectFriendRequest)
|
|
CMListPendingFriendRequest(*f5.MsgHdr, *CMListPendingFriendRequest)
|
|
CMListFriend(*f5.MsgHdr, *CMListFriend)
|
|
CMDeleteFriendShip(*f5.MsgHdr, *CMDeleteFriendShip)
|
|
CMAddBlacklist(*f5.MsgHdr, *CMAddBlacklist)
|
|
CMRemoveBlacklist(*f5.MsgHdr, *CMRemoveBlacklist)
|
|
CMSendChatMsg(*f5.MsgHdr, *CMSendChatMsg)
|
|
CMReadMsgAndOpenChatNotify(*f5.MsgHdr, *CMReadMsgAndOpenChatNotify)
|
|
CMSetCurrPrivateChatTarget(*f5.MsgHdr, *CMSetCurrPrivateChatTarget)
|
|
CMCloseChatNotify(*f5.MsgHdr, *CMCloseChatNotify)
|
|
CMGuildInfo(*f5.MsgHdr, *CMGuildInfo)
|
|
CMCreateGuild(*f5.MsgHdr, *CMCreateGuild)
|
|
CMApplyToGuild(*f5.MsgHdr, *CMApplyToGuild)
|
|
CMApplyList(*f5.MsgHdr, *CMApplyList)
|
|
CMApprove(*f5.MsgHdr, *CMApprove)
|
|
CMReject(*f5.MsgHdr, *CMReject)
|
|
CMLeaveGuild(*f5.MsgHdr, *CMLeaveGuild)
|
|
CMDismissMember(*f5.MsgHdr, *CMDismissMember)
|
|
CMPromoteMember(*f5.MsgHdr, *CMPromoteMember)
|
|
CMDemoteMember(*f5.MsgHdr, *CMDemoteMember)
|
|
CMDisband(*f5.MsgHdr, *CMDisband)
|
|
CMSearchGuilds(*f5.MsgHdr, *CMSearchGuilds)
|
|
CMGuildLogs(*f5.MsgHdr, *CMGuildLogs)
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMPing(hdr *f5.MsgHdr, msg *CMPing) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMLogin(hdr *f5.MsgHdr, msg *CMLogin) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMReconnect(hdr *f5.MsgHdr, msg *CMReconnect) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMFriendInfo(hdr *f5.MsgHdr, msg *CMFriendInfo) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMSearchUser(hdr *f5.MsgHdr, msg *CMSearchUser) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMSearchUserByAccountId(hdr *f5.MsgHdr, msg *CMSearchUserByAccountId) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMAddFriendRequest(hdr *f5.MsgHdr, msg *CMAddFriendRequest) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMAcceptFriendRequest(hdr *f5.MsgHdr, msg *CMAcceptFriendRequest) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMRejectFriendRequest(hdr *f5.MsgHdr, msg *CMRejectFriendRequest) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMListPendingFriendRequest(hdr *f5.MsgHdr, msg *CMListPendingFriendRequest) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMListFriend(hdr *f5.MsgHdr, msg *CMListFriend) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMDeleteFriendShip(hdr *f5.MsgHdr, msg *CMDeleteFriendShip) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMAddBlacklist(hdr *f5.MsgHdr, msg *CMAddBlacklist) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMRemoveBlacklist(hdr *f5.MsgHdr, msg *CMRemoveBlacklist) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMSendChatMsg(hdr *f5.MsgHdr, msg *CMSendChatMsg) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMReadMsgAndOpenChatNotify(hdr *f5.MsgHdr, msg *CMReadMsgAndOpenChatNotify) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMSetCurrPrivateChatTarget(hdr *f5.MsgHdr, msg *CMSetCurrPrivateChatTarget) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMCloseChatNotify(hdr *f5.MsgHdr, msg *CMCloseChatNotify) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMGuildInfo(hdr *f5.MsgHdr, msg *CMGuildInfo) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMCreateGuild(hdr *f5.MsgHdr, msg *CMCreateGuild) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMApplyToGuild(hdr *f5.MsgHdr, msg *CMApplyToGuild) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMApplyList(hdr *f5.MsgHdr, msg *CMApplyList) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMApprove(hdr *f5.MsgHdr, msg *CMApprove) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMReject(hdr *f5.MsgHdr, msg *CMReject) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMLeaveGuild(hdr *f5.MsgHdr, msg *CMLeaveGuild) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMDismissMember(hdr *f5.MsgHdr, msg *CMDismissMember) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMPromoteMember(hdr *f5.MsgHdr, msg *CMPromoteMember) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMDemoteMember(hdr *f5.MsgHdr, msg *CMDemoteMember) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMDisband(hdr *f5.MsgHdr, msg *CMDisband) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMSearchGuilds(hdr *f5.MsgHdr, msg *CMSearchGuilds) {
|
|
}
|
|
|
|
func (this *MsgHandlerImpl) CMGuildLogs(hdr *f5.MsgHdr, msg *CMGuildLogs) {
|
|
}
|
|
|
|
func (this *CMPing) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMPing)
|
|
}
|
|
|
|
func (this *SMPing) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMPing)
|
|
}
|
|
|
|
func (this *SMRpcError) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMRpcError)
|
|
}
|
|
|
|
func (this *CMLogin) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMLogin)
|
|
}
|
|
|
|
func (this *SMLogin) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMLogin)
|
|
}
|
|
|
|
func (this *CMReconnect) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMReconnect)
|
|
}
|
|
|
|
func (this *SMReconnect) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMReconnect)
|
|
}
|
|
|
|
func (this *CMFriendInfo) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMFriendInfo)
|
|
}
|
|
|
|
func (this *SMFriendInfo) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMFriendInfo)
|
|
}
|
|
|
|
func (this *CMSearchUser) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMSearchUser)
|
|
}
|
|
|
|
func (this *SMSearchUser) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMSearchUser)
|
|
}
|
|
|
|
func (this *CMSearchUserByAccountId) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMSearchUserByAccountId)
|
|
}
|
|
|
|
func (this *SMSearchUserByAccountId) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMSearchUserByAccountId)
|
|
}
|
|
|
|
func (this *CMAddFriendRequest) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMAddFriendRequest)
|
|
}
|
|
|
|
func (this *SMAddFriendRequest) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMAddFriendRequest)
|
|
}
|
|
|
|
func (this *CMAcceptFriendRequest) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMAcceptFriendRequest)
|
|
}
|
|
|
|
func (this *SMAcceptFriendRequest) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMAcceptFriendRequest)
|
|
}
|
|
|
|
func (this *CMRejectFriendRequest) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMRejectFriendRequest)
|
|
}
|
|
|
|
func (this *SMRejectFriendRequest) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMRejectFriendRequest)
|
|
}
|
|
|
|
func (this *CMListPendingFriendRequest) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMListPendingFriendRequest)
|
|
}
|
|
|
|
func (this *SMListPendingFriendRequest) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMListPendingFriendRequest)
|
|
}
|
|
|
|
func (this *CMListFriend) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMListFriend)
|
|
}
|
|
|
|
func (this *SMListFriend) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMListFriend)
|
|
}
|
|
|
|
func (this *CMDeleteFriendShip) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMDeleteFriendShip)
|
|
}
|
|
|
|
func (this *SMDeleteFriendShip) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMDeleteFriendShip)
|
|
}
|
|
|
|
func (this *CMAddBlacklist) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMAddBlacklist)
|
|
}
|
|
|
|
func (this *SMAddBlacklist) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMAddBlacklist)
|
|
}
|
|
|
|
func (this *CMRemoveBlacklist) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMRemoveBlacklist)
|
|
}
|
|
|
|
func (this *SMRemoveBlacklist) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMRemoveBlacklist)
|
|
}
|
|
|
|
func (this *CMSendChatMsg) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMSendChatMsg)
|
|
}
|
|
|
|
func (this *CMReadMsgAndOpenChatNotify) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMReadMsgAndOpenChatNotify)
|
|
}
|
|
|
|
func (this *CMSetCurrPrivateChatTarget) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMSetCurrPrivateChatTarget)
|
|
}
|
|
|
|
func (this *CMCloseChatNotify) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMCloseChatNotify)
|
|
}
|
|
|
|
func (this *SMUpdateChatRedPointNotify) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMUpdateChatRedPointNotify)
|
|
}
|
|
|
|
func (this *SMChatMsgNotify) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMChatMsgNotify)
|
|
}
|
|
|
|
func (this *SMUpdateRedPointNotify) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMUpdateRedPointNotify)
|
|
}
|
|
|
|
func (this *SMUpdatePrivateChatRedPointNotify) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMUpdatePrivateChatRedPointNotify)
|
|
}
|
|
|
|
func (this *SMUpdateChatChannelLastId) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMUpdateChatChannelLastId)
|
|
}
|
|
|
|
func (this *CMGuildInfo) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMGuildInfo)
|
|
}
|
|
|
|
func (this *SMGuildInfo) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMGuildInfo)
|
|
}
|
|
|
|
func (this *CMCreateGuild) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMCreateGuild)
|
|
}
|
|
|
|
func (this *SMCreateGuild) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMCreateGuild)
|
|
}
|
|
|
|
func (this *CMApplyToGuild) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMApplyToGuild)
|
|
}
|
|
|
|
func (this *SMApplyToGuild) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMApplyToGuild)
|
|
}
|
|
|
|
func (this *CMApplyList) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMApplyList)
|
|
}
|
|
|
|
func (this *SMApplyList) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMApplyList)
|
|
}
|
|
|
|
func (this *CMApprove) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMApprove)
|
|
}
|
|
|
|
func (this *SMApprove) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMApprove)
|
|
}
|
|
|
|
func (this *CMReject) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMReject)
|
|
}
|
|
|
|
func (this *SMReject) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMReject)
|
|
}
|
|
|
|
func (this *CMLeaveGuild) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMLeaveGuild)
|
|
}
|
|
|
|
func (this *SMLeaveGuild) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMLeaveGuild)
|
|
}
|
|
|
|
func (this *CMDismissMember) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMDismissMember)
|
|
}
|
|
|
|
func (this *SMDismissMember) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMDismissMember)
|
|
}
|
|
|
|
func (this *CMPromoteMember) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMPromoteMember)
|
|
}
|
|
|
|
func (this *SMPromoteMember) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMPromoteMember)
|
|
}
|
|
|
|
func (this *CMDemoteMember) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMDemoteMember)
|
|
}
|
|
|
|
func (this *SMDemoteMember) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMDemoteMember)
|
|
}
|
|
|
|
func (this *CMDisband) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMDisband)
|
|
}
|
|
|
|
func (this *SMDisband) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMDisband)
|
|
}
|
|
|
|
func (this *CMSearchGuilds) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMSearchGuilds)
|
|
}
|
|
|
|
func (this *SMSearchGuilds) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMSearchGuilds)
|
|
}
|
|
|
|
func (this *CMGuildLogs) GetNetMsgId() uint16 {
|
|
return uint16(CMMessageIdE__CMGuildLogs)
|
|
}
|
|
|
|
func (this *SMGuildLogs) GetNetMsgId() uint16 {
|
|
return uint16(SMMessageIdE__SMGuildLogs)
|
|
}
|
|
|
|
func init() {
|
|
|
|
handlers[int(CMMessageIdE__CMPing)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMPing),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMPing{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMPing(hdr, hdr.Msg.(*CMPing))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMLogin)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMLogin),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMLogin{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMLogin(hdr, hdr.Msg.(*CMLogin))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMReconnect)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMReconnect),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMReconnect{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMReconnect(hdr, hdr.Msg.(*CMReconnect))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMFriendInfo)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMFriendInfo),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMFriendInfo{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMFriendInfo(hdr, hdr.Msg.(*CMFriendInfo))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMSearchUser)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMSearchUser),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMSearchUser{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMSearchUser(hdr, hdr.Msg.(*CMSearchUser))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMSearchUserByAccountId)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMSearchUserByAccountId),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMSearchUserByAccountId{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMSearchUserByAccountId(hdr, hdr.Msg.(*CMSearchUserByAccountId))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMAddFriendRequest)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMAddFriendRequest),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMAddFriendRequest{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMAddFriendRequest(hdr, hdr.Msg.(*CMAddFriendRequest))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMAcceptFriendRequest)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMAcceptFriendRequest),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMAcceptFriendRequest{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMAcceptFriendRequest(hdr, hdr.Msg.(*CMAcceptFriendRequest))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMRejectFriendRequest)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMRejectFriendRequest),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMRejectFriendRequest{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMRejectFriendRequest(hdr, hdr.Msg.(*CMRejectFriendRequest))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMListPendingFriendRequest)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMListPendingFriendRequest),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMListPendingFriendRequest{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMListPendingFriendRequest(hdr, hdr.Msg.(*CMListPendingFriendRequest))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMListFriend)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMListFriend),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMListFriend{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMListFriend(hdr, hdr.Msg.(*CMListFriend))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMDeleteFriendShip)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMDeleteFriendShip),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMDeleteFriendShip{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMDeleteFriendShip(hdr, hdr.Msg.(*CMDeleteFriendShip))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMAddBlacklist)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMAddBlacklist),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMAddBlacklist{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMAddBlacklist(hdr, hdr.Msg.(*CMAddBlacklist))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMRemoveBlacklist)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMRemoveBlacklist),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMRemoveBlacklist{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMRemoveBlacklist(hdr, hdr.Msg.(*CMRemoveBlacklist))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMSendChatMsg)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMSendChatMsg),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMSendChatMsg{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMSendChatMsg(hdr, hdr.Msg.(*CMSendChatMsg))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMReadMsgAndOpenChatNotify)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMReadMsgAndOpenChatNotify),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMReadMsgAndOpenChatNotify{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMReadMsgAndOpenChatNotify(hdr, hdr.Msg.(*CMReadMsgAndOpenChatNotify))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMSetCurrPrivateChatTarget)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMSetCurrPrivateChatTarget),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMSetCurrPrivateChatTarget{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMSetCurrPrivateChatTarget(hdr, hdr.Msg.(*CMSetCurrPrivateChatTarget))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMCloseChatNotify)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMCloseChatNotify),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMCloseChatNotify{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMCloseChatNotify(hdr, hdr.Msg.(*CMCloseChatNotify))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMGuildInfo)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMGuildInfo),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMGuildInfo{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMGuildInfo(hdr, hdr.Msg.(*CMGuildInfo))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMCreateGuild)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMCreateGuild),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMCreateGuild{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMCreateGuild(hdr, hdr.Msg.(*CMCreateGuild))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMApplyToGuild)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMApplyToGuild),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMApplyToGuild{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMApplyToGuild(hdr, hdr.Msg.(*CMApplyToGuild))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMApplyList)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMApplyList),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMApplyList{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMApplyList(hdr, hdr.Msg.(*CMApplyList))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMApprove)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMApprove),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMApprove{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMApprove(hdr, hdr.Msg.(*CMApprove))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMReject)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMReject),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMReject{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMReject(hdr, hdr.Msg.(*CMReject))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMLeaveGuild)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMLeaveGuild),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMLeaveGuild{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMLeaveGuild(hdr, hdr.Msg.(*CMLeaveGuild))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMDismissMember)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMDismissMember),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMDismissMember{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMDismissMember(hdr, hdr.Msg.(*CMDismissMember))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMPromoteMember)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMPromoteMember),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMPromoteMember{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMPromoteMember(hdr, hdr.Msg.(*CMPromoteMember))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMDemoteMember)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMDemoteMember),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMDemoteMember{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMDemoteMember(hdr, hdr.Msg.(*CMDemoteMember))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMDisband)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMDisband),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMDisband{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMDisband(hdr, hdr.Msg.(*CMDisband))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMSearchGuilds)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMSearchGuilds),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMSearchGuilds{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMSearchGuilds(hdr, hdr.Msg.(*CMSearchGuilds))
|
|
},
|
|
}
|
|
|
|
handlers[int(CMMessageIdE__CMGuildLogs)] = &CsNetMsgHandler{
|
|
MsgId: int(CMMessageIdE__CMGuildLogs),
|
|
ParseCb: func (data []byte) interface{} {
|
|
msg := &CMGuildLogs{}
|
|
proto.Unmarshal(data, msg)
|
|
return msg
|
|
},
|
|
Cb: func (hdr *f5.MsgHdr, handler MsgHandler) {
|
|
handler.CMGuildLogs(hdr, hdr.Msg.(*CMGuildLogs))
|
|
},
|
|
}
|
|
|
|
} |