|
@@ -1,6 +1,8 @@
|
|
|
using System.Collections.Generic;
|
|
|
using GFGGame;
|
|
|
using ET;
|
|
|
+using UnityEditor.VersionControl;
|
|
|
+
|
|
|
namespace ET
|
|
|
{
|
|
|
//推送好友每日重置
|
|
@@ -37,17 +39,10 @@ namespace ET
|
|
|
{
|
|
|
protected override async ETTask Run(Session session, S2C_NoticeApplyForFriend message)
|
|
|
{
|
|
|
- List<FriendInfoData> applyDatas = FriendDataManager.Instance.ApplyDatas;
|
|
|
- bool isSame = false;
|
|
|
- for (int i = applyDatas.Count - 1; i >= 0; i--)
|
|
|
+ if(FriendDataManager.Instance.CheckInApplyList(message.FriendInfo.RoleInfo.RoleId))
|
|
|
{
|
|
|
- if (applyDatas[i].roleInfo.roleId == message.FriendInfo.RoleInfo.RoleId)
|
|
|
- {
|
|
|
- isSame = true;
|
|
|
- break;
|
|
|
- }
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isSame) return;
|
|
|
|
|
|
OtherRoleInfoData roleInfo = new OtherRoleInfoData();
|
|
|
roleInfo.roleId = message.FriendInfo.RoleInfo.RoleId;
|
|
@@ -161,7 +156,10 @@ namespace GFGGame
|
|
|
}
|
|
|
else if (response.FriendList[i].Type == FriendType.Apply)
|
|
|
{
|
|
|
- FriendDataManager.Instance.AddApplyData(friendInfo);
|
|
|
+ if (!FriendDataManager.Instance.CheckInApplyList(friendInfo.roleInfo.roleId))
|
|
|
+ {
|
|
|
+ FriendDataManager.Instance.AddApplyData(friendInfo);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
EventAgent.DispatchEvent(ConstMessage.FRIEND_ADD);
|