This commit is contained in:
aozhiwei 2020-12-08 14:46:26 +08:00
parent 280b2b2899
commit b5e45b36a2
4 changed files with 60 additions and 5 deletions

View File

@ -536,6 +536,7 @@ void Player::_CMFriendIdList(f8::MsgHdr& hdr, const cs::CMFriendIdList& msg)
void Player::_CMSendChatMsg(f8::MsgHdr& hdr, const cs::CMSendChatMsg& msg) void Player::_CMSendChatMsg(f8::MsgHdr& hdr, const cs::CMSendChatMsg& msg)
{ {
#if 0
ss::SS_IM_SendChatMsg ss_msg; ss::SS_IM_SendChatMsg ss_msg;
FillIMMsgConext(ss_msg.mutable_context()); FillIMMsgConext(ss_msg.mutable_context());
ss_msg.set_chat_channel(msg.chat_channel()); ss_msg.set_chat_channel(msg.chat_channel());
@ -544,6 +545,7 @@ void Player::_CMSendChatMsg(f8::MsgHdr& hdr, const cs::CMSendChatMsg& msg)
if (friend_data) { if (friend_data) {
SendSSMsg(*friend_data, ss_msg); SendSSMsg(*friend_data, ss_msg);
} }
#endif
} }
void Player::_CMSendCustomMsg(f8::MsgHdr& hdr, const cs::CMSendCustomMsg& msg) void Player::_CMSendCustomMsg(f8::MsgHdr& hdr, const cs::CMSendCustomMsg& msg)

View File

@ -37,6 +37,7 @@ void PlayerMgr::_SS_MS_PushUserList(f8::MsgHdr& hdr, const ss::SS_MS_PushUserLis
void PlayerMgr::_SS_IM_SendChatMsg(f8::MsgHdr& hdr, const ss::SS_IM_SendChatMsg& msg) void PlayerMgr::_SS_IM_SendChatMsg(f8::MsgHdr& hdr, const ss::SS_IM_SendChatMsg& msg)
{ {
#if 0
Player* hum = GetPlayerByAccountId(msg.target()); Player* hum = GetPlayerByAccountId(msg.target());
if (hum) { if (hum) {
cs::SMChatMsgNotify notifymsg; cs::SMChatMsgNotify notifymsg;
@ -45,6 +46,7 @@ void PlayerMgr::_SS_IM_SendChatMsg(f8::MsgHdr& hdr, const ss::SS_IM_SendChatMsg&
notifymsg.set_msg(msg.msg()); notifymsg.set_msg(msg.msg());
hum->SendMsg(notifymsg); hum->SendMsg(notifymsg);
} }
#endif
} }
void PlayerMgr::_SS_IM_SendCustomMsg(f8::MsgHdr& hdr, const ss::SS_IM_SendCustomMsg& msg) void PlayerMgr::_SS_IM_SendCustomMsg(f8::MsgHdr& hdr, const ss::SS_IM_SendCustomMsg& msg)

View File

@ -27,6 +27,8 @@ enum CMMessageId_e
_CMUpdateUserInfo = 154; _CMUpdateUserInfo = 154;
_CMDirtyWordCheck = 155; _CMDirtyWordCheck = 155;
_CMGetUserGuild = 156; _CMGetUserGuild = 156;
_CMReadMsgAndOpenChatNotify = 157;
_CMCloseChatNotify = 158;
_CMGuildMsgBegin = 230; _CMGuildMsgBegin = 230;
_CMGuildCreate = 231; _CMGuildCreate = 231;
@ -120,4 +122,6 @@ enum SMMessageId_e
_SMShowErrorMsg = 508; _SMShowErrorMsg = 508;
_SMAddBlackListNotify = 509; _SMAddBlackListNotify = 509;
_SMDeleteBlackListNotify = 510; _SMDeleteBlackListNotify = 510;
_SMUpdateChatRedPointNotify = 511;
_SMUpdateChatChannelLastId = 512;
} }

View File

@ -21,6 +21,13 @@ message MFStringTuple
repeated string values = 1; //values repeated string values = 1; //values
} }
//int32 pair
message MFPairInt32
{
optional int32 key = 1; //key
optional int32 val = 2; //val
}
//int64 pair //int64 pair
message MFPairInt64 message MFPairInt64
{ {
@ -78,6 +85,7 @@ message MFUserInfo
{ {
optional MFBaseUserData base_data = 1; // optional MFBaseUserData base_data = 1; //
optional MFUserTempCustomData temp_custom_data = 2; // optional MFUserTempCustomData temp_custom_data = 2; //
optional int32 is_sys_user = 3; //
} }
// //
@ -134,6 +142,22 @@ message MFGuildBasic
optional int64 _guild_status = 106; //guild_status optional int64 _guild_status = 106; //guild_status
} }
//
message MFChatMsg
{
/*
id,chat_channel + msg_uuid作为主键
!!!msg_uuid可能重复
*/
optional int64 msg_uuid = 1;
optional MFUserInfo sender = 2; //
optional MFUserInfo receiver = 3; //
optional int32 chat_channel = 4; //
optional string msg_type = 5; // 0(json) 1 (json) 2:()
optional string msg_body = 6; //(json类型里的字段!)
}
// //
message CMLoginCommonHead message CMLoginCommonHead
{ {
@ -646,9 +670,22 @@ message SMGuildGainExp
// //
message CMSendChatMsg message CMSendChatMsg
{ {
optional int32 chat_channel = 1; // optional int32 chat_channel = 1; // 0: 1 2
optional string target = 2; // optional string target = 2; //
optional string msg = 3; // optional int32 msg_type = 3; // 0
optional string msg_body = 4; //
}
//
message CMReadMsgAndOpenChatNotify
{
optional int32 curr_channel = 1; //
repeated MFPairInt64 last_ids = 2; // key valid
}
//
message CMCloseChatNotify
{
} }
// //
@ -712,9 +749,7 @@ message SMUserStatusNotify
// //
message SMChatMsgNotify message SMChatMsgNotify
{ {
optional string sender = 1; // repeated MFChatMsg msg_list = 1; //chat_channel和msg_uuid更新本地的last_ids
optional int32 chat_channel = 2; //
optional string msg = 3; //
} }
// //
@ -770,6 +805,18 @@ message SMUpdateRedPointNotify
optional int32 red_point_flags = 1; // 1<<0: 1<<1: optional int32 red_point_flags = 1; // 1<<0: 1<<1:
} }
//
message SMUpdateChatRedPointNotify
{
repeated MFPairInt32 unread_msg_cnt = 1; // key val
}
//id
message SMUpdateChatChannelLastId
{
repeated MFPairInt64 last_ids = 1; // key valid
}
// //
message SMShowErrorMsg message SMShowErrorMsg
{ {