示例#1
0
        // Token: 0x0601086C RID: 67692 RVA: 0x0044C744 File Offset: 0x0044A944
        public void InitJobMaterial(Goods jobMaterialGood)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitJobMaterialGoods_hotfix != null)
            {
                this.m_InitJobMaterialGoods_hotfix.call(new object[]
                {
                    this,
                    jobMaterialGood
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            IConfigDataLoader     configDataLoader      = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;

            this.JobMaterialInfo      = configDataLoader.GetConfigDataJobMaterialInfo(jobMaterialGood.Id);
            this.m_iconImg.sprite     = AssetUtility.Instance.GetSprite(this.JobMaterialInfo.Icon);
            this.m_bgImg.sprite       = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsFrameName(jobMaterialGood.GoodsType, jobMaterialGood.Id));
            this.NeedCount            = jobMaterialGood.Count;
            this.HaveCount            = projectLPlayerContext.GetBagItemCountByType(jobMaterialGood.GoodsType, jobMaterialGood.Id);
            this.m_needCountText.text = this.NeedCount.ToString();
            this.m_haveCountText.text = this.HaveCount.ToString();
            CommonUIStateController component = base.gameObject.GetComponent <CommonUIStateController>();

            if (this.NeedCount > this.HaveCount)
            {
                component.SetToUIState("TextRed", false, true);
            }
            else
            {
                component.SetToUIState("TextWhite", false, true);
            }
        }
示例#2
0
        // Token: 0x0600D75D RID: 55133 RVA: 0x003AA4D4 File Offset: 0x003A86D4
        private void ClosePanel()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_ClosePanel_hotfix != null)
            {
                this.m_ClosePanel_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            CommonUIStateController component = base.gameObject.GetComponent <CommonUIStateController>();

            if (component != null)
            {
                component.SetActionForUIStateFinshed("Close", delegate
                {
                    base.gameObject.SetActive(false);
                });
                component.SetToUIState("Close", false, true);
            }
            else
            {
                base.gameObject.SetActive(false);
            }
        }
        // Token: 0x0600C874 RID: 51316 RVA: 0x00378130 File Offset: 0x00376330
        private void AddCondition(Transform parent, string str, int stateType)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_AddConditionTransformStringInt32_hotfix != null)
            {
                this.m_AddConditionTransformStringInt32_hotfix.call(new object[]
                {
                    this,
                    parent,
                    str,
                    stateType
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.m_conditionPrefab, parent, false);
            Text       component  = gameObject.GetComponent <Text>();

            if (component != null)
            {
                component.text = str;
            }
            CommonUIStateController component2 = gameObject.GetComponent <CommonUIStateController>();

            if (component2 != null)
            {
                component2.SetToUIState((stateType != 0) ? "Rule" : "Win", false, true);
            }
        }
示例#4
0
 // Token: 0x060158C3 RID: 88259 RVA: 0x0057D010 File Offset: 0x0057B210
 public static void SetUIStateOpen(CommonUIStateController ctrl, string stateName, Action onEnd = null, Action <bool> EnableInput = null, bool allowToRefreshSameState = true)
 {
     if (ctrl == null)
     {
         return;
     }
     if (string.IsNullOrEmpty(stateName))
     {
         return;
     }
     if (EnableInput != null)
     {
         EnableInput(false);
     }
     ctrl.gameObject.SetActive(true);
     ctrl.SetActionForUIStateFinshed(stateName, delegate
     {
         if (EnableInput != null)
         {
             EnableInput(true);
         }
         if (onEnd != null)
         {
             onEnd();
         }
     });
     ctrl.SetToUIState(stateName, false, allowToRefreshSameState);
 }
示例#5
0
        // Token: 0x060096DE RID: 38622 RVA: 0x002B1D6C File Offset: 0x002AFF6C
        public void Init(GameObject root)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitGameObject_hotfix != null)
            {
                this.m_InitGameObject_hotfix.call(new object[]
                {
                    this,
                    root
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.m_root = root;
            this.m_root.SetActive(true);
            this.m_configDataLoader = (GameManager.Instance.ConfigDataLoader as IConfigDataLoader);
            this.m_playerContext    = (GameManager.Instance.PlayerContext as ProjectLPlayerContext);
            IEnumerable <KeyValuePair <int, ConfigDataHeroInfo> > allConfigDataHeroInfo = this.m_configDataLoader.GetAllConfigDataHeroInfo();
            int childCount = this.m_root.transform.childCount;

            for (int i = 0; i < childCount; i++)
            {
                Transform          child = this.m_root.transform.GetChild(i);
                ConfigDataHeroInfo configDataHeroInfo = null;
                foreach (KeyValuePair <int, ConfigDataHeroInfo> keyValuePair in allConfigDataHeroInfo)
                {
                    if (keyValuePair.Value.Useable && keyValuePair.Value.Name_Eng == child.name)
                    {
                        configDataHeroInfo = keyValuePair.Value;
                        break;
                    }
                }
                if (configDataHeroInfo != null)
                {
                    ConfigDataCharImageInfo charImageInfo = configDataHeroInfo.GetCharImageInfo(configDataHeroInfo.Star);
                    if (charImageInfo != null)
                    {
                        GameObject asset = AssetUtility.Instance.GetAsset <GameObject>(charImageInfo.HeroPainting);
                        if (asset != null)
                        {
                            GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(asset);
                            gameObject.transform.SetParent(child, false);
                            CommonUIStateController component = gameObject.GetComponent <CommonUIStateController>();
                            component.SetToUIState("Dark", false, true);
                            this.heroDictionary.Add(child.name, component);
                        }
                    }
                }
            }
            List <Hero> heros = this.m_playerContext.GetHeros();

            foreach (Hero hero in heros)
            {
                CommonUIStateController commonUIStateController = null;
                if (this.heroDictionary.TryGetValue(hero.HeroInfo.Name_Eng, out commonUIStateController))
                {
                    commonUIStateController.SetToUIState("Normal", false, true);
                }
            }
        }
        // Token: 0x060105B4 RID: 66996 RVA: 0x00444B9C File Offset: 0x00442D9C
        public void InitHeroEquipmentItem(EquipmentBagItem equipment, int slot, int heroId)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitHeroEquipmentItemEquipmentBagItemInt32Int32_hotfix != null)
            {
                this.m_InitHeroEquipmentItemEquipmentBagItemInt32Int32_hotfix.call(new object[]
                {
                    this,
                    equipment,
                    slot,
                    heroId
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            base.gameObject.SetActive(true);
            this.Slot      = slot;
            this.Equipment = equipment;
            IConfigDataLoader       configDataLoader      = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            ProjectLPlayerContext   projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            CommonUIStateController component             = base.gameObject.GetComponent <CommonUIStateController>();

            if (equipment != null)
            {
                ConfigDataEquipmentInfo equipmentInfo = this.Equipment.EquipmentInfo;
                component.SetToUIState("Have", false, true);
                this.m_iconImg.sprite = AssetUtility.Instance.GetSprite(equipmentInfo.Icon);
                this.m_iconBg.sprite  = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsFrameNameByRank(equipmentInfo.Rank));
                this.m_nameText.text  = equipmentInfo.Name;
                int levelLimit = configDataLoader.GetConfigDataEquipmentLevelLimitInfo(equipment.StarLevel).LevelLimit;
                this.m_lvText.text = equipment.Level + "/" + levelLimit;
                UIUtility.SetGameObjectChildrenActiveCount(this.m_starGroupg, equipment.StarLevel);
                this.m_iconSSREffect.SetActive(UIUtility.IsRankSSR(equipmentInfo.Rank));
                if (equipment.IsEnchant())
                {
                    this.m_runeIconStateCtrl.gameObject.SetActive(true);
                    ConfigDataResonanceInfo configDataResonanceInfo = configDataLoader.GetConfigDataResonanceInfo(equipment.ResonanceId);
                    int equipmentResonanceNums = projectLPlayerContext.GetEquipmentResonanceNums(equipment.InstanceId);
                    if (equipmentResonanceNums >= 2)
                    {
                        this.m_runeIconStateCtrl.SetToUIState("Active", false, true);
                        this.m_runeActiveIcon.sprite = AssetUtility.Instance.GetSprite(configDataResonanceInfo.ActiveIcon);
                    }
                    else
                    {
                        this.m_runeIconStateCtrl.SetToUIState("Unactive", false, true);
                        this.m_runeInactiveIcon.sprite = AssetUtility.Instance.GetSprite(configDataResonanceInfo.InactiveIcon);
                    }
                }
                else
                {
                    this.m_runeIconStateCtrl.gameObject.SetActive(false);
                }
            }
            else
            {
                component.SetToUIState("NotHave", false, true);
            }
            this.m_redMarkGo.SetActive(projectLPlayerContext.HasBetterEquipmentBySlotId(heroId, slot));
        }
        // Token: 0x0601090B RID: 67851 RVA: 0x0044E4F4 File Offset: 0x0044C6F4
        private void ShowSelectSkillContent()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_ShowSelectSkillContent_hotfix != null)
            {
                this.m_ShowSelectSkillContent_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            GameObjectUtility.DestroyChildren(this.m_infoAllSkillsContent);
            GameObjectUtility.DestroyChildren(this.m_infoSelectSkillsContent);
            GameObject assetInContainer = base.GetAssetInContainer <GameObject>("skillItem");
            List <int> skillIds         = this.m_hero.SkillIds;
            List <int> selectedSkills   = this.m_hero.SelectedSkills;

            this.m_curSelectSkillIds = new List <int>();
            this.m_curSelectSkillIds.AddRange(selectedSkills);
            foreach (int key in skillIds)
            {
                ConfigDataSkillInfo configDataSkillInfo = this.m_configDataLoader.GetConfigDataSkillInfo(key);
                GameObject          gameObject          = UnityEngine.Object.Instantiate <GameObject>(assetInContainer);
                PrefabControllerCreater.CreateAllControllers(gameObject);
                HeroSkillItemUIController component = gameObject.GetComponent <HeroSkillItemUIController>();
                component.EventOnShowDesc += this.OnSkillItemClick;
                component.InitSkillItem(configDataSkillInfo);
                bool limitTagObjActive = this.m_playerContext.IsSkillLimitToHeroJob(this.m_hero.ActiveHeroJobRelatedId, configDataSkillInfo.ID);
                component.SetLimitTagObjActive(limitTagObjActive);
                gameObject.transform.SetParent(this.m_infoAllSkillsContent.transform, false);
                if (selectedSkills.Contains(configDataSkillInfo.ID))
                {
                    component.SetSelectPanelActive(true);
                }
            }
            foreach (int key2 in skillIds)
            {
                ConfigDataSkillInfo configDataSkillInfo2 = this.m_configDataLoader.GetConfigDataSkillInfo(key2);
                if (selectedSkills.Contains(configDataSkillInfo2.ID))
                {
                    GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(assetInContainer);
                    PrefabControllerCreater.CreateAllControllers(gameObject2);
                    HeroSkillItemUIController component2 = gameObject2.GetComponent <HeroSkillItemUIController>();
                    component2.EventOnShowDesc += this.OnSkillItemClick;
                    component2.InitSkillItem(configDataSkillInfo2);
                    gameObject2.transform.SetParent(this.m_infoSelectSkillsContent.transform, false);
                }
            }
            UIUtility.SetGameObjectChildrenActiveCount(this.m_infoSelectSkillsCost, this.CalcTotalCostFromSkillList(selectedSkills));
            CommonUIStateController component3 = this.m_infoSelectSkillPanel.GetComponent <CommonUIStateController>();

            UIUtility.SetUIStateOpen(component3, "Show", null, false, true);
        }
 // Token: 0x0601310F RID: 78095 RVA: 0x004DD650 File Offset: 0x004DB850
 public void Refresh(List <int> m_heroIDList)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_RefreshList ` 1_hotfix != null)
     {
         this.m_RefreshList ` 1_hotfix.call(new object[]
         {
             this,
             m_heroIDList
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     foreach (GameObject obj in this.m_heroGameObject)
     {
         UnityEngine.Object.Destroy(obj);
     }
     this.m_heroGameObject.Clear();
     m_heroIDList.Sort(new Comparison <int>(this.Compare));
     for (int i = 0; i < 10; i++)
     {
         ConfigDataHeroInfo      configDataHeroInfo = this.m_configDataLoader.GetConfigDataHeroInfo(m_heroIDList[i]);
         ConfigDataCharImageInfo charImageInfo      = configDataHeroInfo.GetCharImageInfo(configDataHeroInfo.Star);
         GameObject asset      = AssetUtility.Instance.GetAsset <GameObject>(charImageInfo.HeroPainting);
         GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(asset);
         Transform  transform  = GameObjectUtility.FindGameObjectByName(this.m_heroDummyParentList[i], "HeroDummy").transform;
         CommonUIStateController commonUIStateController = GameObjectUtility.FindComponentByName <CommonUIStateController>(this.m_heroDummyParentList[i], "Quality");
         Text text = GameObjectUtility.FindComponentByName <Text>(this.m_heroDummyParentList[i], "HeroNameText");
         text.text = configDataHeroInfo.Name;
         gameObject.transform.SetParent(transform, false);
         int rank = configDataHeroInfo.Rank;
         if (rank != 2)
         {
             if (rank != 3)
             {
                 if (rank == 4)
                 {
                     commonUIStateController.SetToUIState("SSR", false, true);
                 }
             }
             else
             {
                 commonUIStateController.SetToUIState("SR", false, true);
             }
         }
         else
         {
             commonUIStateController.SetToUIState("R", false, true);
         }
         this.m_heroGameObject.Add(gameObject);
     }
     this.UpdateSharePlayerInfo();
 }
示例#9
0
        // Token: 0x060158C5 RID: 88261 RVA: 0x0057D128 File Offset: 0x0057B328
        private static IEnumerator <object> Co_UIStateCloseFinished(CommonUIStateController ctrl, Action onEnd, Action <bool> EnableInput)
        {
            ctrl.gameObject.SetActive(false);
            yield return(null);

            if (EnableInput != null)
            {
                EnableInput(true);
            }
            if (onEnd != null)
            {
                onEnd();
            }
            yield break;
        }
示例#10
0
        // Token: 0x060108B4 RID: 67764 RVA: 0x0044DA00 File Offset: 0x0044BC00
        public void SetCommonUIState(string stateName)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetCommonUIStateString_hotfix != null)
            {
                this.m_SetCommonUIStateString_hotfix.call(new object[]
                {
                    this,
                    stateName
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            CommonUIStateController component = base.gameObject.GetComponent <CommonUIStateController>();

            UIUtility.SetUIStateOpen(component, stateName, null, true, true);
        }
示例#11
0
 // Token: 0x060158C4 RID: 88260 RVA: 0x0057D08C File Offset: 0x0057B28C
 public static void SetUIStateClose(CommonUIStateController ctrl, string stateName, Action onEnd = null, Action <bool> EnableInput = null, bool allowToRefreshSameState = true)
 {
     if (ctrl == null)
     {
         return;
     }
     if (string.IsNullOrEmpty(stateName))
     {
         return;
     }
     if (!ctrl.gameObject.activeSelf)
     {
         return;
     }
     if (EnableInput != null)
     {
         EnableInput(false);
     }
     ctrl.SetActionForUIStateFinshed(stateName, delegate
     {
         MonoBehaviour monoBehaviour = null;
         if (onEnd != null && ctrl.transform.parent != null)
         {
             monoBehaviour = ctrl.transform.parent.GetComponentInParent <MonoBehaviour>();
         }
         if (monoBehaviour != null)
         {
             monoBehaviour.StartCoroutine(Utility.Co_UIStateCloseFinished(ctrl, onEnd, EnableInput));
         }
         else
         {
             ctrl.gameObject.SetActive(false);
             if (EnableInput != null)
             {
                 EnableInput(true);
             }
             if (onEnd != null)
             {
                 onEnd();
             }
         }
     });
     ctrl.SetToUIState(stateName, false, allowToRefreshSameState);
 }
        // Token: 0x0601207C RID: 73852 RVA: 0x004A6A9C File Offset: 0x004A4C9C
        private void SetMissionInfo()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetMissionInfo_hotfix != null)
            {
                this.m_SetMissionInfo_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.m_titleText.text          = this.m_mission.Config.Title;
            this.m_descText.text           = this.m_mission.Config.Desc;
            GameObjectUtility.DestroyChildren(this.m_rewardListGo);
            GameObject assetInContainer = base.GetAssetInContainer <GameObject>("RewardItem");

            RewardGoodsUIController.CreateRewardGoodsList(this.m_mission.Config.Reward, this.m_rewardListGo.transform, assetInContainer, null, true, 0, false);
            int missionMaxProcess = this.playerCtx.GetMissionMaxProcess(this.m_mission);

            if (this.m_isMissionCompleted)
            {
                this.m_countText.text = UIUtility.AddColorTag(this.playerCtx.GetMissionCompleteProcess(this.m_mission) + "/" + missionMaxProcess, UIUtility.MyGreenColor);
            }
            else
            {
                this.m_countText.text = UIUtility.AddColorTag(this.playerCtx.GetMissionCompleteProcess(this.m_mission) + string.Empty, Color.red) + "/" + missionMaxProcess;
            }
            CommonUIStateController component = base.gameObject.GetComponent <CommonUIStateController>();

            if (this.m_isMissionFinished)
            {
                component.SetToUIState("Finished", false, true);
            }
            else if (this.m_isMissionCompleted)
            {
                component.SetToUIState("Get", false, true);
            }
            else
            {
                component.SetToUIState("PorgressBar", false, true);
                this.m_progressImg.fillAmount = (float)this.playerCtx.GetMissionCompleteProcess(this.m_mission) / (float)missionMaxProcess;
            }
            this.m_achievementIconGo.SetActive(this.m_mission.Config.MissionColumn == MissionColumnType.MissionColumnType_Achievements);
        }
        // Token: 0x0600FF4B RID: 65355 RVA: 0x0042FDF0 File Offset: 0x0042DFF0
        public void InitEquipmentBreakNeedItem(Goods goods)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitEquipmentBreakNeedItemGoods_hotfix != null)
            {
                this.m_InitEquipmentBreakNeedItemGoods_hotfix.call(new object[]
                {
                    this,
                    goods
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            CommonUIStateController component = base.gameObject.GetComponent <CommonUIStateController>();

            if (goods == null || goods.GoodsType != GoodsType.GoodsType_Item)
            {
                component.SetToUIState("NotHave", false, true);
                this.m_iconSSREffect.SetActive(false);
                this.m_goods = null;
                return;
            }
            component.SetToUIState("Have", false, true);
            this.m_goods = goods;
            IConfigDataLoader     configDataLoader      = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            ConfigDataItemInfo    configDataItemInfo    = configDataLoader.GetConfigDataItemInfo(goods.Id);

            this.m_icon.sprite   = AssetUtility.Instance.GetSprite(configDataItemInfo.Icon);
            this.m_iconBg.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsFrameNameByRank(configDataItemInfo.Rank));
            this.m_iconSSREffect.SetActive(UIUtility.IsRankSSR(configDataItemInfo.Rank));
            int bagItemCountByType = projectLPlayerContext.GetBagItemCountByType(goods.GoodsType, goods.Id);

            this.m_haveCount.text = bagItemCountByType.ToString();
            this.m_needCount.text = goods.Count.ToString();
            if (bagItemCountByType < goods.Count)
            {
                this.m_countStateCtrl.SetToUIState("Red", false, true);
            }
            else
            {
                this.m_countStateCtrl.SetToUIState("White", false, true);
            }
        }
示例#14
0
        // Token: 0x0600D75C RID: 55132 RVA: 0x003AA440 File Offset: 0x003A8640
        private void ShowPanel()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_ShowPanel_hotfix != null)
            {
                this.m_ShowPanel_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            base.gameObject.SetActive(true);
            CommonUIStateController component = base.gameObject.GetComponent <CommonUIStateController>();

            if (component != null)
            {
                component.SetToUIState("Show", false, true);
            }
        }
        // Token: 0x0601090F RID: 67855 RVA: 0x0044EC94 File Offset: 0x0044CE94
        private void CloseSkillDesc()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CloseSkillDesc_hotfix != null)
            {
                this.m_CloseSkillDesc_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            CommonUIStateController component = this.m_infoSkillDescGo.GetComponent <CommonUIStateController>();

            component.SetActionForUIStateFinshed("Close", delegate
            {
                this.m_infoSkillDescGo.SetActive(false);
                this.m_infoSkillDescLoadButton.gameObject.SetActive(false);
                this.m_infoSkillDescUnLoadButton.gameObject.SetActive(false);
            });
            component.SetToUIState("Close", false, true);
        }
        // Token: 0x06010910 RID: 67856 RVA: 0x0044ED28 File Offset: 0x0044CF28
        private void CloseSelectSkillPanel(Action onEnd)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CloseSelectSkillPanelAction_hotfix != null)
            {
                this.m_CloseSelectSkillPanelAction_hotfix.call(new object[]
                {
                    this,
                    onEnd2
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            Action onEnd = onEnd2;
            HeroDetailSelectSkillUIController $this     = this;
            CommonUIStateController           component = this.m_infoSelectSkillPanel.GetComponent <CommonUIStateController>();

            UIUtility.SetUIStateClose(component, "Close", delegate
            {
                onEnd();
                $this.CloseSkillDesc();
            }, false, true);
        }
        // Token: 0x06014D99 RID: 85401 RVA: 0x00548A24 File Offset: 0x00546C24
        public void SetEvent(ConfigDataEventInfo eventInfo)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetEventConfigDataEventInfo_hotfix != null)
            {
                this.m_SetEventConfigDataEventInfo_hotfix.call(new object[]
                {
                    this,
                    eventInfo
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            if (eventInfo == null)
            {
                return;
            }
            this.m_eventInfo = eventInfo;
            Vector2    v     = new Vector2(0f, (float)eventInfo.MapIconY);
            GameObject asset = AssetUtility.Instance.GetAsset <GameObject>(eventInfo.MapIcon);

            if (asset != null)
            {
                GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(asset);
                gameObject.transform.localPosition = v;
                gameObject.transform.SetParent(this.m_iconGameObject.transform, false);
                CommonUIStateController component = gameObject.GetComponent <CommonUIStateController>();
                if (component != null)
                {
                    component.SetToUIState("Standby", false, true);
                }
            }
            RectTransform rectTransform = this.m_hitGameObject.transform as RectTransform;

            rectTransform.sizeDelta = new Vector2(rectTransform.sizeDelta.x, v.y + 100f);
            this.SetEnergy(eventInfo.EnergySuccess);
            this.m_testText.gameObject.SetActive(LocalConfig.Instance.Data.IsDeveloper);
            this.m_testText.text = eventInfo.ID.ToString();
        }
示例#18
0
 // Token: 0x06012572 RID: 75122 RVA: 0x004B5D68 File Offset: 0x004B3F68
 public void ShowDrawRewardLevelEffect(int rewardLevel, bool isShow)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_ShowDrawRewardLevelEffectInt32Boolean_hotfix != null)
     {
         this.m_ShowDrawRewardLevelEffectInt32Boolean_hotfix.call(new object[]
         {
             this,
             rewardLevel,
             isShow
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     if (isShow)
     {
         CommonUIStateController levelEffectStateCtrlByLevel = this.GetLevelEffectStateCtrlByLevel(rewardLevel);
         UIUtility.SetUIStateOpen(levelEffectStateCtrlByLevel, "Show", null, true, true);
     }
     else
     {
         CommonUIStateController levelEffectStateCtrlByLevel2 = this.GetLevelEffectStateCtrlByLevel(rewardLevel);
         levelEffectStateCtrlByLevel2.SetToUIState("Close", false, true);
     }
 }
示例#19
0
        // Token: 0x0600951B RID: 38171 RVA: 0x002ACBA4 File Offset: 0x002AADA4
        public void Refresh()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_Refresh_hotfix != null)
            {
                this.m_Refresh_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ConfigDataEquipmentInfo equipmentInfo = this.m_equipmentInfoWrap.equipmentInfo;

            this.m_nameText.text    = equipmentInfo.Name;
            this.m_itemIamge.sprite = AssetUtility.Instance.GetSprite(equipmentInfo.Icon);
            CommonUIStateController component = this.m_itemIamge.GetComponent <CommonUIStateController>();

            if (this.m_equipmentInfoWrap.isUnlocked)
            {
                component.SetToUIState("Normal", false, true);
            }
            else
            {
                component.SetToUIState("Dark", false, true);
            }
            for (int i = 0; i < this.m_equipLimitContent.transform.childCount; i++)
            {
                this.m_equipLimitContent.transform.GetChild(i).gameObject.SetActive(false);
            }
            if (equipmentInfo.EquipCoditionDesc != string.Empty)
            {
                this.m_equipLimitGroupAnimation.SetToUIState("Unlimit", false, true);
                this.m_descEquipUnlimitText.text = equipmentInfo.EquipCoditionDesc;
            }
            else
            {
                List <int> armyIds = equipmentInfo.ArmyIds;
                if (armyIds.Count == 0)
                {
                    this.m_equipLimitGroupAnimation.SetToUIState("Unlimit", false, true);
                    this.m_descEquipUnlimitText.text = this.m_configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Msg_AllJobCanUse);
                }
                else if (armyIds[0] == -1)
                {
                    this.m_equipLimitGroupAnimation.SetToUIState("CanNotUse", false, true);
                }
                else
                {
                    this.m_equipLimitGroupAnimation.SetToUIState("EquipLimit", false, true);
                    for (int j = 0; j < armyIds.Count; j++)
                    {
                        ConfigDataArmyInfo configDataArmyInfo = this.m_configDataLoader.GetConfigDataArmyInfo(armyIds[j]);
                        if (j < this.m_equipLimitContent.transform.childCount)
                        {
                            Transform child = this.m_equipLimitContent.transform.GetChild(j);
                            child.GetChild(0).GetComponent <Image>().sprite = AssetUtility.Instance.GetSprite(configDataArmyInfo.Icon);
                            child.gameObject.SetActive(true);
                        }
                        else
                        {
                            GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.m_equipLimitContent.transform.GetChild(0).gameObject, this.m_equipLimitContent.transform, true);
                            gameObject.transform.GetChild(0).GetComponent <Image>().sprite = AssetUtility.Instance.GetSprite(configDataArmyInfo.Icon);
                            gameObject.SetActive(true);
                        }
                    }
                }
            }
            this.m_equipmentExplain.text = equipmentInfo.Desc;
            this.ClosePropDisplay();
            this.SetEquipmentPropItem(equipmentInfo.Property1_ID, equipmentInfo.Property1_Value);
            this.SetEquipmentPropItem(equipmentInfo.Property2_ID, equipmentInfo.Property2_Value);
            if (equipmentInfo.SkillIds.Count == 0)
            {
                this.m_skillAnimation.SetToUIState("NoSkill", false, true);
            }
            else
            {
                this.m_skillAnimation.SetToUIState("HaveSkill", false, true);
                string text = null;
                ConfigDataSkillInfo configDataSkillInfo = this.m_configDataLoader.GetConfigDataSkillInfo(UIUtility.GetSkillIdFromEquipment(equipmentInfo, 1, ref text));
                if (configDataSkillInfo != null)
                {
                    this.m_skillContentAnimation.SetToUIState("Grey", false, true);
                    if (equipmentInfo.SkillLevels.Count > 0)
                    {
                        if (equipmentInfo.SkillLevels[equipmentInfo.SkillLevels.Count - 1] > 1)
                        {
                            this.m_skillUnlockConditionText.text = string.Format(this.m_configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Msg_EnchantToLevel), equipmentInfo.SkillLevels[0]);
                        }
                        else
                        {
                            this.m_skillContentAnimation.SetToUIState("Normal", false, true);
                        }
                    }
                    this.m_skillNameText.text = configDataSkillInfo.Name;
                    this.m_skillDescText.text = configDataSkillInfo.Desc;
                    ConfigDataHeroInfo configDataHeroInfo = this.m_configDataLoader.GetConfigDataHeroInfo(equipmentInfo.SkillHero);
                    this.m_skillBelongText.gameObject.SetActive(configDataHeroInfo != null);
                    this.m_skillBelongBGText.SetActive(configDataHeroInfo != null);
                    if (configDataHeroInfo != null)
                    {
                        this.m_skillBelongText.text = configDataHeroInfo.Name + this.m_configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Equipment_SkillOwner);
                    }
                }
            }
        }
示例#20
0
        // Token: 0x0600D592 RID: 54674 RVA: 0x003A3CD0 File Offset: 0x003A1ED0
        private void InitRewardGoodsDescInfo(GoodsType goodsType, int goodsId, bool isNeedAutoClose)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitRewardGoodsDescInfoGoodsTypeInt32Boolean_hotfix != null)
            {
                this.m_InitRewardGoodsDescInfoGoodsTypeInt32Boolean_hotfix.call(new object[]
                {
                    this,
                    goodsType,
                    goodsId,
                    isNeedAutoClose
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.m_goodsType = goodsType;
            this.m_goodsId   = goodsId;
            GameObject gameObject  = Utility.FindChildGameObject(base.gameObject, "Item", true);
            GameObject gameObject2 = Utility.FindChildGameObject(base.gameObject, "Hero", true);
            Text       text        = null;
            GameObject gameObject3 = null;
            Text       text2;
            Text       text3;
            Image      image;
            GameObject gameObject4;

            if (this.m_goodsType != GoodsType.GoodsType_Hero)
            {
                gameObject.SetActive(true);
                gameObject2.SetActive(false);
                text2       = Utility.FindChildComponent <Text>(gameObject, "BG/ItemInfoGroup/NameText", true);
                text        = Utility.FindChildComponent <Text>(gameObject, "BG/ItemInfoGroup/Count/CountText", true);
                gameObject3 = Utility.FindChildGameObject(gameObject, "BG/ItemInfoGroup/Count", true);
                text3       = Utility.FindChildComponent <Text>(gameObject, "BG/BGImage/FrameImage/BottomImage2/Desc/Text", true);
                image       = Utility.FindChildComponent <Image>(gameObject, "BG/ItemInfoGroup/IconImage", true);
                gameObject4 = Utility.FindChildGameObject(gameObject, "BG/BGImage", true);
                GameObject gameObject5 = Utility.FindChildGameObject(image.gameObject, "U_crystal", true);
                if (gameObject5 != null)
                {
                    gameObject5.SetActive(this.m_goodsType == GoodsType.GoodsType_Crystal);
                }
                GameObject gameObject6 = Utility.FindChildGameObject(gameObject, "BG/ItemInfoGroup/SSRPieceEffect", true);
                if (gameObject6 != null)
                {
                    gameObject6.SetActive(UIUtility.IsGoodsHeroFragment(this.m_goodsType, this.m_goodsId) && UIUtility.IsRankSSR(UIUtility.GetGoodsRank(this.m_goodsType, this.m_goodsId)));
                }
            }
            else
            {
                gameObject.SetActive(false);
                gameObject2.SetActive(true);
                text2       = Utility.FindChildComponent <Text>(gameObject2, "NameText", true);
                text3       = Utility.FindChildComponent <Text>(gameObject2, "DescText", true);
                image       = Utility.FindChildComponent <Image>(gameObject2, "IconImage", true);
                gameObject4 = Utility.FindChildGameObject(gameObject2, "BG/BGImage", true);
            }
            if (gameObject4 != null)
            {
                PointDescComponent pointDescComponent = base.gameObject.GetComponent <PointDescComponent>();
                if (pointDescComponent == null)
                {
                    pointDescComponent = GameObjectUtility.AddControllerToGameObject <PointDescComponent>(base.gameObject);
                    PointDescComponent pointDescComponent2 = pointDescComponent;
                    GameObject         gameObject7         = base.gameObject;
                    GameObject         gameObject8         = gameObject4;
                    pointDescComponent2.SetGameObject(gameObject7, isNeedAutoClose, null, gameObject8);
                    pointDescComponent.EventOnClose += delegate()
                    {
                        this.ClosePanel();
                    };
                }
                else
                {
                    PointDescComponent pointDescComponent3 = pointDescComponent;
                    GameObject         gameObject8         = base.gameObject;
                    GameObject         gameObject7         = gameObject4;
                    pointDescComponent3.SetGameObject(gameObject8, isNeedAutoClose, null, gameObject7);
                }
                this.m_backgroundTransform = (gameObject4.transform as RectTransform);
            }
            if (text2 != null)
            {
                text2.text = UIUtility.GetGoodsName(this.m_goodsType, this.m_goodsId);
            }
            if (text3 != null)
            {
                text3.text = UIUtility.GetGoodsDesc(this.m_goodsType, this.m_goodsId);
            }
            if (image != null)
            {
                image.gameObject.SetActive(true);
                image.sprite   = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsIconName(this.m_goodsType, this.m_goodsId));
                image.material = AssetUtility.Instance.GetAsset <Material>(UIUtility.GetGoodsIconMaterialName(this.m_goodsType, this.m_goodsId));
            }
            if (gameObject3 != null)
            {
                bool flag = this.m_goodsType != GoodsType.GoodsType_Crystal && this.m_goodsType != GoodsType.GoodsType_Energy && this.m_goodsType != GoodsType.GoodsType_Gold && this.m_goodsType != GoodsType.GoodsType_PlayerExp && this.m_goodsType != GoodsType.GoodsType_MemoryEssence && this.m_goodsType != GoodsType.GoodsType_ArenaHonour && this.m_goodsType != GoodsType.GoodsType_MithralStone && this.m_goodsType != GoodsType.GoodsType_BrillianceMithralStone && this.m_goodsType != GoodsType.GoodsType_FriendshipPoints;
                if (this.m_goodsType == GoodsType.GoodsType_Item)
                {
                    IConfigDataLoader  configDataLoader   = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
                    ConfigDataItemInfo configDataItemInfo = configDataLoader.GetConfigDataItemInfo(goodsId);
                    if (configDataItemInfo.FuncType == ItemFuncType.ItemFuncType_RandomBox || configDataItemInfo.FuncType == ItemFuncType.ItemFuncType_StaticBox)
                    {
                        flag = false;
                    }
                    else if (configDataItemInfo.DisplayType == ItemDisplayType.ItemDisplayType_Goblin || configDataItemInfo.DisplayType == ItemDisplayType.ItemDisplayType_UnchartedScore)
                    {
                        flag = false;
                    }
                }
                if (flag)
                {
                    gameObject3.SetActive(true);
                    CommonUIStateController component = gameObject3.GetComponent <CommonUIStateController>();
                    if (this.m_goodsType == GoodsType.GoodsType_Equipment)
                    {
                        component.SetToUIState("EquipInfo", false, true);
                        this.SetEquipmentPropInfo(this.m_goodsId);
                    }
                    else
                    {
                        component.SetToUIState("Count", false, true);
                        if (text != null)
                        {
                            text.text = UIUtility.GetGoodsCount(this.m_goodsType, this.m_goodsId).ToString();
                        }
                    }
                }
                else
                {
                    gameObject3.SetActive(false);
                }
            }
        }
示例#21
0
        // Token: 0x06009667 RID: 38503 RVA: 0x002B07C4 File Offset: 0x002AE9C4
        protected override void OnBindFiledsCompleted()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OnBindFiledsCompleted_hotfix != null)
            {
                this.m_OnBindFiledsCompleted_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            base.OnBindFiledsCompleted();
            this.m_playerContext = (GameManager.Instance.PlayerContext as ProjectLPlayerContext);
            this.m_returnButton.onClick.AddListener(new UnityAction(this.OnReturnClick));
            this.m_ssrToggle.onValueChanged.AddListener(delegate(bool isSelect)
            {
                if (isSelect)
                {
                    this.SwitchRankShowClick(this.m_ssrToggle.gameObject);
                }
            });
            this.m_srToggle.onValueChanged.AddListener(delegate(bool isSelect)
            {
                if (isSelect)
                {
                    this.SwitchRankShowClick(this.m_srToggle.gameObject);
                }
            });
            this.m_rToggle.onValueChanged.AddListener(delegate(bool isSelect)
            {
                if (isSelect)
                {
                    this.SwitchRankShowClick(this.m_rToggle.gameObject);
                }
            });
            GameObject asset      = this.m_resourceContainer.GetAsset <GameObject>("ShareButton");
            GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(asset);

            gameObject.transform.SetParent(this.m_shareButtonDummy.transform, false);
            this.m_weiBoButton  = GameObjectUtility.FindComponentByName <Button>(gameObject.transform, "WeiBoButton");
            this.m_weChatButton = GameObjectUtility.FindComponentByName <Button>(gameObject.transform, "WeChatButton");
            CommonUIStateController commonUIStateController = gameObject.GetComponent <CommonUIStateController>();

            if (commonUIStateController != null)
            {
                commonUIStateController.SetToUIState("BgOff", false, true);
            }
            asset      = this.m_resourceContainer.GetAsset <GameObject>("SharePhoto");
            gameObject = UnityEngine.Object.Instantiate <GameObject>(asset);
            gameObject.transform.SetParent(this.m_sharePhotoDummy.transform, false);
            commonUIStateController = gameObject.GetComponentInChildren <CommonUIStateController>();
            if (commonUIStateController != null)
            {
                commonUIStateController.SetToUIState("Normal", false, true);
            }
            this.m_nameText       = GameObjectUtility.FindComponentByName <Text>(gameObject.transform, "NameText");
            this.m_lvText         = GameObjectUtility.FindComponentByName <Text>(gameObject.transform, "LvValueText");
            this.m_serverNameText = GameObjectUtility.FindComponentByName <Text>(gameObject.transform, "ServerNameText");
            this.m_weiBoButton.onClick.AddListener(new UnityAction(this.OnWeiBoClick));
            this.m_weChatButton.onClick.AddListener(new UnityAction(this.OnWeChatClick));
            this.m_nameText.text       = this.m_playerContext.GetPlayerName();
            this.m_lvText.text         = this.m_playerContext.GetPlayerLevel().ToString();
            this.m_serverNameText.text = LoginUITask.GetCurrentSelectServerInfo().m_name;
            this.m_sharePhotoDummy.SetActive(false);
            this.m_herosRGameObject.SetActive(false);
            this.m_herosSRGameObject.SetActive(false);
            this.m_herosSSRGameObject.SetActive(false);
        }