This commit is contained in:
aozhiwei 2020-06-17 17:28:31 +08:00
parent c76350a5ba
commit c1bb421149

View File

@ -123,6 +123,14 @@ void Player::_CMFriendApply(f8::MsgHdr& hdr, const cs::CMFriendApply& msg)
if (GetFriendById(msg.friend_id())) { if (GetFriendById(msg.friend_id())) {
respmsg.set_errcode(1); respmsg.set_errcode(1);
respmsg.set_errmsg("已经是好友"); respmsg.set_errmsg("已经是好友");
SendMsg(respmsg);
return;
}
if (msg.friend_id() == AccountId()) {
respmsg.set_errcode(21);
respmsg.set_errmsg("不能邀请自己");
SendMsg(respmsg);
return;
} }
SendMsg(respmsg); SendMsg(respmsg);
{ {