Browse Source

好友添加自己报错

zhaoyang 2 years ago
parent
commit
3c84e425e3
1 changed files with 1 additions and 0 deletions
  1. 1 0
      GameClient/Assets/Game/HotUpdate/Data/FriendDataManager.cs

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Data/FriendDataManager.cs

@@ -39,6 +39,7 @@ namespace GFGGame
         }
         public void AddFriend(FriendInfoData roleInfo)
         {
+            if (_friendDic.ContainsKey(roleInfo.roleInfo.roleId)) return;
             _friendDic.Add(roleInfo.roleInfo.roleId, roleInfo);
             UpdateFriendList(true);
         }