private IEnumerator loadAd()
        {
            if (!(definition.AdItem == null) && definition.AdItem.PropType == PropDefinition.PropTypes.Consumable && !(definition.AdMarket == null))
            {
                currentAdItem = new MarketplaceItemData(unlockLevel: progressionService.GetUnlockLevelFromDefinition(definition.AdItem, ProgressionUnlockCategory.partySupplies), propDefn: definition.AdItem);
                AssetRequest <Sprite> backgroundSprite = Content.LoadAsync(bgAssetContentKey, definition.AdMarket.NameInAssets);
                yield return(backgroundSprite);

                currentAdBackground = backgroundSprite.Asset;
                marketplaceAd.SetData(currentAdItem, definition, itemSprites[currentAdItem.PropDefn.GetIconContentKey().Key.ToLower()], currentAdBackground);
            }
        }
        private void PopulateChallengeData(CurrentThemeData currentTheme)
        {
            bool flag = ((currentTheme.userSubmissionClothingCatalogId != 0) ? true : false);

            GoButton.SetActive(!flag);
            SubmittedButton.SetActive(flag);
            Button component = GoButton.transform.parent.GetComponent <Button>();

            if (component != null)
            {
                component.enabled = !flag;
            }
            CatalogThemeDefinition themeByScheduelId = Service.Get <CatalogServiceProxy>().GetThemeByScheduelId(currentTheme.scheduledThemeChallengeId);
            bool flag2 = Service.Get <CPDataEntityCollection>().IsLocalPlayerMember();

            if (themeByScheduelId == null)
            {
                ChallengeMemberLock.transform.parent.gameObject.SetActive(value: false);
                return;
            }
            if (flag2)
            {
                ProgressionService progressionService = Service.Get <ProgressionService>();
                int level = progressionService.Level;
                int num   = 0;
                Dictionary <int, TemplateDefinition> dictionary = Service.Get <GameData>().Get <Dictionary <int, TemplateDefinition> >();
                TagDefinition[]           templateTags          = themeByScheduelId.TemplateTags;
                List <TemplateDefinition> list = new List <TemplateDefinition>();
                foreach (TagDefinition value in templateTags)
                {
                    for (int j = 0; j < dictionary.Values.Count; j++)
                    {
                        TemplateDefinition templateDefinition = dictionary.Values.ToList()[j];
                        if (templateDefinition.Tags.Contains(value) && list.IndexOf(templateDefinition) < 0)
                        {
                            list.Add(templateDefinition);
                        }
                    }
                }
                for (int i = 0; i < list.Count; i++)
                {
                    int unlockLevelFromDefinition = progressionService.GetUnlockLevelFromDefinition(list[i], ProgressionUnlockCategory.equipmentTemplates);
                    if (unlockLevelFromDefinition < num)
                    {
                        num = unlockLevelFromDefinition;
                    }
                }
                ChallengeProgressionLock.SetActive(value: false);
                if (num > level)
                {
                    ChallengeProgressionLock.SetActive(value: true);
                    if (ChallengeProgressionLockText != null)
                    {
                        ChallengeProgressionLockText.text = Service.Get <Localizer>().GetTokenTranslation(num.ToString());
                    }
                }
            }
            else
            {
                ChallengeMemberLock.SetActive(value: false);
                if (ChallengeMemberLock != null)
                {
                    ChallengeMemberLock.SetActive(value: true);
                }
            }
            setBillboardTheme(themeByScheduelId);
            DateTime dateTime = Service.Get <ContentSchedulerService>().PresentTime();
            int      hours    = 24 - dateTime.Hour - 1;
            int      minutes  = 60 - dateTime.Minute - 1;
            int      seconds  = 60 - dateTime.Second - 1;
            TimeSpan timeSpan = new TimeSpan(hours, minutes, seconds);

            endTime        = DateTime.Now + timeSpan;
            isTimerRunning = true;
        }