Core/Misc: Replace database query in WorldSession::HandleAddFriendOpcode with async version

Port From (https://github.com/TrinityCore/TrinityCore/commit/54a6e603ffc8b4913669cf0f189a966d25b620d8)
This commit is contained in:
hondacrx
2022-03-02 09:35:51 -05:00
parent c26134cc27
commit 6e6ee2d694
4 changed files with 94 additions and 47 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ namespace Game.Entities
public const int FriendLimit = 50;
public const int IgnoreLimit = 50;
public void GetFriendInfo(Player player, ObjectGuid friendGUID, FriendInfo friendInfo)
public static void GetFriendInfo(Player player, ObjectGuid friendGUID, FriendInfo friendInfo)
{
if (!player)
return;
@@ -283,7 +283,7 @@ namespace Game.Entities
if (++ignoredCount > SocialManager.IgnoreLimit)
continue;
Global.SocialMgr.GetFriendInfo(player, v.Key, v.Value);
SocialManager.GetFriendInfo(player, v.Key, v.Value);
contactList.Contacts.Add(new ContactInfo(v.Key, v.Value));
}