1
This commit is contained in:
parent
1807268f9e
commit
0aee4bad67
@ -550,7 +550,8 @@ void Player::_SS_IM_FriendDeleteRequest(f8::MsgHdr& hdr, const ss::SS_IM_FriendD
|
|||||||
|
|
||||||
void Player::_SS_IM_FriendApply(f8::MsgHdr& hdr, const ss::SS_IM_FriendApply& msg)
|
void Player::_SS_IM_FriendApply(f8::MsgHdr& hdr, const ss::SS_IM_FriendApply& msg)
|
||||||
{
|
{
|
||||||
|
a8::SetBitFlag(red_point_flags_, RPF_Apply);
|
||||||
|
SyncRedPoint();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::ReLogin(f8::MsgHdr& hdr, const cs::CMLogin& msg)
|
void Player::ReLogin(f8::MsgHdr& hdr, const cs::CMLogin& msg)
|
||||||
@ -1034,6 +1035,18 @@ bool Player::CanAddFriend(const std::string& account_id)
|
|||||||
if (GetFriendById(account_id)) {
|
if (GetFriendById(account_id)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
int target_channel = f8::ExtractGameIdFromAccountId(account_id);
|
||||||
|
int target_gameid = f8::ExtractChannelIdFromAccountId(account_id);
|
||||||
|
int self_channel = f8::ExtractGameIdFromAccountId(AccountId());
|
||||||
|
int self_gameid = f8::ExtractChannelIdFromAccountId(AccountId());
|
||||||
|
if (target_gameid != self_gameid) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (self_channel != 6000 && target_channel != 6000) {
|
||||||
|
if (self_channel != target_channel) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user