41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace game
|
|
{
|
|
public class FriendAddItemData
|
|
{
|
|
public int Type = 0;
|
|
public BFriendInfo FriendInfo = null;
|
|
public int Extra = 0;
|
|
|
|
public bool EqualsPlayFabId(FriendAddItemData data)
|
|
{
|
|
if (this.FriendInfo == data.FriendInfo) return true;
|
|
if (this.FriendInfo != null && data.FriendInfo != null && this.FriendInfo.PlayFabId == data.FriendInfo.PlayFabId)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public bool Equals(FriendAddItemData data)
|
|
{
|
|
if (this.Type != data.Type || this.Extra != data.Extra) return false;
|
|
if (this.FriendInfo == data.FriendInfo) return true;
|
|
if (this.FriendInfo != null && data.FriendInfo != null)
|
|
{
|
|
if (this.FriendInfo.Level == data.FriendInfo.Level && this.FriendInfo.AvatarUrl == data.FriendInfo.AvatarUrl
|
|
&& this.FriendInfo.DisplayName == data.FriendInfo.DisplayName && this.FriendInfo.PlayFabId == data.FriendInfo.PlayFabId)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
}
|
|
}
|