Esempio n. 1
0
        // Token: 0x0600F785 RID: 63365 RVA: 0x00416164 File Offset: 0x00414364
        public void InitGuildMassiveCombatLastHeroInfo(Hero hero, bool isUsed, bool isPowerUp)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitGuildMassiveCombatLastHeroInfoHeroBooleanBoolean_hotfix != null)
            {
                this.m_InitGuildMassiveCombatLastHeroInfoHeroBooleanBoolean_hotfix.call(new object[]
                {
                    this,
                    hero,
                    isUsed,
                    isPowerUp
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            base.gameObject.SetActive(true);
            this.m_stateCtrl.SetToUIState((!isUsed) ? "Normal" : "Dark", false, true);
            this.m_powerUpGo.SetActive(isPowerUp);
            ConfigDataCharImageInfo charImageInfo = hero.HeroInfo.GetCharImageInfo(hero.StarLevel);

            if (charImageInfo != null)
            {
                this.m_heroIcon.sprite = AssetUtility.Instance.GetSprite(charImageInfo.RoundHeadImage);
            }
            ConfigDataArmyInfo armyInfo = hero.GetActiveJob().JobConnectionInfo.m_jobInfo.m_armyInfo;

            this.m_armyIcon.sprite = AssetUtility.Instance.GetSprite(armyInfo.Icon);
            this.m_levelText.text  = hero.Level.ToString();
        }
        // Token: 0x0600997C RID: 39292 RVA: 0x002BD258 File Offset: 0x002BB458
        public void SetHero(BattleHero hero)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetHeroBattleHero_hotfix != null)
            {
                this.m_SetHeroBattleHero_hotfix.call(new object[]
                {
                    this,
                    hero
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.m_hero = hero;
            if (hero == null)
            {
                return;
            }
            ConfigDataCharImageInfo charImageInfo = hero.HeroInfo.GetCharImageInfo(hero.StarLevel);

            if (charImageInfo != null)
            {
                this.m_heroIconImage.sprite = AssetUtility.Instance.GetSprite(charImageInfo.RoundHeadImage);
            }
            ConfigDataArmyInfo armyInfo = hero.GetActiveJob().JobConnectionInfo.m_jobInfo.m_armyInfo;

            this.m_armyIconImage.sprite = AssetUtility.Instance.GetSprite(armyInfo.Icon);
        }
Esempio n. 3
0
        // Token: 0x0600BE21 RID: 48673 RVA: 0x003522C0 File Offset: 0x003504C0
        public void SetHeroListItemInfo(ARHeroListUIController.HeroWrap heroWrap)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetHeroListItemInfoHeroWrap_hotfix != null)
            {
                this.m_SetHeroListItemInfoHeroWrap_hotfix.call(new object[]
                {
                    this,
                    heroWrap
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            Hero hero = heroWrap.hero;

            if (hero.HeroInfo != null)
            {
                this.m_heroWrap = heroWrap;
                ConfigDataCharImageInfo charImageInfo = hero.HeroInfo.GetCharImageInfo(hero.StarLevel);
                if (charImageInfo != null)
                {
                    this.m_heroIconImg.sprite = AssetUtility.Instance.GetSprite(AssetUtility.MakeSpriteAssetName(charImageInfo.CardHeadImage, "_1"));
                }
                ConfigDataArmyInfo configDataArmyInfo = this.m_configDataLoader.GetConfigDataArmyInfo(hero.GetActiveJob().JobConnectionInfo.m_jobInfo.Army_ID);
                this.m_heroTypeImg.sprite  = AssetUtility.Instance.GetSprite(configDataArmyInfo.Icon);
                this.m_heroLvText.text     = hero.Level.ToString();
                this.m_heroFrameImg.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetHeroItemFrameNameByRank(hero.HeroInfo.GetRank(hero.StarLevel)));
                this.m_heroSSRFrameEffect.SetActive(hero.HeroInfo.GetRank(hero.StarLevel) >= 4);
                UIUtility.SetGameObjectChildrenActiveCount(this.m_heroStar, hero.StarLevel);
                base.gameObject.SetActive(true);
                this.RefreshHeroSelect();
            }
        }
Esempio n. 4
0
 // Token: 0x0600A6A6 RID: 42662 RVA: 0x002EBB68 File Offset: 0x002E9D68
 public void SetArmyInfo(ConfigDataArmyInfo armyInfo)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetArmyInfoConfigDataArmyInfo_hotfix != null)
     {
         this.m_SetArmyInfoConfigDataArmyInfo_hotfix.call(new object[]
         {
             this,
             armyInfo
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     if (armyInfo == null)
     {
         return;
     }
     this.m_armyIconImage.sprite = AssetUtility.Instance.GetSprite(armyInfo.Icon);
 }
        // Token: 0x0600C209 RID: 49673 RVA: 0x0035E680 File Offset: 0x0035C880
        public void SetHeroListItemInfo(Hero hero, BusinessCard businessCard)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetHeroListItemInfoHeroBusinessCard_hotfix != null)
            {
                this.m_SetHeroListItemInfoHeroBusinessCard_hotfix.call(new object[]
                {
                    this,
                    hero2,
                    businessCard
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            Hero hero = hero2;

            if (hero.HeroInfo != null)
            {
                this.m_hero = hero;
                ConfigDataCharImageInfo charImageInfo = hero.HeroInfo.GetCharImageInfo(hero.StarLevel);
                if (charImageInfo != null)
                {
                    this.m_heroIconImg.sprite = AssetUtility.Instance.GetSprite(AssetUtility.MakeSpriteAssetName(charImageInfo.CardHeadImage, "_1"));
                }
                ConfigDataArmyInfo configDataArmyInfo = this.m_configDataLoader.GetConfigDataArmyInfo(hero.GetActiveJob().JobConnectionInfo.m_jobInfo.Army_ID);
                this.m_heroTypeImg.sprite  = AssetUtility.Instance.GetSprite(configDataArmyInfo.Icon);
                this.m_heroLvText.text     = hero.Level.ToString();
                this.m_heroFrameImg.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetHeroItemFrameNameByRank(hero.HeroInfo.GetRank(hero.StarLevel)));
                this.m_heroSSRFrameEffect.SetActive(hero.HeroInfo.GetRank(hero.StarLevel) >= 4);
                UIUtility.SetGameObjectChildrenActiveCount(this.m_heroStar, hero.StarLevel);
                int num = businessCard.SetInfo.Heroes.FindIndex((BusinessCardHeroSet i) => i.HeroId == hero.HeroId);
                if (num >= 0)
                {
                    this.m_heroPositionIndex  = businessCard.SetInfo.Heroes[num].PositionIndex;
                    this.m_heroIndexText.text = (businessCard.SetInfo.Heroes[num].PositionIndex + 1).ToString();
                    this.m_heroItemUIStateController.SetToUIState("Select", false, true);
                }
                else
                {
                    this.m_heroItemUIStateController.SetToUIState("Normal", false, true);
                }
                base.gameObject.SetActive(true);
            }
        }
Esempio n. 6
0
        // Token: 0x0600DF64 RID: 57188 RVA: 0x003C4DC4 File Offset: 0x003C2FC4
        public void InitTrainingHeroItem(Hero hero, bool isAchivementUp)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitTrainingHeroItemHeroBoolean_hotfix != null)
            {
                this.m_InitTrainingHeroItemHeroBoolean_hotfix.call(new object[]
                {
                    this,
                    hero,
                    isAchivementUp
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.m_hero            = hero;
            this.m_heroLvText.text = hero.Level.ToString();
            UIUtility.SetGameObjectChildrenActiveCount(this.m_heroStar, hero.StarLevel);
            ConfigDataCharImageInfo charImageInfo = hero.HeroInfo.GetCharImageInfo(hero.StarLevel);

            if (charImageInfo != null)
            {
                this.m_heroIconImg.sprite = AssetUtility.Instance.GetSprite(AssetUtility.MakeSpriteAssetName(charImageInfo.CardHeadImage, "_1"));
            }
            IConfigDataLoader  configDataLoader   = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            ConfigDataArmyInfo configDataArmyInfo = configDataLoader.GetConfigDataArmyInfo(hero.GetActiveJob().JobConnectionInfo.m_jobInfo.Army_ID);

            this.m_heroTypeImg.sprite = AssetUtility.Instance.GetSprite(configDataArmyInfo.Icon);
            this.m_frameImg.sprite    = AssetUtility.Instance.GetSprite(UIUtility.GetHeroItemFrameNameByRank(hero.HeroInfo.GetRank(hero.StarLevel)));
            this.m_ssrFrameEffect.SetActive(hero.HeroInfo.GetRank(hero.StarLevel) >= 4);
            this.m_achivementUpImage.SetActive(isAchivementUp);
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;

            if (!projectLPlayerContext.IsHeroAssigned(this.m_hero.HeroId))
            {
                this.m_uiStateCtrl.SetToUIState("Normal", false, true);
            }
            else
            {
                this.m_uiStateCtrl.SetToUIState("Assistant", false, true);
            }
        }
Esempio n. 7
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);
                    }
                }
            }
        }
        // Token: 0x06010AF5 RID: 68341 RVA: 0x00454E98 File Offset: 0x00453098
        private void InitValuesInHeroItem(int lvText = 1, int starNum = 1, int curNum = 0, int totalNum = 1, int state = 0)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitValuesInHeroItemInt32Int32Int32Int32Int32_hotfix != null)
            {
                this.m_InitValuesInHeroItemInt32Int32Int32Int32Int32_hotfix.call(new object[]
                {
                    this,
                    lvText,
                    starNum,
                    curNum,
                    totalNum,
                    state
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            if (this.m_hero.HeroInfo != null)
            {
                ConfigDataCharImageInfo charImageInfo = this.m_hero.HeroInfo.GetCharImageInfo(this.m_hero.StarLevel);
                if (charImageInfo != null)
                {
                    this.m_heroIconImg.sprite = AssetUtility.Instance.GetSprite(AssetUtility.MakeSpriteAssetName(charImageInfo.CardHeadImage, "_1"));
                }
                IConfigDataLoader  configDataLoader   = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
                ConfigDataArmyInfo configDataArmyInfo = configDataLoader.GetConfigDataArmyInfo(this.m_hero.GetActiveJob().JobConnectionInfo.m_jobInfo.Army_ID);
                this.m_heroTypeImg.sprite = AssetUtility.Instance.GetSprite(configDataArmyInfo.Icon);
            }
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;

            if (state != 0)
            {
                if (state == 1)
                {
                    if (curNum >= totalNum)
                    {
                        this.m_uiStateCtrl.SetToUIState("NotGetAndGlowing", false, true);
                        this.m_curHeroItemState = HeroItemUIController.HeroItemState.NotGetAndGlowing;
                    }
                    else
                    {
                        this.m_uiStateCtrl.SetToUIState("NotGet", false, true);
                        this.m_curHeroItemState = HeroItemUIController.HeroItemState.NotGet;
                    }
                    this.m_heroCollectProgressText.text      = curNum + "/" + totalNum;
                    this.m_heroCollectProgressImg.fillAmount = (float)curNum / (float)totalNum;
                    this.m_heroIconImg.color = Color.gray;
                    this.m_redMark.gameObject.SetActive(curNum >= totalNum);
                }
            }
            else
            {
                this.m_uiStateCtrl.SetToUIState("Get", false, true);
                this.m_curHeroItemState = HeroItemUIController.HeroItemState.Get;
                this.m_heroLvText.text  = lvText.ToString();
                UIUtility.SetGameObjectChildrenActiveCount(this.m_heroStar, starNum);
                this.m_frameImg.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetHeroItemFrameNameByRank(this.m_hero.HeroInfo.GetRank(this.m_hero.StarLevel)));
                this.m_ssrFrameEffect.SetActive(this.m_hero.HeroInfo.GetRank(this.m_hero.StarLevel) >= 4);
                if (projectLPlayerContext.IsHeroShowRedMark(this.m_hero.HeroId, this.m_hero.GetActiveJob().JobConnectionInfo.ID))
                {
                    this.m_redMark.gameObject.SetActive(true);
                }
                else
                {
                    this.m_redMark.gameObject.SetActive(false);
                }
            }
        }