This commit is contained in:
aozhiwei 2020-10-13 11:16:54 +08:00
parent f6761d3ef5
commit 8387f9b140
5 changed files with 31 additions and 0 deletions

View File

@ -97,6 +97,7 @@ void HandlerMgr::RegisterNetMsgHandlers()
RegisterNetMsgHandler(&wsmsghandler, &Player::_CMFriendDeleteBlack); RegisterNetMsgHandler(&wsmsghandler, &Player::_CMFriendDeleteBlack);
RegisterNetMsgHandler(&wsmsghandler, &Player::_CMQueryUserStatus); RegisterNetMsgHandler(&wsmsghandler, &Player::_CMQueryUserStatus);
RegisterNetMsgHandler(&wsmsghandler, &Player::_CMRecommandFriend); RegisterNetMsgHandler(&wsmsghandler, &Player::_CMRecommandFriend);
RegisterNetMsgHandler(&wsmsghandler, &Player::_CMFriendIdList);
RegisterNetMsgHandler(&wsmsghandler, &Player::_CMSendChatMsg); RegisterNetMsgHandler(&wsmsghandler, &Player::_CMSendChatMsg);
RegisterNetMsgHandler(&wsmsghandler, &Player::_CMSendCustomMsg); RegisterNetMsgHandler(&wsmsghandler, &Player::_CMSendCustomMsg);

View File

@ -506,6 +506,18 @@ void Player::_CMRecommandFriend(f8::MsgHdr& hdr, const cs::CMRecommandFriend& ms
AsyncTaskMgr::Instance()->CreateRecommandFriendTask(this); AsyncTaskMgr::Instance()->CreateRecommandFriendTask(this);
} }
void Player::_CMFriendIdList(f8::MsgHdr& hdr, const cs::CMFriendIdList& msg)
{
cs::SMFriendIdList respmsg;
for (auto& pair : friend_hash_) {
respmsg.add_friends(pair.first);
}
for (auto& pair : black_hash_) {
respmsg.add_blacklist(pair.first);
}
SendMsg(respmsg);
}
void Player::_CMSendChatMsg(f8::MsgHdr& hdr, const cs::CMSendChatMsg& msg) void Player::_CMSendChatMsg(f8::MsgHdr& hdr, const cs::CMSendChatMsg& msg)
{ {
ss::SS_IM_SendChatMsg ss_msg; ss::SS_IM_SendChatMsg ss_msg;

View File

@ -91,6 +91,7 @@ class Player
void _CMFriendDeleteBlack(f8::MsgHdr& hdr, const cs::CMFriendDeleteBlack& msg); void _CMFriendDeleteBlack(f8::MsgHdr& hdr, const cs::CMFriendDeleteBlack& msg);
void _CMQueryUserStatus(f8::MsgHdr& hdr, const cs::CMQueryUserStatus& msg); void _CMQueryUserStatus(f8::MsgHdr& hdr, const cs::CMQueryUserStatus& msg);
void _CMRecommandFriend(f8::MsgHdr& hdr, const cs::CMRecommandFriend& msg); void _CMRecommandFriend(f8::MsgHdr& hdr, const cs::CMRecommandFriend& msg);
void _CMFriendIdList(f8::MsgHdr& hdr, const cs::CMFriendIdList& msg);
void _CMSendChatMsg(f8::MsgHdr& hdr, const cs::CMSendChatMsg& msg); void _CMSendChatMsg(f8::MsgHdr& hdr, const cs::CMSendChatMsg& msg);
void _CMSendCustomMsg(f8::MsgHdr& hdr, const cs::CMSendCustomMsg& msg); void _CMSendCustomMsg(f8::MsgHdr& hdr, const cs::CMSendCustomMsg& msg);

View File

@ -19,6 +19,7 @@ enum CMMessageId_e
_CMFriendList = 115; _CMFriendList = 115;
_CMQueryUserStatus = 116; _CMQueryUserStatus = 116;
_CMRecommandFriend = 117; _CMRecommandFriend = 117;
_CMFriendIdList = 118;
_CMSendChatMsg = 151; _CMSendChatMsg = 151;
_CMSendCustomMsg = 152; _CMSendCustomMsg = 152;
@ -73,6 +74,7 @@ enum SMMessageId_e
_SMFriendList = 115; _SMFriendList = 115;
_SMQueryUserStatus = 116; _SMQueryUserStatus = 116;
_SMRecommandFriend = 117; _SMRecommandFriend = 117;
_SMFriendIdList = 118;
_SMGuildMsgBegin = 230; _SMGuildMsgBegin = 230;
_SMGuildCreate = 231; _SMGuildCreate = 231;

View File

@ -276,6 +276,19 @@ message SMFriendDeleteBlack
optional string errmsg = 2; // optional string errmsg = 2; //
} }
///id列表
message CMFriendIdList
{
}
///id列表回复
message SMFriendIdList
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
repeated string friends = 3; //
repeated string blacklist = 4; //
}
// //
message CMTeamCreate message CMTeamCreate
{ {
@ -401,6 +414,7 @@ message SMGuildJoin
message CMGuildAgree message CMGuildAgree
{ {
optional MFGuildApply apply = 1; // optional MFGuildApply apply = 1; //
optional int32 batchid = 2; //id相同建议用时间戳
} }
message SMGuildAgree message SMGuildAgree
{ {
@ -412,6 +426,7 @@ message SMGuildAgree
message CMGuildRefuse message CMGuildRefuse
{ {
optional MFGuildApply apply = 1; // optional MFGuildApply apply = 1; //
optional int32 batchid = 2; //id相同建议用时间戳
} }
message SMGuildRefuse message SMGuildRefuse
{ {