1
This commit is contained in:
parent
387fa32e65
commit
526a057eb9
@ -31,7 +31,7 @@ void ChatMgr::FillSMUpdateChatRedPointNotify(Player* hum, cs::SMUpdateChatRedPoi
|
|||||||
}
|
}
|
||||||
ChatedUserRec* chated_user = GetChatedUser(hum->AccountId());
|
ChatedUserRec* chated_user = GetChatedUser(hum->AccountId());
|
||||||
if (chated_user && chated_user->has_unread_msg) {
|
if (chated_user && chated_user->has_unread_msg) {
|
||||||
msg.add_has_unread_msg_channels(kCCFriend);
|
msg.add_has_unread_msg_channels(kCCPrivate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +117,9 @@ void ChatMgr::SyncWorldChatMsg(Player* hum)
|
|||||||
hum->world_channel_last_id = chat_msg->msg_uuid();
|
hum->world_channel_last_id = chat_msg->msg_uuid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hum->SendMsg(notifymsg);
|
if (!notifymsg.msg_list().size() > 0) {
|
||||||
|
hum->SendMsg(notifymsg);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
hum->MarkNewMsg();
|
hum->MarkNewMsg();
|
||||||
}
|
}
|
||||||
@ -137,7 +139,15 @@ void ChatMgr::SyncGuildChatMsg(Player* hum)
|
|||||||
auto itr = guild_msgrec_.find(hum->GuildId());
|
auto itr = guild_msgrec_.find(hum->GuildId());
|
||||||
if (itr != guild_msgrec_.end()) {
|
if (itr != guild_msgrec_.end()) {
|
||||||
if (hum->chat_channel == kCCGuild) {
|
if (hum->chat_channel == kCCGuild) {
|
||||||
if (itr->second.curr_id > hum->guild_channel_last_id) {
|
cs::SMChatMsgNotify notifymsg;
|
||||||
|
for (cs::MFChatMsg* chat_msg : world_msgrec_.msg_list) {
|
||||||
|
if (chat_msg->msg_uuid() > hum->guild_channel_last_id) {
|
||||||
|
*notifymsg.add_msg_list() = *chat_msg;
|
||||||
|
hum->guild_channel_last_id = chat_msg->msg_uuid();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!notifymsg.msg_list().size() > 0) {
|
||||||
|
hum->SendMsg(notifymsg);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
hum->MarkNewMsg();
|
hum->MarkNewMsg();
|
||||||
|
@ -78,7 +78,7 @@ enum GuildMemberUpdateReason
|
|||||||
enum ChatChannel_e
|
enum ChatChannel_e
|
||||||
{
|
{
|
||||||
kCCWorld = 1,
|
kCCWorld = 1,
|
||||||
kCCFriend = 2,
|
kCCPrivate = 2,
|
||||||
kCCGuild = 3
|
kCCGuild = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -570,7 +570,7 @@ void Player::_CMSendChatMsg(f8::MsgHdr& hdr, const cs::CMSendChatMsg& msg)
|
|||||||
case kCCWorld:
|
case kCCWorld:
|
||||||
ChatMgr::Instance()->ProcWorldChat(this, msg);
|
ChatMgr::Instance()->ProcWorldChat(this, msg);
|
||||||
break;
|
break;
|
||||||
case kCCFriend:
|
case kCCPrivate:
|
||||||
ChatMgr::Instance()->ProcPrivateChat(this, msg);
|
ChatMgr::Instance()->ProcPrivateChat(this, msg);
|
||||||
break;
|
break;
|
||||||
case kCCGuild:
|
case kCCGuild:
|
||||||
@ -595,7 +595,7 @@ void Player::_CMReadMsgAndOpenChatNotify(f8::MsgHdr& hdr, const cs::CMReadMsgAnd
|
|||||||
{
|
{
|
||||||
if (IsValidChatChannel(msg.curr_channel())) {
|
if (IsValidChatChannel(msg.curr_channel())) {
|
||||||
chat_channel = msg.curr_channel();
|
chat_channel = msg.curr_channel();
|
||||||
if (chat_channel == kCCFriend) {
|
if (chat_channel == kCCPrivate) {
|
||||||
SyncPrivateChatRedPoint();
|
SyncPrivateChatRedPoint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user