public void Init(SeasonEndInfo info)
    {
        this.m_seasonEndInfo = info;
        this.m_header.Text   = this.GetSeasonName(info.m_seasonID);
        if ((info.m_rankedRewards != null) && (info.m_rankedRewards.Count > 0))
        {
            this.m_earnedRewardChest = true;
        }
        else
        {
            this.m_earnedRewardChest = false;
        }
        this.m_medal.SetMedal(new MedalInfoTranslator(info.m_rank, info.m_legendIndex), false);
        this.m_rankName.Text = this.m_medal.GetMedal().name;
        this.m_bonusStars    = info.m_bonusStars;
        string rankPercentile = GetRankPercentile(this.m_seasonEndInfo.m_rank);

        if (rankPercentile.Length > 0)
        {
            this.m_rankPercentile.gameObject.SetActive(true);
            object[] args = new object[] { rankPercentile };
            this.m_rankPercentile.Text = GameStrings.Format("GLOBAL_SEASON_END_PERCENTILE_LABEL", args);
        }
        else
        {
            this.m_rankPercentile.gameObject.SetActive(false);
        }
        foreach (PegUIElement element in this.m_rewardChests)
        {
            element.gameObject.SetActive(false);
        }
        int chestIndexFromRank = RankedRewardChest.GetChestIndexFromRank(this.m_seasonEndInfo.m_chestRank);

        if (chestIndexFromRank >= 0)
        {
            this.m_rewardChest = this.m_rewardChests[chestIndexFromRank];
            this.m_rewardChest.gameObject.SetActive(true);
            this.m_medalPlayMaker.FsmVariables.GetFsmGameObject("RankChest").Value = this.m_rewardChest.gameObject;
            UberText[] componentsInChildren = this.m_rewardChest.GetComponentsInChildren <UberText>(true);
            if (componentsInChildren.Length > 0)
            {
                componentsInChildren[0].Text = info.m_chestRank.ToString();
            }
            this.m_rewardChestHeader.Text = RankedRewardChest.GetChestEarnedFromRank(this.m_seasonEndInfo.m_chestRank);
        }
        this.m_rewardChest.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.ChestButtonReleased));
    }
    public void ChestOver(UIEvent e)
    {
        string chestNameFromRank;
        string str2;

        if (RankedRewardChest.GetChestIndexFromRank(this.m_rank) >= 0)
        {
            chestNameFromRank = RankedRewardChest.GetChestNameFromRank(this.m_rank);
            str2 = GameStrings.Format("GLUE_QUEST_LOG_CHEST_TOOLTIP_BODY", new object[0]);
        }
        else
        {
            chestNameFromRank = GameStrings.Format("GLUE_QUEST_LOG_NO_CHEST", new object[0]);
            str2 = GameStrings.Format("GLUE_QUEST_LOG_CHEST_TOOLTIP_BODY_NO_CHEST", new object[0]);
        }
        base.gameObject.GetComponent <TooltipZone>().ShowLayerTooltip(chestNameFromRank, str2);
    }
    public void SetRank(int rank)
    {
        this.m_rank = rank;
        int chestIndexFromRank = RankedRewardChest.GetChestIndexFromRank(rank);

        if (chestIndexFromRank >= 0)
        {
            this.m_rewardChests[chestIndexFromRank].SetActive(true);
            this.m_emptyRewardChest.SetActive(false);
            this.m_rewardChestRankText.Text = rank.ToString();
        }
        else
        {
            this.m_emptyRewardChest.SetActive(true);
            this.m_rewardChestRankText.TextAlpha = 0.2f;
            this.m_rewardChestRankText.Text      = 20.ToString();
        }
        bool flag = this.m_rank == 0;

        this.m_legendaryGem.SetActive(flag);
        this.m_rewardChestRankText.gameObject.SetActive(!flag);
    }