Example #1
0
        protected override void onRefresh()
        {
            double num;
            double num2;
            double num3;
            Player player = GameLogic.Binder.GameState.Player;

            this.TokensFromBosses.text      = _.L(ConfigLoca.ASCEND_FROM_BOSSES, new < > __AnonType9 <int>(player.ActiveCharacter.HeroStats.BossesBeat), false);
            this.TokensFromEliteBosses.text = _.L(ConfigLoca.ASCEND_FROM_ELITE_BOSSES, new < > __AnonType9 <int>(player.ActiveCharacter.HeroStats.EliteBossesBeat), false);
            this.TokensFromItems.text       = _.L(ConfigLoca.ASCEND_FROM_ITEMS, new < > __AnonType9 <int>(LangUtil.TryGetIntValueFromDictionary <int>(player.ActiveCharacter.HeroStats.ItemsGainedByRarity, ConfigMeta.ITEM_HIGHEST_RARITY)), false);
            double v = player.getTotalTokensFromRetirement(out num, out num2, out num3);

            this.TokensMultiplier.text = _.L(ConfigLoca.ASCEND_MULTIPLIER, new < > __AnonType9 <string>(num3.ToString("0.0") + "X"), false);
            this.TokensTotal.text      = "\x00d7" + MenuHelpers.BigValueToString(v);
            int num5 = 0;

            for (int i = 0; i < player.UnclaimedRewards.Count; i++)
            {
                if (player.UnclaimedRewards[i].ChestType == ChestType.RewardBoxCommon)
                {
                    num5++;
                }
            }
            this.RewardBoxesText.text = "\x00d7" + num5.ToString();
            Reward reward = player.getFirstUnclaimedRetirementTriggerChest();

            if (reward != null)
            {
                this.FrenzyPotionsText.text = "\x00d7" + reward.FrenzyPotions;
            }
            else
            {
                this.FrenzyPotionsText.text = "0";
            }
        }
        public void initialize(GameLogic.LeagueData leagueData, bool stripedRow)
        {
            this.LeagueData            = leagueData;
            this.CrownRequirement.text = this.LeagueData.Title;
            this.RewardIcon.sprite     = PlayerView.Binder.SpriteResources.getSprite(ConfigUi.CHEST_BLUEPRINTS[leagueData.RewardChestType].Icon);
            this.CrownRequirement.text = MenuHelpers.BigValueToString(this.LeagueData.CrownRequirement);
            bool flag = ConfigLeagues.HasPlayerReachedLeague(GameLogic.Binder.GameState.Player.getResourceAmount(ResourceType.Crown), this.LeagueData);

            this.RewardIcon.material = !flag ? PlayerView.Binder.DisabledUiMaterial : null;
        }
Example #3
0
        protected override void onRefresh()
        {
            Player player = GameLogic.Binder.GameState.Player;

            base.m_contentMenu.refreshTabs();
            for (int i = 0; i < this.m_itemCells.Count; i++)
            {
                this.m_itemCells[i].refresh();
            }
            this.TokenCount.text = MenuHelpers.BigValueToString(player.getResourceAmount(ResourceType.Token));
        }
        protected override void onRefresh()
        {
            Player            player          = GameLogic.Binder.GameState.Player;
            CharacterInstance activeCharacter = player.ActiveCharacter;

            base.m_contentMenu.refreshTitle(StringExtensions.ToUpperLoca(_.L(ConfigLoca.HEROVIEW_TITLE, null, false)), string.Empty, string.Empty);
            if (!string.IsNullOrEmpty(player.SocialData.Name))
            {
                this.HeaderTitle.text = StringExtensions.ToUpperLoca(player.SocialData.Name);
            }
            else
            {
                this.HeaderTitle.text = StringExtensions.ToUpperLoca(player.ActiveCharacter.Name);
            }
            this.HeroAvatarImage.texture = PlayerView.Binder.MenuSystem.CharacterMenuCamera.RenderTexture;
            this.HeroAvatarImage.enabled = true;
            this.AtkText.text            = MenuHelpers.BigValueToString(activeCharacter.DamagePerHit(false));
            this.DefText.text            = MenuHelpers.BigValueToString(activeCharacter.MaxLife(false));
            this.SklText.text            = MenuHelpers.BigValueToString(activeCharacter.SkillDamage(false));
            this.refreshHeroStats();
        }
 public void onSellButtonClicked()
 {
     if (!PlayerView.Binder.MenuSystem.InTransition)
     {
         bool flag;
         TooltipMenu.InputParameters parameters5;
         Player            player          = GameLogic.Binder.GameState.Player;
         CharacterInstance activeCharacter = player.ActiveCharacter;
         int num = activeCharacter.getHighestItemLevelPlusRankEquippedOrInInventory(this.ItemInstance.Item.Type, out flag);
         if (activeCharacter.isItemInstanceEquipped(this.ItemInstance))
         {
             parameters5                   = new TooltipMenu.InputParameters();
             parameters5.CenterOnTm        = this.SellButton.RectTm;
             parameters5.MenuContentParams = _.L(ConfigLoca.TOOLTIP_CANNOT_SELL_EQUIPPED, null, false);
             TooltipMenu.InputParameters parameter = parameters5;
             PlayerView.Binder.MenuSystem.transitionToMenu(MenuType.TooltipMenu, MenuContentType.InfoTooltip, parameter, 0f, false, true);
         }
         else if ((!ConfigMeta.CAN_SELL_HIGHEST_LEVEL_ITEM && (this.ItemInstance.LevelPlusRank == num)) && !flag)
         {
             parameters5                   = new TooltipMenu.InputParameters();
             parameters5.CenterOnTm        = this.SellButton.RectTm;
             parameters5.MenuContentParams = _.L(ConfigLoca.TOOLTIP_CANNOT_SELL_HIGHEST, null, false);
             TooltipMenu.InputParameters parameters2 = parameters5;
             PlayerView.Binder.MenuSystem.transitionToMenu(MenuType.TooltipMenu, MenuContentType.InfoTooltip, parameters2, 0f, false, true);
         }
         else if (!ConfigMeta.CAN_SELL_HIGHEST_RARITY_ITEM && (this.ItemInstance.Rarity == ConfigMeta.ITEM_HIGHEST_RARITY))
         {
             double num2;
             double num3;
             App.Binder.ConfigMeta.ItemSellCurve(activeCharacter, this.ItemInstance.Item.Type, this.ItemInstance.Rarity, this.ItemInstance.Level, this.ItemInstance.Rank, out num2, out num3);
             parameters5                   = new TooltipMenu.InputParameters();
             parameters5.CenterOnTm        = this.SellButton.RectTm;
             parameters5.MenuContentParams = _.L(ConfigLoca.TOOLTIP_CANNOT_SELL_LEGENDARY, new < > __AnonType4 <string>(MenuHelpers.ColoredText(MenuHelpers.BigValueToString(num3))), false);
             TooltipMenu.InputParameters parameters3 = parameters5;
             PlayerView.Binder.MenuSystem.transitionToMenu(MenuType.TooltipMenu, MenuContentType.InfoTooltip, parameters3, 0f, false, true);
         }
         else if (false)
         {
             parameters5                   = new TooltipMenu.InputParameters();
             parameters5.CenterOnTm        = this.SellButton.RectTm;
             parameters5.MenuContentParams = this.ItemInstance;
             TooltipMenu.InputParameters parameters4 = parameters5;
             PlayerView.Binder.MenuSystem.transitionToMenu(MenuType.TooltipMenu, MenuContentType.SellConfirmationTooltip, parameters4, 0f, false, true);
         }
         else
         {
             CmdSellItem.ExecuteStatic(player.ActiveCharacter, this.ItemInstance, this.SellButton.RectTm);
             PlayerView.Binder.AudioSystem.playSfx(AudioSourceType.SfxUi_ItemSell, (float)0f);
             PlayerView.Binder.MenuSystem.returnToPreviousMenu(true);
         }
     }
 }
        protected override void onRefresh()
        {
            Player            player          = GameLogic.Binder.GameState.Player;
            CharacterInstance activeCharacter = player.ActiveCharacter;

            GameLogic.Item item = this.getReferenceItem();
            if (this.ItemInstance != null)
            {
                int num;
                this.PowerText.text = MenuHelpers.BigValueToString(App.Binder.ConfigMeta.ItemPowerCurve(this.ItemInstance.Item.Type, player.getRiggedItemLevel(this.ItemInstance), this.ItemInstance.Rank));
                int num2 = activeCharacter.getItemInstantUpgradeCount(this.ItemInstance, out num);
                if (num2 > ConfigMeta.ITEM_INSTANT_UPGRADE_LEVEL_THRESHOLD)
                {
                    this.SpecialOfferPanel.SetActive(true);
                    this.InstantUpgradeText.text = _.L(ConfigLoca.ITEMINFO_INSTANT_UPGRADE_DESCIPTION, new < > __AnonType8 <int>(num), false);
                    this.InstantUpgradeButton.ButtonScript.interactable = num2 > 0;
                    this.InstantUpgradeButton.ButtonImage.material      = !this.InstantUpgradeButton.ButtonScript.interactable ? PlayerView.Binder.DisabledUiMaterial : null;
                    this.InstantUpgradeButton.ButtonIcon.material       = this.InstantUpgradeButton.ButtonImage.material;
                }
                else
                {
                    this.SpecialOfferPanel.SetActive(false);
                }
                if (player.canEvolveItem(this.ItemInstance))
                {
                    this.EquipButton.enabled       = true;
                    this.EquipButtonImage.material = null;
                    this.EquipButtonText.text      = StringExtensions.ToUpperLoca(_.L(ConfigLoca.UI_PROMPT_UPGRADE, null, false));
                    this.EquipButtonPulse.enabled  = true;
                }
                else if (activeCharacter.isItemInstanceEquipped(this.ItemInstance))
                {
                    this.EquipButton.enabled        = false;
                    this.EquipButtonImage.material  = PlayerView.Binder.DisabledUiMaterial;
                    this.EquipButtonText.text       = StringExtensions.ToUpperLoca(_.L(ConfigLoca.UI_PROMPT_EQUIPPED, null, false));
                    this.EquipButtonPulse.enabled   = false;
                    this.IconSelectedBorder.enabled = true;
                }
                else if (!activeCharacter.hasReachedUnlockFloorForItem(this.ItemInstance))
                {
                    this.EquipButton.enabled        = false;
                    this.EquipButtonImage.material  = PlayerView.Binder.DisabledUiMaterial;
                    this.EquipButtonText.text       = StringExtensions.ToUpperLoca(_.L(ConfigLoca.UI_PROMPT_FLOOR_X, new < > __AnonType15 <int>(this.ItemInstance.UnlockFloor), false));
                    this.EquipButtonPulse.enabled   = false;
                    this.IconSelectedBorder.enabled = false;
                }
                else if (!this.ItemInstance.Unlocked)
                {
                    this.EquipButton.enabled        = false;
                    this.EquipButtonImage.material  = PlayerView.Binder.DisabledUiMaterial;
                    this.EquipButtonText.text       = StringExtensions.ToUpperLoca(_.L(ConfigLoca.UI_PROMPT_LOCKED, null, false));
                    this.EquipButtonPulse.enabled   = false;
                    this.IconSelectedBorder.enabled = false;
                }
                else
                {
                    this.EquipButton.enabled        = true;
                    this.EquipButtonImage.material  = null;
                    this.EquipButtonText.text       = StringExtensions.ToUpperLoca(_.L(ConfigLoca.UI_PROMPT_EQUIP, null, false));
                    this.EquipButtonPulse.enabled   = false;
                    this.IconSelectedBorder.enabled = false;
                }
                this.LevelText.text = (player.getRiggedItemLevel(this.ItemInstance) + this.ItemInstance.Rank).ToString();
            }
            else
            {
                this.PowerText.text = "0";
                this.LevelText.text = "1";
                this.SpecialOfferPanel.SetActive(false);
            }
            if ((this.ItemInstance != null) && (this.ItemInstance.Perks.count() > 0))
            {
                this.RerollButton.interactable = true;
                this.RerollCost.text           = App.Binder.ConfigMeta.ItemRerollDiamondCostCurve(this.ItemInstance.Rarity, this.ItemInstance.RerollCount).ToString();
            }
            else
            {
                this.RerollButton.interactable = false;
                this.RerollCost.text           = "-";
            }
            this.RerollButtonImage.material = !this.RerollButton.interactable ? PlayerView.Binder.DisabledUiMaterial : null;
            int num3 = item.FixedPerks.count();

            if (num3 > 0)
            {
                IconWithText           text      = this.Perks[0];
                PerkInstance           instance2 = item.FixedPerks.PerkInstances[0];
                ConfigPerks.SharedData data      = ConfigPerks.SHARED_DATA[instance2.Type];
                text.gameObject.SetActive(true);
                text.Text.text = MenuHelpers.GetFormattedPerkDescription(instance2.Type, instance2.Modifier, data.DurationSeconds, data.Threshold, 0f, false);
            }
            else
            {
                this.Perks[0].gameObject.SetActive(false);
            }
            int count = this.ItemInstance.Perks.PerkInstances.Count;

            for (int i = 1; i < this.Perks.Count; i++)
            {
                IconWithText text2     = this.Perks[i];
                PerkInstance instance3 = null;
                if ((this.ItemInstance != null) && ((i - 1) < count))
                {
                    instance3 = this.ItemInstance.Perks.PerkInstances[i - 1];
                }
                if (instance3 != null)
                {
                    ConfigPerks.SharedData data2 = ConfigPerks.SHARED_DATA[instance3.Type];
                    text2.gameObject.SetActive(true);
                    text2.Icon.sprite = PlayerView.Binder.SpriteResources.getSprite("Menu", data2.SmallSprite);
                    if (this.ItemInstance != null)
                    {
                        text2.Text.text = MenuHelpers.GetFormattedPerkDescription(instance3.Type, instance3.Modifier, data2.DurationSeconds, data2.Threshold, 0f, true);
                    }
                    else
                    {
                        text2.Text.text = "CHANGE ME";
                    }
                }
                else
                {
                    text2.gameObject.SetActive(false);
                }
            }
            this.PerksTitleDivier.SetActive((num3 + count) > 0);
        }
        protected override void onPreShow([Optional, DefaultParameterValue(null)] object param)
        {
            this.m_inputParameters = (InputParameters)param;
            CharacterInstance activeCharacter = GameLogic.Binder.GameState.Player.ActiveCharacter;

            GameLogic.Item item = this.getReferenceItem();
            switch (item.Type)
            {
            case ItemType.Weapon:
                this.Header.text           = StringExtensions.ToUpperLoca(_.L(ConfigLoca.ITEMS_WEAPON, null, false));
                this.PowerIcon.sprite      = PlayerView.Binder.SpriteResources.getSprite("Menu", "icon_mini_weapon");
                this.PowerDescription.text = StringExtensions.ToUpperLoca(_.L(ConfigLoca.HEROVIEW_POWER_ATTACK, null, false));
                break;

            case ItemType.Armor:
                this.Header.text           = StringExtensions.ToUpperLoca(_.L(ConfigLoca.ITEMS_ARMOR, null, false));
                this.PowerIcon.sprite      = PlayerView.Binder.SpriteResources.getSprite("Menu", "icon_mini_armor");
                this.PowerDescription.text = StringExtensions.ToUpperLoca(_.L(ConfigLoca.HEROVIEW_POWER_DEFENSE, null, false));
                break;

            case ItemType.Cloak:
                this.Header.text           = StringExtensions.ToUpperLoca(_.L(ConfigLoca.ITEMS_CLOAK, null, false));
                this.PowerIcon.sprite      = PlayerView.Binder.SpriteResources.getSprite("Menu", "icon_mini_spell");
                this.PowerDescription.text = StringExtensions.ToUpperLoca(_.L(ConfigLoca.HEROVIEW_POWER_SKILLDMG, null, false));
                break;

            default:
                this.Header.text      = "CHANGE ME";
                this.PowerIcon.sprite = null;
                break;
            }
            this.Title.text  = StringExtensions.ToUpperLoca(item.Name);
            this.Icon.sprite = PlayerView.Binder.SpriteResources.getSprite("Menu", item.SpriteId);
            MenuHelpers.RefreshStarContainer(this.Stars, item.Rarity);
            if (this.ItemInstance != null)
            {
                double num;
                double num2;
                if (!this.ItemInstance.InspectedByPlayer)
                {
                    CmdInspectItem.ExecuteStatic(this.ItemInstance);
                }
                App.Binder.ConfigMeta.ItemSellCurve(activeCharacter, this.ItemInstance.Item.Type, this.ItemInstance.Rarity, this.ItemInstance.Level, this.ItemInstance.Rank, out num, out num2);
                this.SellButton.gameObject.SetActive(true);
                if (num > 0.0)
                {
                    this.SellButton.ButtonLabelIcon.sprite = PlayerView.Binder.SpriteResources.getSprite(ConfigUi.RESOURCE_TYPE_SPRITES[ResourceType.Token]);
                    this.SellButton.ButtonLabel.text       = MenuHelpers.BigValueToString(num);
                }
                else
                {
                    this.SellButton.ButtonLabelIcon.sprite = PlayerView.Binder.SpriteResources.getSprite(ConfigUi.RESOURCE_TYPE_SPRITES[ResourceType.Coin]);
                    this.SellButton.ButtonLabel.text       = MenuHelpers.BigValueToString(num2);
                }
                if (!ConfigMeta.CAN_SELL_HIGHEST_RARITY_ITEM && (this.ItemInstance.Rarity == ConfigMeta.ITEM_HIGHEST_RARITY))
                {
                    this.SellButton.ButtonHeader.text = StringExtensions.ToUpperLoca(_.L(ConfigLoca.UI_PROMPT_VALUE, null, false));
                }
                else
                {
                    this.SellButton.ButtonHeader.text = StringExtensions.ToUpperLoca(_.L(ConfigLoca.UI_PROMPT_SELL, null, false));
                }
                this.EquipButton.gameObject.SetActive(true);
                this.EquipButtonImage.sprite = PlayerView.Binder.SpriteResources.getSprite("Menu", "uix_button_selected");
            }
            else
            {
                this.SellButton.gameObject.SetActive(false);
                this.EquipButton.gameObject.SetActive(false);
            }
            this.onRefresh();
        }
Example #8
0
        protected override void onPreShow([Optional, DefaultParameterValue(null)] object param)
        {
            ShopEntry shopEntryBySlot = Service.Binder.ShopManager.GetShopEntryBySlot(ShopManager.ValidBundleSlots[0]);

            this.m_starterBundleSpc      = new ShopPurchaseController(shopEntryBySlot, null, PathToShopType.Vendor, null, new Action <ShopEntry, PurchaseResult>(this.onPurchaseComplete));
            this.PurchaseButtonText.text = this.m_starterBundleSpc.getPriceText(1);
            this.CritterName.text        = StringExtensions.ToUpperLoca(_.L(ConfigLoca.IAP_STARTERBUNDLE_CRITTER_NAME, null, false));
            double v = this.m_starterBundleSpc.ShopEntry.BuyResourceAmounts[ResourceType.Token];

            this.TokenAmount.text = StringExtensions.ToUpperLoca(_.L(ConfigLoca.RESOURCES_TOKENS_MULTILINE, new < > __AnonType9 <string>(MenuHelpers.BigValueToString(v)), false));
            double num2 = this.m_starterBundleSpc.ShopEntry.BuyResourceAmounts[ResourceType.Diamond];

            this.GemAmount.text = StringExtensions.ToUpperLoca(_.L(ConfigLoca.RESOURCES_DIAMONDS_MULTILINE, new < > __AnonType9 <string>(MenuHelpers.BigValueToString(num2)), false));
        }
 protected override void onPreShow([Optional, DefaultParameterValue(null)] object param)
 {
     this.m_inputParameters = (InputParameters)param;
     if (!string.IsNullOrEmpty(this.m_inputParameters.Headline))
     {
         this.HeaderTitle.text    = StringExtensions.ToUpperLoca(this.m_inputParameters.Headline);
         this.HeaderTitle.enabled = true;
     }
     else
     {
         this.HeaderTitle.enabled = false;
     }
     if (!string.IsNullOrEmpty(this.m_inputParameters.Title))
     {
         this.DividerRoot.SetActive(true);
         this.DividerTitle.enabled = true;
         this.DividerTitle.text    = StringExtensions.ToUpperLoca(this.m_inputParameters.Title);
     }
     else
     {
         this.DividerRoot.SetActive(false);
         this.DividerTitle.enabled = false;
     }
     if (!string.IsNullOrEmpty(this.m_inputParameters.Message))
     {
         this.MessageText.enabled = true;
         this.MessageText.text    = this.m_inputParameters.Message;
     }
     else
     {
         this.MessageText.enabled = false;
     }
     if (this.m_inputParameters.CostAmount > 0.0)
     {
         this.Button.SetActive(true);
         this.ButtonIcon.gameObject.SetActive(true);
         this.ButtonText.text = MenuHelpers.BigValueToString(Math.Round(this.m_inputParameters.CostAmount));
         this.SetIconForResource(ref this.ButtonIcon, this.m_inputParameters.CostResourceType);
     }
     else if (!string.IsNullOrEmpty(this.m_inputParameters.ButtonText))
     {
         this.Button.SetActive(true);
         this.ButtonIcon.gameObject.SetActive(false);
         this.ButtonText.text = this.m_inputParameters.ButtonText;
         if (this.m_inputParameters.ButtonIcon != null)
         {
             Sprite iconForSprite = this.GetIconForSprite(this.m_inputParameters.ButtonIcon);
             if (iconForSprite != null)
             {
                 this.ButtonIcon.gameObject.SetActive(true);
                 this.ButtonIcon.sprite = iconForSprite;
             }
         }
     }
     else
     {
         this.Button.SetActive(false);
     }
     if (this.m_inputParameters.DisposableBackgroundTexture != null)
     {
         this.RawBg.enabled = true;
         this.RawBg.texture = this.m_inputParameters.DisposableBackgroundTexture;
         float num     = ((float)this.m_inputParameters.DisposableBackgroundTexture.width) / ((float)this.m_inputParameters.DisposableBackgroundTexture.height);
         float newSize = Mathf.Clamp((float)(this.m_defaultWidth / num), (float)200f, (float)1880f);
         RectTransformExtensions.SetHeight(base.RectTm, newSize);
         base.RewardsGrid.gameObject.SetActive(false);
     }
     else
     {
         this.RawBg.enabled = false;
         RectTransformExtensions.SetHeight(base.RectTm, this.m_defaultHeight);
         List <Reward> rewards = Service.Binder.PromotionManager.GetRewards(this.m_inputParameters.Promotion);
         if ((rewards != null) && (rewards.Count > 0))
         {
             base.RewardsGrid.gameObject.SetActive(true);
             base.InitRewardGrid(rewards);
         }
         else
         {
             base.RewardsGrid.gameObject.SetActive(false);
         }
     }
 }
        protected override void onPreShow([Optional, DefaultParameterValue(null)] object param)
        {
            RewardGalleryCell.Content content4;
            MiniPopupEntry            entry3;
            MiniPopupMenu             contentMenu = (MiniPopupMenu)base.m_contentMenu;

            this.m_param = param;
            this.m_shopPurchaseController = null;
            if (param is PlayerAugmentation)
            {
                contentMenu.MainButton.gameObject.SetActive(true);
                this.DualButtonLeft.gameObject.SetActive(false);
                this.DualButtonRight.gameObject.SetActive(false);
                PlayerAugmentation augmentation = (PlayerAugmentation)param;
                SpriteAtlasEntry   sprite       = null;
                string             overrideDescriptionTextLocalized = null;
                string             str2 = null;
                if (augmentation.PerkInstance != null)
                {
                    ConfigPerks.SharedData data = ConfigPerks.SHARED_DATA[augmentation.PerkInstance.Type];
                    sprite = data.Sprite;
                    overrideDescriptionTextLocalized = _.L(ConfigLoca.MINIPOPUP_AUGMENTATIONS_DESCRIPTION, new < > __AnonType24 <string>(_.L(data.ShortDescription, null, false)), false);
                    str2 = MenuHelpers.BigModifierToString(augmentation.PerkInstance.Modifier, true);
                }
                content4        = new RewardGalleryCell.Content();
                content4.Sprite = sprite;
                content4.Text   = str2;
                RewardGalleryCell.Content rewardContent = content4;
                string           overrideButtonText     = MenuHelpers.BigValueToString(App.Binder.ConfigMeta.GetAugmentationPrice(augmentation.Id));
                SpriteAtlasEntry atlasEntry             = ConfigUi.RESOURCE_TYPE_SPRITES[ResourceType.Token];
                entry3           = new MiniPopupEntry();
                entry3.TitleText = ConfigLoca.MINIPOPUP_AUGMENTATIONS_TITLE;
                contentMenu.populateLayout(entry3, true, rewardContent, overrideButtonText, PlayerView.Binder.SpriteResources.getSprite(atlasEntry), overrideDescriptionTextLocalized);
            }
            else if (param is ShopPurchaseController)
            {
                ShopPurchaseController controller = (ShopPurchaseController)param;
                this.m_shopPurchaseController = new ShopPurchaseController(controller.ShopEntry, controller.ShopEntryInstance, PathToShopType.Vendor, new System.Action(this.onShopClosed), new Action <ShopEntry, PurchaseResult>(this.onShopPurchaseCompleted));
                content4             = new RewardGalleryCell.Content();
                content4.Sprite      = controller.getSprite();
                content4.StickerText = controller.getStickerText();
                RewardGalleryCell.Content content2 = content4;
                if (controller.payWithAd())
                {
                    contentMenu.MainButton.gameObject.SetActive(true);
                    this.DualButtonLeft.gameObject.SetActive(false);
                    this.DualButtonRight.gameObject.SetActive(false);
                    double v = controller.getAmount();
                    content2.Text    = (v <= 1.0) ? null : ("+" + MenuHelpers.BigValueToString(v));
                    entry3           = new MiniPopupEntry();
                    entry3.TitleText = ConfigLoca.MINIPOPUP_ADS_VENDOR_TITLE;
                    contentMenu.populateLayout(entry3, true, content2, StringExtensions.ToUpperLoca(_.L(ConfigLoca.UI_PROMPT_WATCH, null, false)), null, _.L(ConfigLoca.MINIPOPUP_SPECIAL_OFFER_DESCRIPTION, null, false));
                }
                else if (controller.getRefShopEntry().Type == ShopEntryType.MegaBoxBundle)
                {
                    contentMenu.MainButton.gameObject.SetActive(true);
                    this.DualButtonLeft.gameObject.SetActive(false);
                    this.DualButtonRight.gameObject.SetActive(false);
                    double num2 = ConfigShops.CalculateMegaBoxBundleSize(controller.getRefShopEntry().Id);
                    string str4 = null;
                    if (num2 > 1.0)
                    {
                        str4 = _.L(ConfigLoca.MINIPOPUP_MEGABOX_DESCRIPTION_MANY, new < > __AnonType9 <string>(num2.ToString("0")), false);
                    }
                    else
                    {
                        str4 = _.L(ConfigLoca.MINIPOPUP_MEGABOX_DESCRIPTION_SINGLE, null, false);
                    }
                    entry3           = new MiniPopupEntry();
                    entry3.TitleText = ConfigLoca.MINIPOPUP_MEGABOX_TITLE;
                    contentMenu.populateLayout(entry3, true, content2, controller.getPriceText(1), PlayerView.Binder.SpriteResources.getSprite(controller.getPriceIcon()), str4);
                }
                else if (controller.getPurchasesRemaining() > 1)
                {
                    contentMenu.MainButton.gameObject.SetActive(false);
                    this.DualButtonLeft.gameObject.SetActive(true);
                    this.DualButtonRight.gameObject.SetActive(true);
                    this.DualButtonLeft.CornerText.text = "1x";
                    this.DualButtonLeft.Text.text       = controller.getPriceText(1);
                    this.DualButtonLeft.Icon.sprite     = PlayerView.Binder.SpriteResources.getSprite(controller.getPriceIcon());
                    int numPurchases = controller.getPurchasesRemaining();
                    this.DualButtonRight.CornerText.text = numPurchases + "x";
                    this.DualButtonRight.Text.text       = controller.getPriceText(numPurchases);
                    this.DualButtonRight.Icon.sprite     = PlayerView.Binder.SpriteResources.getSprite(controller.getPriceIcon());
                    double num4 = controller.getAmount();
                    content2.Text    = (num4 <= 1.0) ? null : ("+" + MenuHelpers.BigValueToString(num4));
                    entry3           = new MiniPopupEntry();
                    entry3.TitleText = ConfigLoca.MINIPOPUP_BASIC_VENDOR_TITLE;
                    contentMenu.populateLayout(entry3, false, content2, null, null, _.L(ConfigLoca.MINIPOPUP_BASIC_VENDOR_DESCRIPTION, null, false));
                }
                else
                {
                    contentMenu.MainButton.gameObject.SetActive(true);
                    this.DualButtonLeft.gameObject.SetActive(false);
                    this.DualButtonRight.gameObject.SetActive(false);
                    double num5 = controller.getAmount();
                    content2.Text    = (num5 <= 1.0) ? null : ("+" + MenuHelpers.BigValueToString(num5));
                    entry3           = new MiniPopupEntry();
                    entry3.TitleText = ConfigLoca.MINIPOPUP_BASIC_VENDOR_TITLE;
                    contentMenu.populateLayout(entry3, true, content2, controller.getPriceText(1), PlayerView.Binder.SpriteResources.getSprite(controller.getPriceIcon()), _.L(ConfigLoca.MINIPOPUP_BASIC_VENDOR_DESCRIPTION, null, false));
                }
            }
            else if (param is TournamentView)
            {
                this.m_tournamentView = (TournamentView)param;
                contentMenu.MainButton.gameObject.SetActive(false);
                this.DualButtonLeft.gameObject.SetActive(true);
                this.DualButtonRight.gameObject.SetActive(true);
                double num6 = this.m_tournamentView.Instance.getDonationPrice();
                this.DualButtonLeft.CornerText.text = "1x";
                this.DualButtonLeft.Text.text       = num6.ToString("0");
                this.DualButtonLeft.Icon.sprite     = PlayerView.Binder.SpriteResources.getSprite(ConfigUi.RESOURCE_TYPE_SPRITES[ResourceType.Diamond]);
                int num7 = this.m_tournamentView.Instance.getDonationsRemaining();
                this.DualButtonRight.CornerText.text = num7 + "x";
                this.DualButtonRight.Text.text       = (num7 * num6).ToString("0");
                this.DualButtonRight.Icon.sprite     = this.DualButtonLeft.Icon.sprite;
                content4        = new RewardGalleryCell.Content();
                content4.Sprite = new SpriteAtlasEntry("Menu", "icon_cardpack_floater");
                RewardGalleryCell.Content content3 = content4;
                entry3           = new MiniPopupEntry();
                entry3.TitleText = ConfigLoca.UI_BUTTON_INFO;
                contentMenu.populateLayout(entry3, false, content3, null, null, _.L(ConfigLoca.ADVPANEL_DONATE_DESCRIPTION, null, false));
            }
            this.onRefresh();
        }