using System.Collections.Generic; using Cute; using LitJson; using UnityEngine; using Wizard.RoomMatch; namespace Wizard; public class GatheringUserInfo : UserInfoBase { public bool IsOwner { get; set; } public GatheringUserInfo(int viewerId, string name, long emblemId, string country, int rank, int degreeId, bool isFriend) : base(viewerId, name, emblemId, country, rank, degreeId, isFriend) { } public GatheringUserInfo(Player player) : base(player) { } public GatheringUserInfo(JsonData json) : base(json) { } public GatheringUserInfo(UserFriend friend) : base(friend) { } public override Texture GetUserEmblemTexture() { string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(base.EmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_S, isfetch: true); return Toolbox.ResourcesManager.LoadObject(assetTypePath); } public override Texture GetUserRankTexture() { string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(base.Rank.ToString("00"), ResourcesManager.AssetLoadPathType.RankIcon_S, isfetch: true); return Toolbox.ResourcesManager.LoadObject(assetTypePath); } public override void InitializeDegreeTexture(UITexture texture) { DegreeHelper.InitializeDegree(texture, base.DegreeId, DegreeHelper.DegreeType.SMALL); } public override Texture GetUserCountryTexture() { if (string.IsNullOrEmpty(base.CountryCode)) { return null; } string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(base.CountryCode, ResourcesManager.AssetLoadPathType.Country_S, isfetch: true); return Toolbox.ResourcesManager.LoadObject(assetTypePath); } public override List GetUserAssetPathList() { List list = new List(); string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(base.EmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_S); list.Add(assetTypePath); assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(base.Rank.ToString("00"), ResourcesManager.AssetLoadPathType.RankIcon_S); list.Add(assetTypePath); list.AddRange(DegreeHelper.GetDegreeResourceList(base.DegreeId, DegreeHelper.DegreeType.SMALL, isFetch: false)); if (!string.IsNullOrEmpty(base.CountryCode)) { assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(base.CountryCode, ResourcesManager.AssetLoadPathType.Country_S); list.Add(assetTypePath); } return list; } }