mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core/Social): cleanup + fix crash in friend system (#3832)
fix crash when a friend or ignore get GUID 0 and also double friend list
This commit is contained in:
@@ -4940,7 +4940,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
|
||||
{
|
||||
if (Player* pFriend = ObjectAccessor::FindPlayerInOrOutOfWorld(MAKE_NEW_GUID((*resultFriends)[0].GetUInt32(), 0, HIGHGUID_PLAYER)))
|
||||
{
|
||||
pFriend->GetSocial()->RemoveFromSocialList(guid, false);
|
||||
pFriend->GetSocial()->RemoveFromSocialList(guid, SOCIAL_FLAG_ALL);
|
||||
sSocialMgr->SendFriendStatus(pFriend, FRIEND_REMOVED, guid, false);
|
||||
}
|
||||
} while (resultFriends->NextRow());
|
||||
@@ -23268,7 +23268,7 @@ void Player::SetGroup(Group* group, int8 subgroup)
|
||||
void Player::SendInitialPacketsBeforeAddToMap()
|
||||
{
|
||||
/// Pass 'this' as argument because we're not stored in ObjectAccessor yet
|
||||
GetSocial()->SendSocialList(this);
|
||||
GetSocial()->SendSocialList(this, SOCIAL_FLAG_ALL);
|
||||
|
||||
// guild bank list wtf?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user