1
This commit is contained in:
parent
a97a8a73b8
commit
b2acd43657
@ -282,6 +282,7 @@ void Player::_CMFriendAgree(f8::MsgHdr& hdr, const cs::CMFriendAgree& msg)
|
||||
);
|
||||
friendobj->hum = this;
|
||||
friend_hash_[friendobj->base_data.account_id] = friendobj;
|
||||
NotifyUserInfoUpdate(friendobj);
|
||||
PlayerMgr::Instance()->WatchPlayer(friendobj);
|
||||
SendMsg(respmsg);
|
||||
MarkDirty();
|
||||
@ -373,6 +374,11 @@ void Player::_CMFriendDelete(f8::MsgHdr& hdr, const cs::CMFriendDelete& msg)
|
||||
}
|
||||
respmsg.set_friend_id(msg.friend_id());
|
||||
SendMsg(respmsg);
|
||||
{
|
||||
cs::SMDeleteFriendNotify notifymsg;
|
||||
notifymsg.add_user_list(msg.friend_id());
|
||||
SendMsg(notifymsg);
|
||||
}
|
||||
}
|
||||
|
||||
void Player::_CMFriendBlackList(f8::MsgHdr& hdr, const cs::CMFriendBlackList& msg)
|
||||
@ -739,6 +745,7 @@ void Player::AddFriend(Friend* p)
|
||||
);
|
||||
friendobj->hum = this;
|
||||
friend_hash_[friendobj->base_data.account_id] = friendobj;
|
||||
NotifyUserInfoUpdate(friendobj);
|
||||
PlayerMgr::Instance()->WatchPlayer(friendobj);
|
||||
}
|
||||
}
|
||||
@ -747,6 +754,11 @@ void Player::RemoveFriend(const std::string& account_id)
|
||||
{
|
||||
Friend* friendobj = GetFriendById(account_id);
|
||||
if (friendobj) {
|
||||
{
|
||||
cs::SMDeleteFriendNotify notifymsg;
|
||||
notifymsg.add_user_list(account_id);
|
||||
SendMsg(notifymsg);
|
||||
}
|
||||
PlayerMgr::Instance()->UnWatchPlayer(friendobj);
|
||||
friend_hash_.erase(account_id);
|
||||
delete friendobj;
|
||||
|
Loading…
x
Reference in New Issue
Block a user