1
This commit is contained in:
parent
88bceb2c78
commit
6d58cfc046
@ -540,27 +540,29 @@ void Player::_SS_IM_FriendDeleteRequest(f8::MsgHdr& hdr, const ss::SS_IM_FriendD
|
||||
});
|
||||
#endif
|
||||
RemoveFriend(msg.context().user_info().base_data().account_id(), false);
|
||||
a8::Timer::Instance()->AddDeadLineTimerAndAttach
|
||||
(
|
||||
1000 * 2,
|
||||
a8::XParams()
|
||||
.SetSender(this),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Player* hum = (Player*)param.sender.GetUserData();
|
||||
cs::SMFriendAgree respmsg;
|
||||
respmsg.set_errcode(4);
|
||||
respmsg.set_errmsg("添加失败,对方的好友数已达到上限");
|
||||
hum->SendMsg(respmsg);
|
||||
if (msg.flag() == 1) {
|
||||
a8::Timer::Instance()->AddDeadLineTimerAndAttach
|
||||
(
|
||||
1000 * 2,
|
||||
a8::XParams()
|
||||
.SetSender(this),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Player* hum = (Player*)param.sender.GetUserData();
|
||||
cs::SMFriendAgree respmsg;
|
||||
respmsg.set_errcode(4);
|
||||
respmsg.set_errmsg("添加失败,对方的好友数已达到上限");
|
||||
hum->SendMsg(respmsg);
|
||||
#ifdef DEBUG
|
||||
a8::UdpLog::Instance()->Debug("添加失败,对方的好友数已达到上限 %s",
|
||||
{
|
||||
hum->AccountId()
|
||||
});
|
||||
a8::UdpLog::Instance()->Debug("添加失败,对方的好友数已达到上限 %s",
|
||||
{
|
||||
hum->AccountId()
|
||||
});
|
||||
#endif
|
||||
},
|
||||
&timer_attacher.timer_list_
|
||||
);
|
||||
},
|
||||
&timer_attacher.timer_list_
|
||||
);
|
||||
}
|
||||
}
|
||||
f8::MsgHdr* hdr_copy = hdr.Clone();
|
||||
ss::SS_IM_FriendDeleteRequest* msg_copy = new ss::SS_IM_FriendDeleteRequest;
|
||||
|
Loading…
x
Reference in New Issue
Block a user