// Token: 0x0600497E RID: 18814 RVA: 0x0016ED68 File Offset: 0x0016CF68
        public void ApplyTrainingTechToHero(Hero hero, TrainingTech tech)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_ApplyTrainingTechToHeroHeroTrainingTech_hotfix != null)
            {
                this.m_ApplyTrainingTechToHeroHeroTrainingTech_hotfix.call(new object[]
                {
                    this,
                    hero,
                    tech
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            if (tech == null || tech.Level == 0)
            {
                return;
            }
            ConfigDataHeroInfo configDataHeroInfo = this.m_configDataLoader.GetConfigDataHeroInfo(hero.HeroId);

            if (configDataHeroInfo == null)
            {
                return;
            }
            TrainingTechInfo trainingTechInfo = tech.Infos[tech.Level - 1];

            if (configDataHeroInfo.TechCanLearnSoldiers_ID.Contains(trainingTechInfo.SoldierIDUnlocked) && !hero.HasOwnSoldier(trainingTechInfo.SoldierIDUnlocked))
            {
                this.m_hero.AddSoldier(hero, trainingTechInfo.SoldierIDUnlocked, true);
            }
        }
        // Token: 0x06012672 RID: 75378 RVA: 0x004B9BA8 File Offset: 0x004B7DA8
        protected void UpdateSelfRankInfo()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_UpdateSelfRankInfo_hotfix != null)
            {
                this.m_UpdateSelfRankInfo_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            string heroName = string.Empty;

            if (this.m_cachedRankList.Type == RankingListType.ChampionHero)
            {
                IConfigDataLoader  configDataLoader   = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
                ConfigDataHeroInfo configDataHeroInfo = configDataLoader.GetConfigDataHeroInfo(this.m_cachedRankList.ChampionHeroId);
                if (configDataHeroInfo != null)
                {
                    heroName = configDataHeroInfo.Name;
                }
            }
            this.SelfRankItemUICtrl.UpdateItemInfo(this.m_cachedRankList.Type, projectLPlayerContext.GetPlayerHeadIcon(), this.m_cachedRankList.CurrRank, projectLPlayerContext.GetPlayerLevel(), projectLPlayerContext.GetPlayerName(), this.m_cachedRankList.Score, heroName);
            this.SelfRankItemUICtrl.UpdateCompareInfo(this.m_cachedRankList.LastRank, this.m_cachedRankList.CurrRank);
        }
Beispiel #3
0
        // Token: 0x06003B15 RID: 15125 RVA: 0x0010D7B0 File Offset: 0x0010B9B0
        public static BattleHero CreateDefaultConfigBattleHero(ConfigDataHeroInfo heroInfo)
        {
            if (heroInfo == null)
            {
                return(null);
            }
            BattleHero battleHero = new BattleHero();

            battleHero.HeroId = heroInfo.ID;
            battleHero.ActiveHeroJobRelatedId = heroInfo.JobConnection_ID;
            battleHero.Level     = 1;
            battleHero.StarLevel = heroInfo.Star;
            BattleHeroJob battleHeroJob = new BattleHeroJob();

            battleHeroJob.JobRelatedId = heroInfo.JobConnection_ID;
            battleHeroJob.JobLevel     = 0;
            battleHero.Jobs.Add(battleHeroJob);
            battleHero.SelectedSoldierId = heroInfo.Soldier_ID;
            int num = 0;

            while (num < heroInfo.Skills_ID.Count && num < 3)
            {
                battleHero.SelectedSkillList.Add(heroInfo.Skills_ID[num]);
                num++;
            }
            return(battleHero);
        }
        // Token: 0x060132C9 RID: 78537 RVA: 0x004E2CFC File Offset: 0x004E0EFC
        public void SetHeroSkinItemInfo(FixedStoreItem fixedStoreItem)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetHeroSkinItemInfoFixedStoreItem_hotfix != null)
            {
                this.m_SetHeroSkinItemInfoFixedStoreItem_hotfix.call(new object[]
                {
                    this,
                    fixedStoreItem
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ConfigDataFixedStoreItemInfo configDataFixedStoreItemInfo = this.m_configDataLoader.GetConfigDataFixedStoreItemInfo(fixedStoreItem.Id);

            if (configDataFixedStoreItemInfo != null && configDataFixedStoreItemInfo.ItemType == GoodsType.GoodsType_HeroSkin)
            {
                this.m_storeItemConfig = configDataFixedStoreItemInfo;
                this.m_storeType       = StoreType.StoreType_Static;
                ConfigDataHeroSkinInfo configDataHeroSkinInfo = this.m_configDataLoader.GetConfigDataHeroSkinInfo(this.m_storeItemConfig.ItemId);
                ConfigDataCharImageSkinResourceInfo configDataCharImageSkinResourceInfo = this.m_configDataLoader.GetConfigDataCharImageSkinResourceInfo(configDataHeroSkinInfo.CharImageSkinResource_ID);
                this.m_heroSkinIcon.sprite = AssetUtility.Instance.GetSprite(configDataCharImageSkinResourceInfo.Image);
                ConfigDataHeroInfo configDataHeroInfo = this.m_configDataLoader.GetConfigDataHeroInfo(configDataHeroSkinInfo.SpecifiedHero);
                this.m_heroName.text  = configDataHeroInfo.Name;
                this.m_skinName.text  = this.m_storeItemConfig.Name;
                this.m_priceText.text = this.m_storeItemConfig.NormalPrice.ToString();
                this.SetItemState();
                base.gameObject.SetActive(true);
            }
        }
        // Token: 0x06012673 RID: 75379 RVA: 0x004B9CC0 File Offset: 0x004B7EC0
        protected void OnRankItemFill(UIControllerBase itemCtrl)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OnRankItemFillUIControllerBase_hotfix != null)
            {
                this.m_OnRankItemFillUIControllerBase_hotfix.call(new object[]
                {
                    this,
                    itemCtrl
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            RankingListItemUIController rankingListItemUIController = itemCtrl as RankingListItemUIController;
            int itemIndex = rankingListItemUIController.GetItemIndex();

            if (itemIndex >= this.m_cachedRankList.PlayerList.Count)
            {
                return;
            }
            RankingTargetPlayerInfo rankingTargetPlayerInfo = this.m_cachedRankList.PlayerList[itemIndex];
            string heroName = string.Empty;

            if (this.m_cachedRankList.Type == RankingListType.ChampionHero)
            {
                IConfigDataLoader  configDataLoader   = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
                ConfigDataHeroInfo configDataHeroInfo = configDataLoader.GetConfigDataHeroInfo(rankingTargetPlayerInfo.PlayerInfo.ChampionHeroId);
                if (configDataHeroInfo != null)
                {
                    heroName = configDataHeroInfo.Name;
                }
            }
            rankingListItemUIController.UpdateItemInfo(this.m_cachedRankList.Type, rankingTargetPlayerInfo.PlayerInfo.HeadIcon, itemIndex + 1, rankingTargetPlayerInfo.PlayerInfo.Level, rankingTargetPlayerInfo.PlayerInfo.Name, rankingTargetPlayerInfo.Score, heroName);
        }
        // Token: 0x0600A2F2 RID: 41714 RVA: 0x002DE7CC File Offset: 0x002DC9CC
        private void SetItemStateByType(GoodsType type)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetItemStateByTypeGoodsType_hotfix != null)
            {
                this.m_SetItemStateByTypeGoodsType_hotfix.call(new object[]
                {
                    this,
                    type
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            switch (type)
            {
            case GoodsType.GoodsType_JobMaterial:
                break;

            case GoodsType.GoodsType_Item:
                if (this.m_itemInfo.DisplayType == ItemDisplayType.ItemDisplayType_HeroFragment)
                {
                    this.m_iconImage.transform.localScale = new Vector3(1.3f, 1.3f);
                    this.m_bgImage.gameObject.SetActive(false);
                }
                break;

            case GoodsType.GoodsType_Equipment:
            {
                ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
                IConfigDataLoader     configDataLoader      = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
                EquipmentBagItem      equipmentBagItem      = (EquipmentBagItem)this.BagItem;
                int wearedEquipmentHeroIdByEquipmentId      = projectLPlayerContext.GetWearedEquipmentHeroIdByEquipmentId(equipmentBagItem.InstanceId);
                if (wearedEquipmentHeroIdByEquipmentId > 0)
                {
                    ConfigDataHeroInfo      configDataHeroInfo = configDataLoader.GetConfigDataHeroInfo(wearedEquipmentHeroIdByEquipmentId);
                    ConfigDataCharImageInfo charImageInfo      = configDataHeroInfo.GetCharImageInfo(configDataHeroInfo.Star);
                    if (charImageInfo != null)
                    {
                        this.m_equipingTagHeadIcon.sprite = AssetUtility.Instance.GetSprite(charImageInfo.SmallHeadImage);
                    }
                }
                this.m_equipingTag.SetActive(wearedEquipmentHeroIdByEquipmentId > 0);
                UIUtility.SetGameObjectChildrenActiveCount(this.m_starGroup, equipmentBagItem.StarLevel);
                this.m_lvValueText.text = equipmentBagItem.Level.ToString();
                this.m_lockImage.SetActive(equipmentBagItem.Locked);
                this.m_enchantmentIcon.gameObject.SetActive(equipmentBagItem.IsEnchant());
                if (equipmentBagItem.IsEnchant())
                {
                    ConfigDataResonanceInfo configDataResonanceInfo = configDataLoader.GetConfigDataResonanceInfo(equipmentBagItem.ResonanceId);
                    this.m_enchantmentIcon.sprite = AssetUtility.Instance.GetSprite(configDataResonanceInfo.SmallIcon);
                }
                break;
            }

            default:
                if (type != GoodsType.GoodsType_EnchantStone)
                {
                }
                break;
            }
        }
Beispiel #7
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: 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();
 }
Beispiel #9
0
 // Token: 0x06003790 RID: 14224 RVA: 0x000FA21C File Offset: 0x000F841C
 public void OnActorCastSkill(CombatActor a, ConfigDataSkillInfo skillInfo)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OnActorCastSkillCombatActorConfigDataSkillInfo_hotfix != null)
     {
         this.m_OnActorCastSkillCombatActorConfigDataSkillInfo_hotfix.call(new object[]
         {
             this,
             a,
             skillInfo
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     if (a == null || skillInfo == null)
     {
         return;
     }
     if (skillInfo.CutsceneType != 0)
     {
         ConfigDataCutsceneInfo configDataCutsceneInfo = null;
         if (skillInfo.CutsceneType == 1)
         {
             ConfigDataHeroInfo heroInfo = a.Team.HeroInfo;
             if (heroInfo != null)
             {
                 ConfigDataCharImageInfo charImageInfo = heroInfo.GetCharImageInfo(a.Team.HeroStar);
                 if (charImageInfo != null)
                 {
                     configDataCutsceneInfo = charImageInfo.m_skillCutsceneInfo;
                 }
             }
         }
         this.Pause(true);
         this.m_teams[a.TeamNumber].SetGraphicSkillFade(true);
         if (configDataCutsceneInfo != null)
         {
             this.m_cutscenePauseCountdown = Combat.MillisecondToFrame1(configDataCutsceneInfo.Time);
         }
         else
         {
             this.m_cutscenePauseCountdown = Combat.MillisecondToFrame1(this.ConfigDataLoader.Const_SkillPauseTime);
         }
         this.m_battle.Listener.OnStartSkillCutscene(skillInfo, configDataCutsceneInfo, a.TeamNumber);
     }
 }
Beispiel #10
0
        // Token: 0x06009618 RID: 38424 RVA: 0x002AFAD8 File Offset: 0x002ADCD8
        public void Refresh(ConfigDataHeroInfo heroInfo)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_RefreshConfigDataHeroInfo_hotfix != null)
            {
                this.m_RefreshConfigDataHeroInfo_hotfix.call(new object[]
                {
                    this,
                    heroInfo
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ConfigDataCharImageInfo charImageInfo = heroInfo.GetCharImageInfo(heroInfo.Star);

            this.m_ssrGameObject.SetActive(false);
            this.m_srGameObject.SetActive(false);
            this.m_rGameObject.SetActive(false);
            switch (heroInfo.Rank)
            {
            case 1:
                this.m_rGameObject.SetActive(true);
                break;

            case 2:
                this.m_rGameObject.SetActive(true);
                break;

            case 3:
                this.m_srGameObject.SetActive(true);
                break;

            case 4:
                this.m_ssrGameObject.SetActive(true);
                break;
            }
            this.m_heroNameText.text = heroInfo.Name;
            if (this.m_heroEnglishNameText != null)
            {
                this.m_heroEnglishNameText.text = heroInfo.Name_Eng;
            }
            this.m_cvNameText.text = "CV:" + charImageInfo.CVName;
        }
        // Token: 0x060148ED RID: 84205 RVA: 0x00537484 File Offset: 0x00535684
        public void SetHero(int heroId)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetHeroInt32_hotfix != null)
            {
                this.m_SetHeroInt32_hotfix.call(new object[]
                {
                    this,
                    heroId
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.m_heroId = heroId;
            IConfigDataLoader  configDataLoader   = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            ConfigDataHeroInfo configDataHeroInfo = configDataLoader.GetConfigDataHeroInfo(heroId);

            if (configDataHeroInfo != null)
            {
                this.m_iconImage.sprite = AssetUtility.Instance.GetSprite(configDataHeroInfo.m_charImageInfo.SummonHeadImage);
            }
        }
Beispiel #12
0
 // Token: 0x06003B1B RID: 15131 RVA: 0x0010DFE4 File Offset: 0x0010C1E4
 public static int AppendPveMyNpcBattleActorSetups(IConfigDataLoader configDataLoader, ConfigDataBattleInfo battleInfo, int monsterLevel, List <BattleActorSetup> actors)
 {
     for (int i = 0; i < battleInfo.NpcActors.Count; i++)
     {
         BattlePosActor battlePosActor = battleInfo.NpcActors[i];
         int            id             = battlePosActor.ID;
         int            num            = battlePosActor.Level;
         int            behaviorId     = 0;
         if (battleInfo.NpcActorsBehavior.Count > i)
         {
             behaviorId = battleInfo.NpcActorsBehavior[i];
         }
         int groupId = 0;
         if (battleInfo.NpcGroups.Count > i)
         {
             groupId = battleInfo.NpcGroups[i];
         }
         if (num == 0)
         {
             num = monsterLevel;
         }
         ConfigDataHeroInfo configDataHeroInfo = configDataLoader.GetConfigDataHeroInfo(id);
         if (configDataHeroInfo == null)
         {
             return(-618);
         }
         BattleHero       hero             = BattleUtility.CreateDefaultConfigBattleHero(configDataHeroInfo);
         BattleActorSetup battleActorSetup = BattleUtility.CreateBattleActorSetupFromBattleHero(configDataLoader, hero, num, behaviorId, groupId);
         battleActorSetup.Position.x = battlePosActor.X;
         battleActorSetup.Position.y = battlePosActor.Y;
         battleActorSetup.Direction  = 0;
         if (battleInfo.NpcDirs.Count > i)
         {
             battleActorSetup.Direction = battleInfo.NpcDirs[i];
         }
         battleActorSetup.IsNpc = true;
         actors.Add(battleActorSetup);
     }
     return(0);
 }
        // Token: 0x0600905A RID: 36954 RVA: 0x0029F124 File Offset: 0x0029D324
        protected override bool IsNeedLoadDynamicRes()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_IsNeedLoadDynamicRes_hotfix != null)
            {
                return(Convert.ToBoolean(this.m_IsNeedLoadDynamicRes_hotfix.call(new object[]
                {
                    this
                })));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            base.ClearAssetList();
            IConfigDataLoader       configDataLoader   = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            ConfigDataHeroInfo      configDataHeroInfo = configDataLoader.GetConfigDataHeroInfo(14);
            ConfigDataCharImageInfo charImageInfo      = configDataHeroInfo.GetCharImageInfo(configDataHeroInfo.Star);

            if (charImageInfo != null)
            {
                base.CollectAsset(charImageInfo.Spine);
                base.CollectSpriteAsset(charImageInfo.Image);
            }
            return(base.IsNeedLoadDynamicRes());
        }
        // Token: 0x06013111 RID: 78097 RVA: 0x004DD910 File Offset: 0x004DBB10
        private int Compare(int leftHeroID, int rightHeroID)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CompareInt32Int32_hotfix != null)
            {
                return(Convert.ToInt32(this.m_CompareInt32Int32_hotfix.call(new object[]
                {
                    this,
                    leftHeroID,
                    rightHeroID
                })));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ConfigDataHeroInfo configDataHeroInfo  = this.m_configDataLoader.GetConfigDataHeroInfo(leftHeroID);
            ConfigDataHeroInfo configDataHeroInfo2 = this.m_configDataLoader.GetConfigDataHeroInfo(rightHeroID);
            int num = configDataHeroInfo2.Rank - configDataHeroInfo.Rank;

            if (num != 0)
            {
                return(num);
            }
            return(configDataHeroInfo2.ID - configDataHeroInfo.ID);
        }
        // Token: 0x0601071B RID: 67355 RVA: 0x00448BF8 File Offset: 0x00446DF8
        public void InitTagHeroIconItem(int heroId)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitTagHeroIconItemInt32_hotfix != null)
            {
                this.m_InitTagHeroIconItemInt32_hotfix.call(new object[]
                {
                    this,
                    heroId
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            base.gameObject.SetActive(true);
            this.m_heroId = heroId;
            IConfigDataLoader  configDataLoader   = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            ConfigDataHeroInfo configDataHeroInfo = configDataLoader.GetConfigDataHeroInfo(heroId);

            this.m_iconImg.sprite = AssetUtility.Instance.GetSprite(configDataHeroInfo.m_charImageInfo.SmallHeadImage);
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            bool flag = projectLPlayerContext.GetHero(heroId) != null;

            this.m_iconImg.color = ((!flag) ? Color.gray : Color.white);
        }
 // Token: 0x06004973 RID: 18803 RVA: 0x0016E29C File Offset: 0x0016C49C
 public virtual void PostDeSerialize()
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_PostDeSerialize_hotfix != null)
     {
         this.m_PostDeSerialize_hotfix.call(new object[]
         {
             this
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     foreach (TrainingTechInfo trainingTechInfo in this.m_trainingGroundDS.TrainingGround.IterateAvailableTechInfos())
     {
         foreach (Hero hero in this.m_hero.GetAllHeros())
         {
             ConfigDataHeroInfo configDataHeroInfo = this.m_configDataLoader.GetConfigDataHeroInfo(hero.HeroId);
             if (configDataHeroInfo != null && configDataHeroInfo.TechCanLearnSoldiers_ID.Contains(trainingTechInfo.SoldierIDUnlocked) && !hero.HasOwnSoldier(trainingTechInfo.SoldierIDUnlocked))
             {
                 this.m_hero.AddSoldier(hero, trainingTechInfo.SoldierIDUnlocked, false);
             }
         }
     }
 }
        // Token: 0x0601126B RID: 70251 RVA: 0x00472F08 File Offset: 0x00471108
        public void CreateDefaultItem(ConfigDataHeroInfo heroInfo)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CreateDefaultItemConfigDataHeroInfo_hotfix != null)
            {
                this.m_CreateDefaultItemConfigDataHeroInfo_hotfix.call(new object[]
                {
                    this,
                    heroInfo
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.IsDefaultSkin             = true;
            this.m_index      = 0;
            this.HeroInfo     = heroInfo;
            this.HeroSkinInfo = null;
            this.CharSkinInfo = null;
            IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;

            this.m_nameText.text = configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_DefaultName);
            this.m_stateCtrl.SetToUIState("Default", false, true);
            this.m_timeGo.SetActive(false);
        }
Beispiel #18
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);
                    }
                }
            }
        }
Beispiel #19
0
        // Token: 0x0600370E RID: 14094 RVA: 0x000F5424 File Offset: 0x000F3624
        public List <ConfigDataSkillInfo> GetTrainingTechSummonSkills(IConfigDataLoader configDataLoader, ConfigDataHeroInfo heroInfo)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_GetTrainingTechSummonSkillsIConfigDataLoaderConfigDataHeroInfo_hotfix != null)
            {
                return((List <ConfigDataSkillInfo>) this.m_GetTrainingTechSummonSkillsIConfigDataLoaderConfigDataHeroInfo_hotfix.call(new object[]
                {
                    this,
                    configDataLoader,
                    heroInfo
                }));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            List <ConfigDataSkillInfo> list = new List <ConfigDataSkillInfo>();

            if (this.TrainingTechs == null || heroInfo == null)
            {
                return(list);
            }
            foreach (BattlePlayerTrainingTech battlePlayerTrainingTech in this.TrainingTechs)
            {
                ConfigDataTrainingTechInfo trainingTechInfo = battlePlayerTrainingTech.TrainingTechInfo;
                if (trainingTechInfo.IsSummon)
                {
                    if (trainingTechInfo.SoldierIDRelated.Contains(heroInfo.ID) || trainingTechInfo.ArmyIDRelated.Contains(heroInfo.m_jobConnectionInfo.m_jobInfo.Army_ID))
                    {
                        int num  = 0;
                        int num2 = 0;
                        while (num2 < battlePlayerTrainingTech.Level && num2 < trainingTechInfo.m_techLevelupInfo.Count)
                        {
                            ConfigDataTrainingTechLevelInfo configDataTrainingTechLevelInfo = trainingTechInfo.m_techLevelupInfo[num2];
                            if (configDataTrainingTechLevelInfo.SoldierSkillID != 0)
                            {
                                num = configDataTrainingTechLevelInfo.SoldierSkillID;
                            }
                            num2++;
                        }
                        if (num != 0)
                        {
                            ConfigDataSkillInfo configDataSkillInfo = configDataLoader.GetConfigDataSkillInfo(num);
                            if (configDataSkillInfo != null)
                            {
                                list.Add(configDataSkillInfo);
                            }
                        }
                    }
                }
            }
            return(list);
        }
        // Token: 0x06012FEC RID: 77804 RVA: 0x004DA0BC File Offset: 0x004D82BC
        public void InitSelectRewardsInfo(Goods goods, bool isNew, bool isFragment)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitSelectRewardsInfoGoodsBooleanBoolean_hotfix != null)
            {
                this.m_InitSelectRewardsInfoGoodsBooleanBoolean_hotfix.call(new object[]
                {
                    this,
                    goods,
                    isNew,
                    isFragment
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.m_text.text = goods.Count.ToString();
            this.m_goods     = goods;
            IConfigDataLoader     configDataLoader      = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            string name  = null;
            string name2 = null;
            int    num   = 0;
            int    rank  = 0;

            this.m_icon.gameObject.transform.localScale = Vector3.one;
            this.m_fragmentItemID = 0;
            this.m_stars.gameObject.SetActive(true);
            switch (goods.GoodsType)
            {
            case GoodsType.GoodsType_Hero:
            {
                Hero hero = projectLPlayerContext.GetHero(goods.Id);
                if (hero != null)
                {
                    ConfigDataHeroInfo heroInfo = hero.HeroInfo;
                    rank = heroInfo.GetRank(hero.StarLevel);
                    num  = hero.StarLevel;
                    if (isFragment)
                    {
                        this.m_text.text      = heroInfo.ExchangedFragmentCount.ToString();
                        this.m_fragmentItemID = heroInfo.FragmentItem_ID;
                        name  = UIUtility.GetGoodsIconName(GoodsType.GoodsType_Item, heroInfo.FragmentItem_ID);
                        name2 = UIUtility.GetGoodsIconMaterialName(GoodsType.GoodsType_Item, heroInfo.FragmentItem_ID);
                        this.m_stars.gameObject.SetActive(false);
                    }
                    else
                    {
                        ConfigDataCharImageInfo charImageInfo = heroInfo.GetCharImageInfo(heroInfo.Star);
                        if (charImageInfo != null)
                        {
                            name  = charImageInfo.SummonHeadImage;
                            name2 = "UI/Icon/Card_ABS/Material/CardIcon.mat";
                        }
                    }
                    this.m_frame.gameObject.SetActive(false);
                    this.m_icon.gameObject.transform.localScale *= 1.3f;
                }
                break;
            }

            case GoodsType.GoodsType_JobMaterial:
            {
                ConfigDataJobMaterialInfo configDataJobMaterialInfo = configDataLoader.GetConfigDataJobMaterialInfo(goods.Id);
                name = configDataJobMaterialInfo.Icon;
                rank = configDataJobMaterialInfo.Rank;
                num  = 0;
                break;
            }

            case GoodsType.GoodsType_Item:
            {
                ConfigDataItemInfo configDataItemInfo = configDataLoader.GetConfigDataItemInfo(goods.Id);
                isFragment = (configDataItemInfo.DisplayType == ItemDisplayType.ItemDisplayType_HeroFragment);
                name       = configDataItemInfo.Icon;
                rank       = configDataItemInfo.Rank;
                num        = 0;
                break;
            }

            case GoodsType.GoodsType_Equipment:
            {
                ConfigDataEquipmentInfo configDataEquipmentInfo = configDataLoader.GetConfigDataEquipmentInfo(goods.Id);
                name = configDataEquipmentInfo.Icon;
                rank = configDataEquipmentInfo.Rank;
                num  = configDataEquipmentInfo.BornStarLevel;
                break;
            }
            }
            this.m_icon.sprite   = AssetUtility.Instance.GetSprite(name);
            this.m_icon.material = AssetUtility.Instance.GetAsset <Material>(name2);
            this.m_frame.sprite  = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsFrameNameByRank(rank));
            UIUtility.SetGameObjectChildrenActiveCount(this.m_stars, num);
            this.m_new.SetActive(isNew);
            this.m_ssrEffect.SetActive(UIUtility.IsRankSSR(rank) && !isFragment);
            this.m_ssrPieceEffect.SetActive(UIUtility.IsRankSSR(rank) && isFragment);
            this.m_text.gameObject.SetActive(goods.Count != 1 || isFragment);
        }
Beispiel #21
0
        // Token: 0x06003B1C RID: 15132 RVA: 0x0010E104 File Offset: 0x0010C304
        public static int AppendPveOpponentBattleActorSetups(IConfigDataLoader configDataLoader, ConfigDataBattleInfo battleInfo, int monsterLevel, int randomSeed, List <BattleActorSetup> actors)
        {
            List <RandomArmyActor> list = null;

            if (battleInfo.BattleRandomEnemies_ID.Count > 0)
            {
                RandomNumber randomNumber = new RandomNumber();
                randomNumber.SetSeed(randomSeed);
                int randomBattleArmyActors = BattleUtility.GetRandomBattleArmyActors(configDataLoader, battleInfo.BattleRandomEnemies_ID, randomNumber, out list);
                if (randomBattleArmyActors != 0)
                {
                    return(randomBattleArmyActors);
                }
            }
            List <ConfigDataSkillInfo> list2 = null;

            if (battleInfo.EnemyRandomTalentProbilities.Count > 0)
            {
                RandomNumber randomNumber2 = new RandomNumber();
                randomNumber2.SetSeed(randomSeed);
                BattleUtility.GetRandomTalentSkills(configDataLoader, battleInfo.EnemyRandomTalent_ID, battleInfo.EnemyRandomTalentProbilities, randomNumber2, out list2);
            }
            for (int i = 0; i < battleInfo.EnemyActors.Count; i++)
            {
                BattlePosActor battlePosActor = battleInfo.EnemyActors[i];
                int            key            = battlePosActor.ID;
                int            num            = battlePosActor.Level;
                int            behaviorId     = 0;
                if (battleInfo.EnemyActorsBehavior.Count > i)
                {
                    behaviorId = battleInfo.EnemyActorsBehavior[i];
                }
                int groupId = 0;
                if (battleInfo.EnemyGroups.Count > i)
                {
                    groupId = battleInfo.EnemyGroups[i];
                }
                if (list != null && i < list.Count && list[i] != null)
                {
                    key        = list[i].HeroID;
                    num        = list[i].Level;
                    behaviorId = list[i].AI;
                }
                if (num == 0)
                {
                    num = monsterLevel;
                }
                ConfigDataHeroInfo configDataHeroInfo = configDataLoader.GetConfigDataHeroInfo(key);
                if (configDataHeroInfo == null)
                {
                    return(-618);
                }
                BattleHero       hero             = BattleUtility.CreateDefaultConfigBattleHero(configDataHeroInfo);
                BattleActorSetup battleActorSetup = BattleUtility.CreateBattleActorSetupFromBattleHero(configDataLoader, hero, num, behaviorId, groupId);
                battleActorSetup.Position.x = battlePosActor.X;
                battleActorSetup.Position.y = battlePosActor.Y;
                battleActorSetup.Direction  = 0;
                if (battleInfo.EnemyDirs.Count > i)
                {
                    battleActorSetup.Direction = battleInfo.EnemyDirs[i];
                }
                battleActorSetup.IsNpc = false;
                if (list2 != null && i < list2.Count)
                {
                    battleActorSetup.ExtraTalentSkillInfo = list2[i];
                }
                actors.Add(battleActorSetup);
            }
            return(0);
        }
Beispiel #22
0
        // Token: 0x0600FB53 RID: 64339 RVA: 0x00421884 File Offset: 0x0041FA84
        public void InitEquipmentDepotListItemInfo(BagItemBase bagItem, bool canWear)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitEquipmentDepotListItemInfoBagItemBaseBoolean_hotfix != null)
            {
                this.m_InitEquipmentDepotListItemInfoBagItemBaseBoolean_hotfix.call(new object[]
                {
                    this,
                    bagItem,
                    canWear
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            base.gameObject.SetActive(true);
            base.gameObject.name = bagItem.ListItemName;
            this.BagItem         = bagItem;
            EquipmentBagItem    equipmentBagItem    = bagItem as EquipmentBagItem;
            EnchantStoneBagItem enchantStoneBagItem = bagItem as EnchantStoneBagItem;

            this.EquipmentInstanceId = this.BagItem.InstanceId;
            if (equipmentBagItem != null)
            {
                ConfigDataEquipmentInfo equipmentInfo = equipmentBagItem.EquipmentInfo;
                this.m_icon.sprite    = AssetUtility.Instance.GetSprite(equipmentInfo.Icon);
                this.m_bgFrame.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsFrameNameByRank(equipmentInfo.Rank));
                this.m_SSREffect.SetActive(UIUtility.IsRankSSR(equipmentInfo.Rank));
                UIUtility.SetGameObjectChildrenActiveCount(this.m_starGroup, equipmentBagItem.StarLevel);
                this.m_lvValueText.text = equipmentBagItem.Level.ToString();
                ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
                IConfigDataLoader     configDataLoader      = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
                int wearedEquipmentHeroIdByEquipmentId      = projectLPlayerContext.GetWearedEquipmentHeroIdByEquipmentId(this.EquipmentInstanceId);
                this.IsEquiped = (wearedEquipmentHeroIdByEquipmentId > 0);
                if (this.IsEquiped)
                {
                    ConfigDataHeroInfo      configDataHeroInfo = configDataLoader.GetConfigDataHeroInfo(wearedEquipmentHeroIdByEquipmentId);
                    ConfigDataCharImageInfo charImageInfo      = configDataHeroInfo.GetCharImageInfo(configDataHeroInfo.Star);
                    if (charImageInfo != null)
                    {
                        this.m_equipingTagHeadIcon.sprite = AssetUtility.Instance.GetSprite(charImageInfo.SmallHeadImage);
                    }
                    this.m_stateCtrl.SetToUIState("Equiped", false, true);
                }
                else
                {
                    this.m_stateCtrl.SetToUIState("UnEquiped", false, true);
                }
                this.m_lockImage.SetActive(equipmentBagItem.Locked);
                this.m_mask.SetActive(!canWear);
                this.m_enchantmentIcon.gameObject.SetActive(equipmentBagItem.IsEnchant());
                if (equipmentBagItem.IsEnchant())
                {
                    ConfigDataResonanceInfo configDataResonanceInfo = configDataLoader.GetConfigDataResonanceInfo(equipmentBagItem.ResonanceId);
                    this.m_enchantmentIcon.sprite = AssetUtility.Instance.GetSprite(configDataResonanceInfo.SmallIcon);
                }
            }
            else
            {
                ConfigDataEnchantStoneInfo enchantStoneInfo = enchantStoneBagItem.EnchantStoneInfo;
                this.m_icon.sprite    = AssetUtility.Instance.GetSprite(enchantStoneInfo.Icon);
                this.m_bgFrame.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsFrameNameByRank(enchantStoneInfo.Rank));
                this.m_SSREffect.SetActive(UIUtility.IsRankSSR(enchantStoneInfo.Rank));
                this.m_countText.text = UIUtility.GetGoodsCount(this.BagItem.GoodsTypeId, this.BagItem.ContentId).ToString();
                this.m_stateCtrl.SetToUIState("Enchant", false, true);
                this.m_enchantmentIcon.gameObject.SetActive(false);
                this.m_checkImageMask.SetActive(false);
            }
        }
Beispiel #23
0
        // Token: 0x0600371F RID: 14111 RVA: 0x000F6284 File Offset: 0x000F4484
        public void ComputeSoldierProperties(IConfigDataLoader configDataLoader, ConfigDataSoldierInfo soldierInfo, ConfigDataHeroInfo heroInfo, int heroLevel, BattlePropertyModifier pm)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_ComputeSoldierPropertiesIConfigDataLoaderConfigDataSoldierInfoConfigDataHeroInfoInt32BattlePropertyModifier_hotfix != null)
            {
                this.m_ComputeSoldierPropertiesIConfigDataLoaderConfigDataSoldierInfoConfigDataHeroInfoInt32BattlePropertyModifier_hotfix.call(new object[]
                {
                    this,
                    configDataLoader,
                    soldierInfo,
                    heroInfo,
                    heroLevel,
                    pm
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            int growMul  = pm.Get(PropertyModifyType.PropertyModifyType_Soldier1_HPMul);
            int growAdd  = pm.Get(PropertyModifyType.PropertyModifyType_Soldier1_HPAdd);
            int buffMul  = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_HPMul);
            int buffAdd  = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_HPAdd);
            int growMul2 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier1_ATMul);
            int growAdd2 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier1_ATAdd);
            int buffMul2 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_ATMul);
            int buffAdd2 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_ATAdd);
            int growMul3 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier1_DFMul);
            int growAdd3 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier1_DFAdd);
            int buffMul3 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_DFMul);
            int buffAdd3 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_DFAdd);
            int growMul4 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier1_MagicDFMul);
            int growAdd4 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier1_MagicDFAdd);
            int buffMul4 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_MagicDFMul);
            int buffAdd4 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_MagicDFAdd);

            if (heroInfo != null)
            {
                int num   = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_HPCmdAdd);
                int num2  = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_HPCmdAdd);
                int num3  = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_HPCmdAdd);
                int num4  = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_ATCmdAdd);
                int num5  = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_ATCmdAdd);
                int num6  = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_ATCmdAdd);
                int num7  = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_DFCmdAdd);
                int num8  = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_DFCmdAdd);
                int num9  = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_DFCmdAdd);
                int num10 = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_MagicDFCmdAdd);
                int num11 = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_MagicDFCmdAdd);
                int num12 = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_MagicDFCmdAdd);
                this.Cmd_HealthPoint  = heroInfo.HPCmd_INI + num + num2 + num3;
                this.Cmd_Attack       = heroInfo.ATCmd_INI + num4 + num5 + num6;
                this.Cmd_Defense      = heroInfo.DFCmd_INI + num7 + num8 + num9;
                this.Cmd_MagicDefense = heroInfo.MagicDFCmd_INI + num10 + num11 + num12;
            }
            else
            {
                this.Cmd_HealthPoint  = 0;
                this.Cmd_Attack       = 0;
                this.Cmd_Defense      = 0;
                this.Cmd_MagicDefense = 0;
            }
            this.HealthPointMax                     = BattleFormula.ComputeSoldierBattleProperty(soldierInfo.HP_INI, soldierInfo.HP_UP, heroLevel, this.Cmd_HealthPoint, growMul, growAdd, buffMul, buffAdd);
            this.Attack                             = BattleFormula.ComputeSoldierBattleProperty(soldierInfo.AT_INI, soldierInfo.AT_UP, heroLevel, this.Cmd_Attack, growMul2, growAdd2, buffMul2, buffAdd2);
            this.Defense                            = BattleFormula.ComputeSoldierBattleProperty(soldierInfo.DF_INI, soldierInfo.DF_UP, heroLevel, this.Cmd_Defense, growMul3, growAdd3, buffMul3, buffAdd3);
            this.Magic                              = 0;
            this.MagicDefense                       = BattleFormula.ComputeSoldierBattleProperty(soldierInfo.MagicDF_INI, soldierInfo.MagicDF_UP, heroLevel, this.Cmd_MagicDefense, growMul4, growAdd4, buffMul4, buffAdd4);
            this.Dexterity                          = 0;
            this.Buff_PhysicalDamageMul             = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_PsyDmgMul);
            this.Buff_PhysicalDamageReceiveMul      = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_PsyDmgRecvMul);
            this.Buff_SuperPhysicalDamageReceiveMul = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_SuperPsyDmgRecvMul);
            this.Buff_HealMul                       = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_HealMul);
            this.Buff_HealReceiveMul                = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_HealRecvMul);
            this.Buff_MagicalDamageMul              = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_MagicDmgMul);
            this.Buff_MagicalDamageReceiveMul       = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_MagicDmgRecvMul);
            this.Buff_SuperMagicalDamageReceiveMul  = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_SuperMagicDmgRecvMul);
            this.Buff_IgnoreDFMul                   = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_IgnoreDFMul);
            if (this.Buff_IgnoreDFMul > 10000)
            {
                this.Buff_IgnoreDFMul = 10000;
            }
            this.Buff_SkillDamageMul         = 0;
            this.Buff_BFSkillDamageMul       = 0;
            this.Buff_RangeDamageReceiveMul  = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_RangeDmgRecvMul);
            this.Buff_ReceiveCriticalRateAdd = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_RecvCriticalRateAdd);
            int num13 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier1_CriticalDamageAdd);
            int num14 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_CriticalDamageAdd);

            this.CriticalDamage = soldierInfo.CriticalDamage + num13 + num14;
            int num15 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier1_CriticalRateAdd);
            int num16 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_CriticalRateAdd);

            this.CriticalRate = soldierInfo.CriticalRate + num15 + num16;
            if (this.CriticalRate > 10000)
            {
                this.CriticalRate = 10000;
            }
            int num17 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier1_BFAttackDistanceAdd);
            int num18 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_BFAttackDistanceAdd);

            this.AttackDistance = soldierInfo.BF_AttackDistance + num17 + num18;
            this.AttackDistance = BattleProperty.ClampNegativeValue(this.AttackDistance);
            int num19 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier1_BFMovePointAdd);
            int num20 = pm.Get(PropertyModifyType.PropertyModifyType_Soldier2_BFMovePointAdd);

            this.MovePoint = soldierInfo.BF_MovePoint + num19 + num20;
            this.MovePoint = BattleProperty.ClampNegativeValue(this.MovePoint);
        }
Beispiel #24
0
        // Token: 0x0600371C RID: 14108 RVA: 0x000F5AEC File Offset: 0x000F3CEC
        public void ComputeHeroProperties(IConfigDataLoader configDataLoader, ConfigDataHeroInfo heroInfo, ConfigDataJobConnectionInfo jobConnectionInfo, int jobLevel, int heroLevel, int heroStar, BattlePropertyModifier pm)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_ComputeHeroPropertiesIConfigDataLoaderConfigDataHeroInfoConfigDataJobConnectionInfoInt32Int32Int32BattlePropertyModifier_hotfix != null)
            {
                this.m_ComputeHeroPropertiesIConfigDataLoaderConfigDataHeroInfoConfigDataJobConnectionInfoInt32Int32Int32BattlePropertyModifier_hotfix.call(new object[]
                {
                    this,
                    configDataLoader,
                    heroInfo,
                    jobConnectionInfo,
                    jobLevel,
                    heroLevel,
                    heroStar,
                    pm
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            int growMul      = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_HPMul);
            int growAdd      = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_HPAdd);
            int buffMul      = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_HPMul);
            int buffAdd      = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_HPAdd);
            int selfMul      = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_HPMul);
            int selfAdd      = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_HPAdd);
            int growMul2     = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_ATMul);
            int growAdd2     = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_ATAdd);
            int buffMul2     = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_ATMul);
            int buffAdd2     = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_ATAdd);
            int selfMul2     = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_ATMul);
            int selfAdd2     = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_ATAdd);
            int growMul3     = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_DFMul);
            int growAdd3     = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_DFAdd);
            int buffMul3     = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_DFMul);
            int buffAdd3     = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_DFAdd);
            int selfMul3     = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_DFMul);
            int selfAdd3     = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_DFAdd);
            int growMul4     = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_MagicMul);
            int growAdd4     = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_MagicAdd);
            int buffMul4     = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_MagicMul);
            int buffAdd4     = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_MagicAdd);
            int selfMul4     = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_MagicMul);
            int selfAdd4     = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_MagicAdd);
            int growMul5     = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_MagicDFMul);
            int growAdd5     = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_MagicDFAdd);
            int buffMul5     = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_MagicDFMul);
            int buffAdd5     = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_MagicDFAdd);
            int selfMul5     = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_MagicDFMul);
            int selfAdd5     = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_MagicDFAdd);
            int growMul6     = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_DEXMul);
            int growAdd6     = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_DEXAdd);
            int buffMul6     = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_DEXMul);
            int buffAdd6     = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_DEXAdd);
            int selfMul6     = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_DEXMul);
            int selfAdd6     = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_DEXAdd);
            int heroStarMul  = 0;
            int heroStarMul2 = 0;
            int heroStarMul3 = 0;
            int heroStarMul4 = 0;
            int heroStarMul5 = 0;
            int heroStarMul6 = 0;

            if (heroStar > 0)
            {
                int index = heroStar - 1;
                heroStarMul  = heroInfo.HPStar[index];
                heroStarMul2 = heroInfo.ATStar[index];
                heroStarMul3 = heroInfo.DFStar[index];
                heroStarMul4 = heroInfo.MagicStar[index];
                heroStarMul5 = heroInfo.MagicDFStar[index];
                heroStarMul6 = heroInfo.DEXStar[index];
            }
            ConfigDataJobLevelInfo configDataJobLevelInfo = jobConnectionInfo.m_jobLevelInfos[jobLevel];

            this.HealthPointMax                     = BattleFormula.ComputeHeroBattleProperty(configDataJobLevelInfo.HP_INI, configDataJobLevelInfo.HP_UP, heroLevel, heroStarMul, growMul, growAdd, buffMul, buffAdd, selfMul, selfAdd);
            this.Attack                             = BattleFormula.ComputeHeroBattleProperty(configDataJobLevelInfo.AT_INI, configDataJobLevelInfo.AT_UP, heroLevel, heroStarMul2, growMul2, growAdd2, buffMul2, buffAdd2, selfMul2, selfAdd2);
            this.Defense                            = BattleFormula.ComputeHeroBattleProperty(configDataJobLevelInfo.DF_INI, configDataJobLevelInfo.DF_UP, heroLevel, heroStarMul3, growMul3, growAdd3, buffMul3, buffAdd3, selfMul3, selfAdd3);
            this.Magic                              = BattleFormula.ComputeHeroBattleProperty(configDataJobLevelInfo.Magic_INI, configDataJobLevelInfo.Magic_UP, heroLevel, heroStarMul4, growMul4, growAdd4, buffMul4, buffAdd4, selfMul4, selfAdd4);
            this.MagicDefense                       = BattleFormula.ComputeHeroBattleProperty(configDataJobLevelInfo.MagicDF_INI, configDataJobLevelInfo.MagicDF_UP, heroLevel, heroStarMul5, growMul5, growAdd5, buffMul5, buffAdd5, selfMul5, selfAdd5);
            this.Dexterity                          = BattleFormula.ComputeHeroBattleProperty(configDataJobLevelInfo.DEX_INI, configDataJobLevelInfo.DEX_UP, heroLevel, heroStarMul6, growMul6, growAdd6, buffMul6, buffAdd6, selfMul6, selfAdd6);
            this.Buff_PhysicalDamageMul             = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_PsyDmgMul);
            this.Buff_PhysicalDamageReceiveMul      = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_PsyDmgRecvMul);
            this.Buff_SuperPhysicalDamageReceiveMul = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_SuperPsyDmgRecvMul);
            this.Buff_HealMul                       = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_HealMul);
            this.Buff_HealReceiveMul                = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_HealRecvMul);
            this.Buff_MagicalDamageMul              = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_MagicDmgMul);
            this.Buff_MagicalDamageReceiveMul       = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_MagicDmgRecvMul);
            this.Buff_SuperMagicalDamageReceiveMul  = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_SuperMagicDmgRecvMul);
            this.Buff_IgnoreDFMul                   = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_IgnoreDFMul);
            if (this.Buff_IgnoreDFMul > 10000)
            {
                this.Buff_IgnoreDFMul = 10000;
            }
            this.Buff_SkillDamageMul         = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_SkillDmgMul);
            this.Buff_BFSkillDamageMul       = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_BFSkillDmgMul);
            this.Buff_RangeDamageReceiveMul  = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_RangeDmgRecvMul);
            this.Buff_ReceiveCriticalRateAdd = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_RecvCriticalRateAdd);
            int const_CriticalDamageBase = configDataLoader.Const_CriticalDamageBase;
            int num  = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_CriticalDamageAdd);
            int num2 = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_CriticalDamageAdd);
            int num3 = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_CriticalDamageAdd);

            this.CriticalDamage = const_CriticalDamageBase + (num + num2 + num3);
            int num4 = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_CriticalRateAdd);
            int num5 = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_CriticalRateAdd);
            int num6 = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_CriticalRateAdd);

            this.CriticalRate = this.Dexterity * 10 + (num4 + num5 + num6);
            if (this.CriticalRate > 10000)
            {
                this.CriticalRate = 10000;
            }
            int num7  = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_HPCmdAdd);
            int num8  = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_HPCmdAdd);
            int num9  = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_HPCmdAdd);
            int num10 = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_ATCmdAdd);
            int num11 = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_ATCmdAdd);
            int num12 = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_ATCmdAdd);
            int num13 = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_DFCmdAdd);
            int num14 = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_DFCmdAdd);
            int num15 = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_DFCmdAdd);
            int num16 = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_MagicDFCmdAdd);
            int num17 = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_MagicDFCmdAdd);
            int num18 = pm.Get(PropertyModifyType.PropertyModifyType_Hero3_MagicDFCmdAdd);

            this.Cmd_HealthPoint  = heroInfo.HPCmd_INI + num7 + num8 + num9;
            this.Cmd_Attack       = heroInfo.ATCmd_INI + num10 + num11 + num12;
            this.Cmd_Defense      = heroInfo.DFCmd_INI + num13 + num14 + num15;
            this.Cmd_MagicDefense = heroInfo.MagicDFCmd_INI + num16 + num17 + num18;
            int num19 = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_BFAttackDistanceAdd);
            int num20 = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_BFAttackDistanceAdd);

            this.AttackDistance           = jobConnectionInfo.m_jobInfo.BF_AttackDistance + num19 + num20;
            this.AttackDistance           = BattleProperty.ClampNegativeValue(this.AttackDistance);
            this.MagicSkillDistanceAdd    = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_MagicDistanceAdd);
            this.PhysicalSkillDistanceAdd = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_PsyDistanceAdd);
            int num21 = pm.Get(PropertyModifyType.PropertyModifyType_Hero1_BFMovePointAdd);
            int num22 = pm.Get(PropertyModifyType.PropertyModifyType_Hero2_BFMovePointAdd);

            this.MovePoint = jobConnectionInfo.m_jobInfo.BF_MovePoint + num21 + num22;
            this.MovePoint = BattleProperty.ClampNegativeValue(this.MovePoint);
        }
        // Token: 0x06012CBB RID: 76987 RVA: 0x004CE22C File Offset: 0x004CC42C
        public void SetCondition(RiftLevelUnlockConditionType condition, int param1, int param2)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetConditionRiftLevelUnlockConditionTypeInt32Int32_hotfix != null)
            {
                this.m_SetConditionRiftLevelUnlockConditionTypeInt32Int32_hotfix.call(new object[]
                {
                    this,
                    condition,
                    param1,
                    param2
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;

            if (condition == RiftLevelUnlockConditionType.RiftLevelUnlockConditionType_Scenario)
            {
                ConfigDataScenarioInfo configDataScenarioInfo = configDataLoader.GetConfigDataScenarioInfo(param1);
                if (configDataScenarioInfo != null)
                {
                    this.m_text.text  = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_UnlockCondition_Scenario), configDataScenarioInfo.Chapter);
                    this.m_scenarioID = param1;
                    this.m_goButton.onClick.AddListener(new UnityAction(this.GoScenario));
                    this.m_goButton.gameObject.SetActive(true);
                }
            }
            else if (condition == RiftLevelUnlockConditionType.RiftLevelUnlockConditionType_Achievement)
            {
                ConfigDataBattleAchievementRelatedInfo configDataBattleAchievementRelatedInfo = configDataLoader.GetConfigDataBattleAchievementRelatedInfo(param1);
                if (configDataBattleAchievementRelatedInfo != null)
                {
                    this.m_achievementRiftLevelID = param2;
                    string nameNum = this.m_configDataLoader.GetConfigDataRiftLevelInfo(this.m_achievementRiftLevelID).NameNum;
                    string name    = this.m_configDataLoader.GetConfigDataBattleAchievementInfo(configDataBattleAchievementRelatedInfo.Achievement_ID).Name;
                    this.m_text.text = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_UnlockCondition_Achievement), nameNum, name);
                    this.m_goButton.onClick.AddListener(new UnityAction(this.GoAchievement));
                    this.m_goButton.gameObject.SetActive(true);
                }
            }
            else if (condition == RiftLevelUnlockConditionType.RiftLevelUnlockConditionType_Hero)
            {
                ConfigDataHeroInfo configDataHeroInfo = configDataLoader.GetConfigDataHeroInfo(param1);
                if (configDataHeroInfo != null)
                {
                    this.m_text.text = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_UnlockCondition_Hero), configDataHeroInfo.Name);
                    this.m_goButton.gameObject.SetActive(false);
                }
            }
            else if (condition == RiftLevelUnlockConditionType.RiftLevelUnlockConditionType_RiftLevel)
            {
                ConfigDataRiftLevelInfo configDataRiftLevelInfo = configDataLoader.GetConfigDataRiftLevelInfo(param1);
                if (configDataRiftLevelInfo != null)
                {
                    this.m_text.text   = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_UnlockCondition_RiftLevel), configDataRiftLevelInfo.Name);
                    this.m_riftLevelID = param1;
                    this.m_goButton.onClick.AddListener(new UnityAction(this.GoRiftLevel));
                    this.m_goButton.gameObject.SetActive(true);
                }
            }
        }
Beispiel #26
0
        // Token: 0x0600966A RID: 38506 RVA: 0x002B0BAC File Offset: 0x002AEDAC
        public void LoadHeroTeam(int rank)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_LoadHeroTeamInt32_hotfix != null)
            {
                this.m_LoadHeroTeamInt32_hotfix.call(new object[]
                {
                    this,
                    rank
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.m_herosRGameObject.SetActive(false);
            this.m_herosSRGameObject.SetActive(false);
            this.m_herosSSRGameObject.SetActive(false);
            GameObject teamGameObject = null;

            if (rank != 4)
            {
                if (rank != 3)
                {
                    if (rank == 2)
                    {
                        teamGameObject = this.m_herosRGameObject;
                    }
                }
                else
                {
                    teamGameObject = this.m_herosSRGameObject;
                }
            }
            else
            {
                teamGameObject = this.m_herosSSRGameObject;
            }
            if (teamGameObject == null)
            {
                return;
            }
            this.m_task.CustomLoadAsset(delegate
            {
                IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
                IEnumerable <KeyValuePair <int, ConfigDataHeroInfo> > allConfigDataHeroInfo = configDataLoader.GetAllConfigDataHeroInfo();
                for (int i = 0; i < teamGameObject.transform.childCount; i++)
                {
                    Transform child = teamGameObject.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)
                        {
                            this.m_task.CollectAssetWrap(charImageInfo.HeroPainting);
                        }
                    }
                }
            }, delegate
            {
                this.m_heroShowComponent = new HeroShowComponent();
                this.m_heroShowComponent.Init(teamGameObject);
            });
        }
        // Token: 0x0601126A RID: 70250 RVA: 0x00472CA8 File Offset: 0x00470EA8
        public void SetHeroCharSkinItem(int heroSkinId, int index, ConfigDataHeroInfo heroInfo, int heroCurSkinId, string mode)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetHeroCharSkinItemInt32Int32ConfigDataHeroInfoInt32String_hotfix != null)
            {
                this.m_SetHeroCharSkinItemInt32Int32ConfigDataHeroInfoInt32String_hotfix.call(new object[]
                {
                    this,
                    heroSkinId,
                    index,
                    heroInfo,
                    heroCurSkinId,
                    mode
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.HeroInfo      = heroInfo;
            this.m_index       = index;
            this.IsDefaultSkin = false;
            IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;

            this.HeroSkinInfo = configDataLoader.GetConfigDataHeroSkinInfo(heroSkinId);
            if (this.HeroSkinInfo == null)
            {
                return;
            }
            this.CharSkinInfo = configDataLoader.GetConfigDataCharImageSkinResourceInfo(this.HeroSkinInfo.CharImageSkinResource_ID);
            if (!GameObjectUtility.HasChinese(this.CharSkinInfo.Image))
            {
                this.m_iconImage.sprite = AssetUtility.Instance.GetSprite(this.CharSkinInfo.Image);
            }
            this.m_nameText.text = this.CharSkinInfo.Name;
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            string stateName = null;

            if (projectLPlayerContext.HasOwn(GoodsType.GoodsType_HeroSkin, heroSkinId))
            {
                if (heroCurSkinId != heroSkinId)
                {
                    if (mode != null)
                    {
                        if (!(mode == "ShowOneSkin"))
                        {
                            if (!(mode == "ShowSkinDetailMode"))
                            {
                                if (mode == "SkinBuyMode")
                                {
                                    stateName = "Bought";
                                }
                            }
                            else
                            {
                                stateName = "Got";
                            }
                        }
                        else
                        {
                            stateName = "Normal";
                        }
                    }
                }
                else
                {
                    stateName = "Wear";
                }
                this.m_timeGo.SetActive(false);
            }
            else
            {
                stateName = "Lock";
                ConfigDataFixedStoreItemInfo configDataFixedStoreItemInfo = configDataLoader.GetConfigDataFixedStoreItemInfo(this.HeroSkinInfo.FixedStoreItemId);
                if (configDataFixedStoreItemInfo != null)
                {
                    this.m_timeGo.SetActive(configDataFixedStoreItemInfo.ShowEndTime != DateTime.MaxValue.ToString());
                }
                else
                {
                    this.m_timeGo.SetActive(false);
                }
            }
            this.m_stateCtrl.SetToUIState(stateName, false, true);
        }
Beispiel #28
0
        // Token: 0x06003B22 RID: 15138 RVA: 0x0010E854 File Offset: 0x0010CA54
        public static List <ConfigDataSkillInfo> GetTrainingTechSummonSkills(IConfigDataLoader configDataLoader, List <TrainingTech> techs, ConfigDataHeroInfo heroInfo)
        {
            List <ConfigDataSkillInfo> list = new List <ConfigDataSkillInfo>();

            if (techs == null || heroInfo == null)
            {
                return(list);
            }
            foreach (TrainingTech trainingTech in techs)
            {
                if (trainingTech.ConfigDataLoader == null)
                {
                    trainingTech.ConfigDataLoader = configDataLoader;
                }
                if (trainingTech.Config != null)
                {
                    ConfigDataTrainingTechInfo config = trainingTech.Config;
                    if (config.IsSummon)
                    {
                        if (config.SoldierIDRelated.Contains(heroInfo.ID) || config.ArmyIDRelated.Contains(heroInfo.m_jobConnectionInfo.m_jobInfo.Army_ID))
                        {
                            int num  = 0;
                            int num2 = 0;
                            while (num2 < trainingTech.Level && num2 < trainingTech.Infos.Count)
                            {
                                ConfigDataTrainingTechLevelInfo config2 = trainingTech.Infos[num2].Config;
                                if (config2.SoldierSkillID != 0)
                                {
                                    num = config2.SoldierSkillID;
                                }
                                num2++;
                            }
                            if (num != 0)
                            {
                                ConfigDataSkillInfo configDataSkillInfo = configDataLoader.GetConfigDataSkillInfo(num);
                                if (configDataSkillInfo != null)
                                {
                                    list.Add(configDataSkillInfo);
                                }
                            }
                        }
                    }
                }
            }
            return(list);
        }