// Token: 0x060031B3 RID: 12723 RVA: 0x000C36D4 File Offset: 0x000C18D4 private void UpdateJobConnectionInfo() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_UpdateJobConnectionInfo_hotfix != null) { this.m_UpdateJobConnectionInfo_hotfix.call(new object[] { this }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; this.JobConnectionInfo = configDataLoader.GetConfigDataJobConnectionInfo(this.JobRelatedId); }
// Token: 0x06003B16 RID: 15126 RVA: 0x0010D864 File Offset: 0x0010BA64 public static BattleActorSetup CreateBattleActorSetupFromBattleHero(IConfigDataLoader configDataLoader, BattleHero hero, int level = 0, int behaviorId = -1, int groupId = 0) { BattleActorSetup battleActorSetup = new BattleActorSetup(); battleActorSetup.HeroInfo = configDataLoader.GetConfigDataHeroInfo(hero.HeroId); battleActorSetup.JobConnectionInfo = configDataLoader.GetConfigDataJobConnectionInfo(hero.ActiveHeroJobRelatedId); battleActorSetup.SoldierInfo = configDataLoader.GetConfigDataSoldierInfo(hero.SelectedSoldierId); battleActorSetup.HeroStar = hero.StarLevel; battleActorSetup.JobLevel = hero.GetJob(hero.ActiveHeroJobRelatedId).JobLevel; battleActorSetup.SoldierCount = configDataLoader.Const_SoldierCountMax; battleActorSetup.ActionValue = hero.ActionValue; battleActorSetup.BehaviorId = behaviorId; battleActorSetup.GroupId = groupId; battleActorSetup.PlayerIndex = -1; if (level > 0) { battleActorSetup.HeroLevel = level; } else { battleActorSetup.HeroLevel = hero.Level; } if (hero.SelectedSkillList.Count > 0) { List <ConfigDataSkillInfo> list = new List <ConfigDataSkillInfo>(); foreach (int key in hero.SelectedSkillList) { ConfigDataSkillInfo configDataSkillInfo = configDataLoader.GetConfigDataSkillInfo(key); if (configDataSkillInfo != null) { list.Add(configDataSkillInfo); } } if (list.Count > 0) { battleActorSetup.SkillInfos = list.ToArray(); } } if (hero.Jobs.Count > 0) { List <ConfigDataJobInfo> list2 = new List <ConfigDataJobInfo>(); foreach (BattleHeroJob battleHeroJob in hero.Jobs) { ConfigDataJobConnectionInfo configDataJobConnectionInfo = configDataLoader.GetConfigDataJobConnectionInfo(battleHeroJob.JobRelatedId); if (configDataJobConnectionInfo.IsJobLevelMax(battleHeroJob.JobLevel)) { list2.Add(configDataJobConnectionInfo.m_jobInfo); } } if (list2.Count > 0) { battleActorSetup.MasterJobInfos = list2.ToArray(); } } if (hero.Fetters.Count > 0) { List <ConfigDataSkillInfo> list3 = new List <ConfigDataSkillInfo>(); foreach (KeyValuePair <int, int> keyValuePair in hero.Fetters) { ConfigDataHeroFetterInfo configDataHeroFetterInfo = configDataLoader.GetConfigDataHeroFetterInfo(keyValuePair.Key); if (configDataHeroFetterInfo != null) { int num = keyValuePair.Value - 1; if (num < configDataHeroFetterInfo.GotSkills_ID.Count) { ConfigDataSkillInfo configDataSkillInfo2 = configDataLoader.GetConfigDataSkillInfo(configDataHeroFetterInfo.GotSkills_ID[num]); if (configDataSkillInfo2 != null) { list3.Add(configDataSkillInfo2); } } } } if (list3.Count > 0) { battleActorSetup.FetterSkillInfos = list3.ToArray(); } } if (hero.Equipments.Count > 0) { List <BattleActorEquipment> list4 = new List <BattleActorEquipment>(); foreach (BattleHeroEquipment battleHeroEquipment in hero.Equipments) { ConfigDataEquipmentInfo configDataEquipmentInfo = configDataLoader.GetConfigDataEquipmentInfo(battleHeroEquipment.Id); if (configDataEquipmentInfo != null) { BattleActorEquipment battleActorEquipment = new BattleActorEquipment(); battleActorEquipment.EquipmentInfo = configDataEquipmentInfo; battleActorEquipment.Level = battleHeroEquipment.Level; if (battleHeroEquipment.EnchantProperties.Count > 0) { battleActorEquipment.EnchantProperties = new CommonBattleProperty[battleHeroEquipment.EnchantProperties.Count]; for (int i = 0; i < battleHeroEquipment.EnchantProperties.Count; i++) { battleActorEquipment.EnchantProperties[i] = battleHeroEquipment.EnchantProperties[i]; } } list4.Add(battleActorEquipment); } } if (list4.Count > 0) { battleActorSetup.Equipments = list4.ToArray(); } List <ConfigDataSkillInfo> equipmentResonanceSkillInfos = BattleUtility.GetEquipmentResonanceSkillInfos(configDataLoader, hero.Equipments); if (equipmentResonanceSkillInfos.Count > 0) { battleActorSetup.ResonanceSkillInfos = equipmentResonanceSkillInfos.ToArray(); } } battleActorSetup.HeroCharImageSkinResourceInfo = hero.GetHeroCharImageSkinResourceInfo(configDataLoader); battleActorSetup.HeroModelSkinResourceInfo = hero.GetHeroActiveJobModelSkinResourceInfo(configDataLoader); battleActorSetup.SoldierModelSkinResourceInfo = hero.GetSelectedSoldierModelSkinResourceInfo(configDataLoader); return(battleActorSetup); }
// Token: 0x06012F92 RID: 77714 RVA: 0x004D94D8 File Offset: 0x004D76D8 private void SetValues() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetValues_hotfix != null) { this.m_SetValues_hotfix.call(new object[] { this }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_heroNameText.text = this.m_hero.HeroInfo.Name; this.m_heroJobText.text = this.m_hero.HeroInfo.m_jobConnectionInfo.m_jobInfo.Name; this.m_armyImage.sprite = AssetUtility.Instance.GetSprite(this.m_hero.HeroInfo.m_jobConnectionInfo.m_jobInfo.m_armyInfo.Icon); this.m_armyText.text = this.m_hero.HeroInfo.m_jobConnectionInfo.m_jobInfo.m_armyInfo.Name; UIUtility.SetGameObjectChildrenActiveCount(this.m_heroStars, this.m_hero.Level); char[] array = this.m_hero.GetActiveJob().JobConnectionInfo.PropertyRating.ToCharArray(); List <Image> list = new List <Image>(); list.Add(this.m_heroHPImage); list.Add(this.m_heroATImage); list.Add(this.m_heroMagicImage); list.Add(this.m_heroDFImage); list.Add(this.m_heroMagicDFImage); list.Add(this.m_heroDEXImage); for (int i = 0; i < array.Length; i++) { string propertyRatingImageName = UIUtility.GetPropertyRatingImageName(array[i]); list[i].sprite = AssetUtility.Instance.GetSprite(propertyRatingImageName); } ConfigDataSkillInfo talentSkillInfo = this.m_hero.GetActiveJob().JobConnectionInfo.GetTalentSkillInfo(this.m_hero.StarLevel); if (talentSkillInfo != null) { this.m_talentIconImg.sprite = AssetUtility.Instance.GetSprite(talentSkillInfo.Icon); this.m_talentNameText.text = talentSkillInfo.Name; this.m_talentDescText.text = talentSkillInfo.Desc; } IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; List <ConfigDataJobConnectionInfo> list2 = new List <ConfigDataJobConnectionInfo>(); foreach (int key in this.m_hero.HeroInfo.UseableJobConnections_ID) { ConfigDataJobConnectionInfo configDataJobConnectionInfo = configDataLoader.GetConfigDataJobConnectionInfo(key); ConfigDataJobInfo jobInfo = configDataJobConnectionInfo.m_jobInfo; if (jobInfo.Rank == 4) { list2.Add(configDataJobConnectionInfo); } } ConfigDataJobInfo jobInfo2 = list2[0].m_jobInfo; this.m_finalJob1CHNameText.text = jobInfo2.Name; this.m_finalJob1ENNameText.text = jobInfo2.Name_Eng; this.CreateSpineGraphic(list2[0], ref this.m_heroJobGraphic1, this.m_finalJob1GraphicObj); if (list2.Count == 2) { ConfigDataJobInfo jobInfo3 = list2[1].m_jobInfo; this.m_finalJob2Obj.SetActive(true); this.m_finalJob2CHNameText.text = jobInfo3.Name; this.m_finalJob2ENNameText.text = jobInfo3.Name_Eng; this.CreateSpineGraphic(list2[0], ref this.m_heroJobGraphic2, this.m_finalJob2GraphicObj); } else { this.m_finalJob2Obj.SetActive(false); } }
// Token: 0x06003C3F RID: 15423 RVA: 0x00111BFC File Offset: 0x0010FDFC private void UpdateJobConnectionInfo() { IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; this.JobConnectionInfo = configDataLoader.GetConfigDataJobConnectionInfo(this.JobRelatedId); }