Beispiel #1
0
        protected void parseDisneyShopRewards()
        {
            Dictionary <int, DisneyStoreFranchiseDefinition> dictionary = Service.Get <GameData>().Get <Dictionary <int, DisneyStoreFranchiseDefinition> >();

            Dictionary <int, DisneyStoreFranchiseDefinition> .Enumerator enumerator = dictionary.GetEnumerator();
            bool isMember = isLocalPlayerMember();

            while (enumerator.MoveNext())
            {
                DisneyStoreFranchiseDefinition value = enumerator.Current.Value;
                for (int i = 0; i < value.Items.Count; i++)
                {
                    DisneyStoreItemData disneyStoreItemData = new DisneyStoreItemData(value.Items[i]);
                    if (disneyStoreItemData.Definition != null)
                    {
                        if (DisneyStoreUtils.IsItemOwned(disneyStoreItemData))
                        {
                            parseRewardDefinition(getRewards(value.Items[i].Reward), isMember, new SpriteContentKey("Images/ProgressionIcons/Quests_ProgressionLock_Membership"), value.Items[i].ThemeDefinition);
                        }
                    }
                    else
                    {
                        Log.LogError(this, $"Franchise contains null item: {value.name}");
                    }
                }
            }
        }
Beispiel #2
0
 public void ShowItemStatus()
 {
     if (!DisneyStoreUtils.IsItemMultiPurchase(itemData) && DisneyStoreUtils.IsItemOwned(itemData))
     {
         PriceTagSpriteSelector.gameObject.SetActive(value: false);
         if (OwnedPanel != null)
         {
             OwnedPanel.SetActive(value: true);
         }
         return;
     }
     if (OwnedPanel != null)
     {
         OwnedPanel.SetActive(value: false);
     }
     showPriceTag(itemData);
     showMemberStatus();
 }
        public void ShowConfirmation(DisneyStoreItemData item, Sprite icon, DisneyStoreFranchiseItem shopItem)
        {
            PrefabContentKey prefabKey = OwnedConfirmationPrefabKey;
            bool             flag      = DisneyStoreUtils.IsItemMultiPurchase(item);

            if (DisneyStoreUtils.IsIglooReward(item))
            {
                prefabKey = IglooConfirmationPrefabKey;
            }
            else if (flag)
            {
                prefabKey = ConsumableConfirmationPrefabKey;
            }
            else if (!DisneyStoreUtils.IsItemOwned(item))
            {
                prefabKey = PurchaseConfirmationPrefabKey;
            }
            CoroutineRunner.Start(loadConfirmation(prefabKey, item, icon, shopItem), this, "");
        }