备份CatanBuilding瘦身独立工程
This commit is contained in:
166
Assets/Scripts/Services/FriendModel.cs
Normal file
166
Assets/Scripts/Services/FriendModel.cs
Normal file
@@ -0,0 +1,166 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace game
|
||||
{
|
||||
public class BFriendInfo
|
||||
{
|
||||
public string PlayFabId { get; set; }
|
||||
public string DisplayName { get; set; }
|
||||
public string AvatarUrl { get; set; }
|
||||
public int Level { get; set; }
|
||||
}
|
||||
|
||||
public class AddFriendReq
|
||||
{
|
||||
public BFriendInfo MySelf { get; set; }
|
||||
public int MyFriendCount { get; set; }
|
||||
public string FriendPlayFabId { get; set; }
|
||||
}
|
||||
|
||||
public class AddFriendResp
|
||||
{
|
||||
public int Code { get; set; } // 1:添加好友成功;-1:我的好友已满;-2:对方好友已满;-3:获取对方好友列表失败;-4:我加对方好友失败;-5:对方加我好友失败;2:已经添加过对方好友;
|
||||
public string Msg { get; set; }
|
||||
}
|
||||
|
||||
public class AcceptFriendReq
|
||||
{
|
||||
public int Status { get; set; } // 1:同意邀请;2:忽略
|
||||
public string PlayFabId { get; set; }
|
||||
public string FriendPlayFabId { get; set; }
|
||||
}
|
||||
|
||||
public class AcceptFriendResp
|
||||
{
|
||||
public int Code { get; set; } // 1:成功;2:忽略;-4:我加对方好友失败;-5:对方加我好友失败;
|
||||
public string Msg { get; set; }
|
||||
}
|
||||
|
||||
public class SearchFriendReq
|
||||
{
|
||||
public string PlayFabId { get; set; }
|
||||
}
|
||||
|
||||
public class SearchFriendResp
|
||||
{
|
||||
public int Code { get; set; }
|
||||
public string Msg { get; set; }
|
||||
public BFriendInfo? Info { get; set; }
|
||||
}
|
||||
|
||||
public class GetHomePageReq
|
||||
{
|
||||
public string PlayFabId { get; set; }
|
||||
public int PageNo { get; set; }
|
||||
}
|
||||
|
||||
public class GetHomePageResp
|
||||
{
|
||||
public int Code { get; set; }
|
||||
public string Msg { get; set; }
|
||||
public string[]? Friends { get; set; }
|
||||
public BFriendInfo[]? RecommendedList { get; set; }
|
||||
}
|
||||
|
||||
public class GetRecommendedFriendsReq
|
||||
{
|
||||
public string PlayFabId { get; set; }
|
||||
public int PageNo { get; set; }
|
||||
}
|
||||
|
||||
public class GetRecommendedFriendsResp
|
||||
{
|
||||
public int Code { get; set; }
|
||||
public string Msg { get; set; }
|
||||
public BFriendInfo[]? RecommendedList { get; set; }
|
||||
}
|
||||
|
||||
public class GetInvitedListResp
|
||||
{
|
||||
public int Code { get; set; }
|
||||
public string Msg { get; set; }
|
||||
public string[] Friends { get; set; }
|
||||
}
|
||||
|
||||
public class GetInvitedListCountResp
|
||||
{
|
||||
public int DeepLinkInvitedCount { get; set; }
|
||||
public int FriendInvitedCount { get; set; }
|
||||
}
|
||||
|
||||
public class NotifyFriendInvitedCount
|
||||
{
|
||||
public DateTime TimeStamp { get; set; }
|
||||
}
|
||||
|
||||
public class SocialFriendListChangedData
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class FriendRecommendedListData
|
||||
{
|
||||
public DateTime ExpirationDate { get; set; }
|
||||
public List<FriendAddItemData> RecommendedList { get; set; }
|
||||
}
|
||||
|
||||
public class IsFriendWaitingForAcceptReq
|
||||
{
|
||||
public string PlayFabId { get; set; }
|
||||
public string FriendPlayFabId { get; set; }
|
||||
}
|
||||
|
||||
public class IsFriendWaitingForAcceptResp
|
||||
{
|
||||
public int Code { get; set; }
|
||||
public string Msg { get; set; }
|
||||
}
|
||||
|
||||
public enum FriendAddPanelBackendOperationFromType
|
||||
{
|
||||
FromTypeInvalid,
|
||||
FromTypeInvited,
|
||||
FromTypeRecommended
|
||||
}
|
||||
|
||||
public class FriendHelper
|
||||
{
|
||||
public const int Friend_Add_Item_Type_Invited_TitleBar = 1;
|
||||
public const int Friend_Add_Item_Type_Invited_Item = 2;
|
||||
public const int Friend_Add_Item_Type_Recommended_TitleBar = 3;
|
||||
public const int Friend_Add_Item_Type_Recommended_Item = 4;
|
||||
|
||||
public const int Code_OK = 1; // 消息成功
|
||||
public const int Code_Encounter_Fatal_Error = -1000; // 遇到致命问题,一般是遇到异常
|
||||
|
||||
public const int Code_SearchFriend_PlayFab_Error = -1; // 搜索好友遇到PlayFab问题,失败
|
||||
|
||||
public const int Code_AcceptFriend_IAddFriend_Failed_PlayFabError = -4; // 同意好友邀请,我加对方失败,PlayFab问题
|
||||
public const int Code_AcceptFriend_FriendAddMe_Failed_PlayFabError = -5; // 同意好友邀请,对方加我失败,PlayFab问题
|
||||
public const int Code_AcceptFriend_Ignore_OK = 2; // 忽略好友邀请成功
|
||||
|
||||
public const int Code_AddFriend_AddFriendDirectly_OK = 1; // 邀请好友,对方也要邀请过自己,直接互相加为好友
|
||||
public const int Code_AddFriend_HaveAddedBefore_OK = 2; // 邀请好友,已经邀请过对方为好友
|
||||
public const int Code_AddFriend_IHaveNoLimit = -1; // 邀请好友,我的好友列表已满,我没有额度
|
||||
public const int Code_AddFriend_FriendHaveNoLimit = -2; // 邀请好友,对方的好友列表已满,好友没有额度
|
||||
public const int Code_AddFriend_GetFriendList_Failed_PlayFabError = -3; // 邀请好友,获取好友列表失败,PlayFab问题
|
||||
public const int Code_AddFriend_IAddFriend_Failed_PlayFabError = -4; // 邀请好友,我加对方失败,PlayFab问题
|
||||
public const int Code_AddFriend_FriendAddMe_Failed_PlayFabError = -5; // 邀请好友,对方加我失败,PlayFab问题
|
||||
|
||||
public const int Code_IsFriendWaitingForAccept_Wrong = -1; // 当前用户不处于被邀请状态
|
||||
|
||||
public const int Accept_Type_Accept = 1; // 接受好友邀请
|
||||
public const int Accept_Type_Ignore = 2; // 忽略好友邀请
|
||||
|
||||
public const string FriendRecommendedListDataKey = "FRLDK"; // 推荐好友列表存储本地用的Key
|
||||
|
||||
public static void FixBFriendInfoData(BFriendInfo info)
|
||||
{
|
||||
if (info == null) return;
|
||||
if (info.AvatarUrl == null) info.AvatarUrl = "";
|
||||
if (info.DisplayName == null) info.DisplayName = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user