1
This commit is contained in:
parent
f6761d3ef5
commit
8387f9b140
@ -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);
|
||||||
|
@ -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;
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user