// by Troyy_#2028 astro is trying to claim it as his btw so just dm me for proof!
using System.Collections.Generic;
using PlayFab;
using PlayFab.ClientModels;
using UnityEngine;
public class PlayFabCosmetics : login
{
public List<GameObject> Cosmetics;
public override void PlayFabPlayerLoggedIn()
{
PlayFabClientAPI.GetUserInventory(new GetUserInventoryRequest(), delegate (GetUserInventoryResult result)
{
foreach (ItemInstance item in result.Inventory)
{
Debug.Log(item.CatalogVersion);
if (item.CatalogVersion == "rare")
{
for (int i = 0; i < Cosmetics.Count; i++)
{
if (Cosmetics[i].name == item.ItemId)
{
Cosmetics[i].SetActive(true);
}
}
}
}
}, delegate (PlayFabError error)
{
if (error.Error == PlayFabErrorCode.AccountBanned)
{
Application.Quit();
}
});
}
}