1
This commit is contained in:
parent
d03402c6a6
commit
012a135b93
@ -388,9 +388,13 @@ void Player::_CMFriendAddBlack(f8::MsgHdr& hdr, const cs::CMFriendAddBlack& msg)
|
||||
ShowErrorMsg("添加失败,黑名单已满");
|
||||
return;
|
||||
}
|
||||
if (GetBlackListById(msg.user_info().base_data().account_id())) {
|
||||
cs::SMFriendAddBlack respmsg;
|
||||
SendMsg(respmsg);
|
||||
return;
|
||||
}
|
||||
Friend* p = GetFriendById(msg.user_info().base_data().account_id());
|
||||
if (p) {
|
||||
if (!GetBlackListById(msg.user_info().base_data().account_id())) {
|
||||
{
|
||||
cs::SMAddBlackListNotify notifymsg;
|
||||
auto user_info = notifymsg.add_user_infos();
|
||||
@ -401,7 +405,6 @@ void Player::_CMFriendAddBlack(f8::MsgHdr& hdr, const cs::CMFriendAddBlack& msg)
|
||||
black_hash_[p->base_data.account_id] = p;
|
||||
InternalRemoveFriend(p->base_data.account_id, true, false);
|
||||
MarkDirty();
|
||||
}
|
||||
ShowErrorMsg("成功添加到黑名单");
|
||||
} else {
|
||||
if (msg.user_info().base_data().account_id().empty()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user