Exemple #1
0
        // Token: 0x0601467D RID: 83581 RVA: 0x0052FE5C File Offset: 0x0052E05C
        public void SetHeroPhantomInfo(ConfigDataHeroPhantomInfo heroPhantomInfo)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetHeroPhantomInfoConfigDataHeroPhantomInfo_hotfix != null)
            {
                this.m_SetHeroPhantomInfoConfigDataHeroPhantomInfo_hotfix.call(new object[]
                {
                    this,
                    heroPhantomInfo
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.m_heroPhantomInfo         = heroPhantomInfo;
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            IConfigDataLoader     configDataLoader      = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            bool flag = projectLPlayerContext.IsHeroPhantomOpened(heroPhantomInfo.ID);

            this.m_uiStateController.SetToUIState((!flag) ? "Grey" : "Normal", false, true);
            this.m_image.sprite = AssetUtility.Instance.GetSprite(heroPhantomInfo.Image);
            DateTime dateTime  = Convert.ToDateTime(heroPhantomInfo.OpenDateTime);
            DateTime dateTime2 = Convert.ToDateTime(heroPhantomInfo.CloseDateTime);

            this.m_timeText.text = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Uncharted_LimitTime), new object[]
            {
                dateTime.Month,
                dateTime.Day,
                dateTime.Hour,
                dateTime.Minute,
                dateTime2.Month,
                dateTime2.Day,
                dateTime2.Hour,
                dateTime2.Minute
            });
            int num = 0;

            foreach (ConfigDataHeroPhantomLevelInfo configDataHeroPhantomLevelInfo in heroPhantomInfo.m_levels)
            {
                if (configDataHeroPhantomLevelInfo.m_achievements != null)
                {
                    num += configDataHeroPhantomLevelInfo.m_achievements.Length;
                }
            }
            int heroPhantomCompleteAchievementCount = projectLPlayerContext.GetHeroPhantomCompleteAchievementCount(heroPhantomInfo.ID);

            this.m_achievementCountText.text = heroPhantomCompleteAchievementCount + "/" + num;
        }