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