1
This commit is contained in:
parent
280b2b2899
commit
b5e45b36a2
@ -536,6 +536,7 @@ void Player::_CMFriendIdList(f8::MsgHdr& hdr, const cs::CMFriendIdList& msg)
|
||||
|
||||
void Player::_CMSendChatMsg(f8::MsgHdr& hdr, const cs::CMSendChatMsg& msg)
|
||||
{
|
||||
#if 0
|
||||
ss::SS_IM_SendChatMsg ss_msg;
|
||||
FillIMMsgConext(ss_msg.mutable_context());
|
||||
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) {
|
||||
SendSSMsg(*friend_data, ss_msg);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Player::_CMSendCustomMsg(f8::MsgHdr& hdr, const cs::CMSendCustomMsg& msg)
|
||||
|
@ -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)
|
||||
{
|
||||
#if 0
|
||||
Player* hum = GetPlayerByAccountId(msg.target());
|
||||
if (hum) {
|
||||
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());
|
||||
hum->SendMsg(notifymsg);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void PlayerMgr::_SS_IM_SendCustomMsg(f8::MsgHdr& hdr, const ss::SS_IM_SendCustomMsg& msg)
|
||||
|
@ -27,6 +27,8 @@ enum CMMessageId_e
|
||||
_CMUpdateUserInfo = 154;
|
||||
_CMDirtyWordCheck = 155;
|
||||
_CMGetUserGuild = 156;
|
||||
_CMReadMsgAndOpenChatNotify = 157;
|
||||
_CMCloseChatNotify = 158;
|
||||
|
||||
_CMGuildMsgBegin = 230;
|
||||
_CMGuildCreate = 231;
|
||||
@ -120,4 +122,6 @@ enum SMMessageId_e
|
||||
_SMShowErrorMsg = 508;
|
||||
_SMAddBlackListNotify = 509;
|
||||
_SMDeleteBlackListNotify = 510;
|
||||
_SMUpdateChatRedPointNotify = 511;
|
||||
_SMUpdateChatChannelLastId = 512;
|
||||
}
|
||||
|
@ -21,6 +21,13 @@ message MFStringTuple
|
||||
repeated string values = 1; //values
|
||||
}
|
||||
|
||||
//int32 pair
|
||||
message MFPairInt32
|
||||
{
|
||||
optional int32 key = 1; //key
|
||||
optional int32 val = 2; //val
|
||||
}
|
||||
|
||||
//int64 pair
|
||||
message MFPairInt64
|
||||
{
|
||||
@ -78,6 +85,7 @@ message MFUserInfo
|
||||
{
|
||||
optional MFBaseUserData base_data = 1; //基础数据
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
//聊天消息
|
||||
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
|
||||
{
|
||||
@ -646,9 +670,22 @@ message SMGuildGainExp
|
||||
//发送聊天消息
|
||||
message CMSendChatMsg
|
||||
{
|
||||
optional int32 chat_channel = 1; //聊天频道
|
||||
optional int32 chat_channel = 1; //聊天频道 0: 世界 1:好友 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:聊天频道 val:该频道最后一次收到的消息id
|
||||
}
|
||||
|
||||
//关闭聊天通知
|
||||
message CMCloseChatNotify
|
||||
{
|
||||
}
|
||||
|
||||
//发送自定义消息
|
||||
@ -712,9 +749,7 @@ message SMUserStatusNotify
|
||||
//聊天消息通知
|
||||
message SMChatMsgNotify
|
||||
{
|
||||
optional string sender = 1; //发送者
|
||||
optional int32 chat_channel = 2; //聊天频道
|
||||
optional string msg = 3; //消息内容
|
||||
repeated MFChatMsg msg_list = 1; //消息列表,客户端需要根据chat_channel和msg_uuid更新本地的last_ids
|
||||
}
|
||||
|
||||
//发送自定义消息
|
||||
@ -770,6 +805,18 @@ message SMUpdateRedPointNotify
|
||||
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:聊天频道 val:该频道最后一次收到的消息id
|
||||
}
|
||||
|
||||
//显示飘字
|
||||
message SMShowErrorMsg
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user