using asap.core; using cfg; using GameCore; using UnityEngine; public class PvpStoreItemSkin : PvpStoreItem { [SerializeField] protected GameObject owned; protected override void Init() { PlayerFishData playerFishData = GContext.container.Resolve(); Item item = GContext.container.Resolve().GetItemData(pvpStore.ItemId); bool alreadyOwned = false; if (item != null && item.Type == 3) { switch (item.SubType) { case 3: alreadyOwned = playerFishData.IsSkinUnlocked(item.RedirectID); break; case 11: alreadyOwned = playerFishData.IsGloveUnlocked(item.RedirectID); break; } } owned.SetActive(alreadyOwned); btn_buy.gameObject.SetActive(!alreadyOwned); } protected override void BuyEnd() { owned.SetActive(true); btn_buy.gameObject.SetActive(false); } }