private void Start() { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ItemSlotTemplate, (UnityEngine.Object)null)) { this.ItemSlotTemplate.SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UnusedSlotTemplate, (UnityEngine.Object)null)) { this.UnusedSlotTemplate.SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ItemSlotBox, (UnityEngine.Object)null)) { this.ItemSlotBox.SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SubPanel, (UnityEngine.Object)null)) { this.SubPanel.SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.QuestListItemTemplate, (UnityEngine.Object)null)) { this.QuestListItemTemplate.SetActive(false); } string categoryName = TobiraParam.GetCategoryName(this.mCurrentTobira.Param.TobiraCategory); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TitleText, (UnityEngine.Object)null)) { this.TitleText.set_text(string.Format(LocalizedText.Get("sys.TOBIRA_ENHANCE_ITEM_BTN_ENHANCE_TITLE"), (object)categoryName)); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MessageText, (UnityEngine.Object)null)) { this.MessageText.set_text(string.Format(LocalizedText.Get("sys.TOBIRA_ENHANCE_ITEM_BTN_ENHANCE_MESSAGE"), (object)categoryName)); } this.Refresh(); }
public static void CreateDummyData(Json_Unit[] units) { if (units == null) { return; } for (int index1 = 0; index1 < units.Length; ++index1) { Json_Unit unit = units[index1]; TobiraParam[] tobiraListForUnit = MonoSingleton <GameManager> .Instance.MasterParam.GetTobiraListForUnit(unit.iname); List <Json_Tobira> jsonTobiraList = new List <Json_Tobira>(); for (int index2 = 0; index2 < tobiraListForUnit.Length; ++index2) { TobiraParam tobiraParam = tobiraListForUnit[index2]; if (tobiraParam != null) { jsonTobiraList.Add(new Json_Tobira() { category = (int)tobiraParam.TobiraCategory, lv = index2 % 5 + 1 }); } } if (jsonTobiraList.Count > 0) { unit.doors = jsonTobiraList.ToArray(); } } }
public void Setup(TobiraData tobiraData) { if (tobiraData == null) { DebugUtility.LogError("tobiraDataがnullの時はSetup(TobiraParam param)を使用してください"); } else { this.m_Category = tobiraData.Param.TobiraCategory; this.m_TextTobiraName.set_text(TobiraParam.GetCategoryName(this.m_Category)); this.m_IconTobira.ImageIndex = (int)this.m_Category; if (tobiraData.IsLearnedLeaderSkill) { TobiraLearnSkill listItem = this.CreateListItem(); SkillData skill = new SkillData(); skill.Setup(tobiraData.LearnedLeaderSkillIname, 1, 1, (MasterParam)null); listItem.Setup(skill); } List <AbilityData> newAbilitys = new List <AbilityData>(); List <AbilityData> oldAbilitys = new List <AbilityData>(); TobiraUtility.TryCraeteAbilityData(tobiraData.Param, tobiraData.Lv, newAbilitys, oldAbilitys, false); for (int index = 0; index < newAbilitys.Count; ++index) { this.CreateListItem().Setup(newAbilitys[index]); } BaseStatus add = new BaseStatus(); BaseStatus scale = new BaseStatus(); TobiraUtility.CalcTobiraParameter(tobiraData.Param.UnitIname, this.m_Category, tobiraData.Lv, ref add, ref scale); this.m_StatusList.SetValues(add, scale, false); GameUtility.SetGameObjectActive(this.m_ObjectDetail, true); GameUtility.SetGameObjectActive(this.m_ObjectLock, false); GameUtility.SetGameObjectActive(this.m_ObjectCommingSoon, false); } }
public void Refresh(UnitData unitData, TobiraData tobiraData, TobiraParam tobiraParam) { if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.TobiraTitleText, (UnityEngine.Object)null)) { return; } this.TobiraTitleText.set_text(TobiraParam.GetCategoryName(tobiraParam.TobiraCategory)); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AdditionalLevelCap, (UnityEngine.Object)null)) { this.AdditionalLevelCap.set_text(MonoSingleton <GameManager> .Instance.MasterParam.FixParam.TobiraUnitLvCapBonus.ToString()); } if (tobiraData == null) { this.TobiraParamIconEnable.SetActive(false); this.TobiraParamIconDisable.SetActive(true); Array.ForEach <UnitTobiraParamLevel>(this.TobiraParamIconLevels, (Action <UnitTobiraParamLevel>)(paramLevel => paramLevel.Refresh(0))); this.LockView(unitData, tobiraParam); this.mTobiraParameters.ForEach((Action <GameObject>)(paramGO => UnityEngine.Object.Destroy((UnityEngine.Object)paramGO))); this.mTobiraParameters.Clear(); BaseStatus add = new BaseStatus(); BaseStatus scale = new BaseStatus(); TobiraUtility.CalcTobiraParameter(unitData.UnitID, tobiraParam.TobiraCategory, 1, ref add, ref scale); this.Status.SetValues(add, scale, true); TobiraConditionParam[] conditionsForUnit = MonoSingleton <GameManager> .Instance.MasterParam.GetTobiraConditionsForUnit(unitData.UnitID, tobiraParam.TobiraCategory); this.CreateConditionsItems(unitData, conditionsForUnit); } else { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TobiraIcons, (UnityEngine.Object)null)) { this.TobiraIcons.ImageIndex = (int)tobiraData.Param.TobiraCategory; } this.TobiraParamIconEnable.SetActive(tobiraData.IsUnlocked); this.TobiraParamIconDisable.SetActive(!tobiraData.IsUnlocked); int level = tobiraData.ViewLv; Array.ForEach <UnitTobiraParamLevel>(this.TobiraParamIconLevels, (Action <UnitTobiraParamLevel>)(paramLevel => paramLevel.Refresh(level))); if (tobiraData.IsUnlocked) { this.UnlockView(unitData, tobiraData); } else { this.LockView(unitData, tobiraParam); } this.mTobiraParameters.ForEach((Action <GameObject>)(paramGO => UnityEngine.Object.Destroy((UnityEngine.Object)paramGO))); this.mTobiraParameters.Clear(); BaseStatus add = new BaseStatus(); BaseStatus scale = new BaseStatus(); TobiraUtility.CalcTobiraParameter(unitData.UnitID, tobiraData.Param.TobiraCategory, tobiraData.Lv, ref add, ref scale); this.Status.SetValues(add, scale, false); this.SetActiveConditionsItems(false); } this.SetMasterBonusText(tobiraParam); }
public static SkillData CreateParameterBuffSkill(TobiraParam tobiraParam, int currentLv) { if (tobiraParam == null) { return((SkillData)null); } int tobiraLvCap = (int)MonoSingleton <GameManager> .Instance.MasterParam.FixParam.TobiraLvCap; SkillData skillData = new SkillData(); skillData.Setup(tobiraParam.SkillIname, currentLv, tobiraLvCap, (MasterParam)null); return(skillData); }
private void LockView(UnitData unitData, TobiraParam tobiraParam) { this.TobiraOpenButtonText.set_text(string.Format(LocalizedText.Get("sys.TOBIRA_INVENTORY_OPEN_TITLE"), (object)TobiraParam.GetCategoryName(tobiraParam.TobiraCategory))); this.mLockedLayout.SetActive(true); this.mTobiraConditionsLayout.SetActive(true); this.mUnlockedLayout.SetActive(false); this.mTobiraMasterBonusLayout.SetActive(false); this.mTobiraMasterEbaleLayout.SetActive(false); bool isEnable = TobiraUtility.IsClearAllToboraConditions(unitData, tobiraParam.TobiraCategory); ((Selectable)this.TobiraOpenButton.GetComponent <Button>()).set_interactable(isEnable); UnitTobiraParamWindow.SetHilightAnimationEnable(this.TobiraOpenButton, isEnable); }
public void Setup(TobiraParam param) { this.m_Category = param.TobiraCategory; this.m_TextTobiraName.set_text(TobiraParam.GetCategoryName(this.m_Category)); this.m_IconTobira.ImageIndex = (int)this.m_Category; if (param.Enable) { BaseStatus add = new BaseStatus(); BaseStatus scale = new BaseStatus(); TobiraUtility.CalcTobiraParameter(param.UnitIname, this.m_Category, 1, ref add, ref scale); this.m_StatusList.SetValues(add, scale, true); } GameUtility.SetGameObjectActive(this.m_ObjectDetail, param.Enable); GameUtility.SetGameObjectActive(this.m_ObjectLock, param.Enable); GameUtility.SetGameObjectActive(this.m_ObjectCommingSoon, !param.Enable); }
public bool Setup(string unit_iname, TobiraParam.Category category, int lv) { this.mLv = lv; this.mTobiraParam = MonoSingleton <GameManager> .Instance.MasterParam.GetTobiraParam(unit_iname, category); if (this.mTobiraParam == null) { return(false); } this.mParameterBuffSkill = TobiraUtility.CreateParameterBuffSkill(this.mTobiraParam, this.mLv); if (this.mTobiraParam.HasLeaerSkill && lv >= this.mTobiraParam.OverwriteLeaderSkillLevel) { this.mLearnedLeaderSkillIname = this.mTobiraParam.OverwriteLeaderSkillIname; } return(this.mParameterBuffSkill != null); }
public void Refresh() { Button component = (Button)((Component)this).GetComponent <Button>(); if (UnityEngine.Object.op_Equality((UnityEngine.Object)component, (UnityEngine.Object)null) || this.mCategory <= TobiraParam.Category.START || TobiraParam.Category.MAX <= this.mCategory) { ((Component)this).get_gameObject().SetActive(false); } this.TobiraEnableImages.ImageIndex = (int)(this.mCategory - 1); this.TobiraDisableImages.ImageIndex = (int)(this.mCategory - 1); this.mParam = MonoSingleton <GameManager> .Instance.MasterParam.GetTobiraParam(this.mUnit.UnitID, this.mCategory); if (this.mParam == null || !this.mParam.Enable) { ((Selectable)component).set_interactable(false); this.LockGO.SetActive(true); } else { TobiraData tobiraData = this.mUnit.TobiraData.Find((Predicate <TobiraData>)(tobira => tobira.Param.TobiraCategory == this.mCategory)); bool flag = tobiraData != null && tobiraData.IsUnlocked; if (!flag) { bool isEnable = TobiraUtility.IsClearAllToboraConditions(this.mUnit, this.mCategory); this.DisableGO.SetActive(true); this.SetHilightAnimationEnable(isEnable); this.EnableGO.SetActive(false); } else { this.DisableGO.SetActive(false); this.SetHilightAnimationEnable(false); this.EnableGO.SetActive(true); } if (this.LevelIconGOList == null || this.LevelIconGOList.Length == 0 || !flag) { return; } for (int index = 0; index < this.LevelIconGOList.Length; ++index) { if (!UnityEngine.Object.op_Equality((UnityEngine.Object) this.LevelIconGOList[index], (UnityEngine.Object)null)) { this.LevelIconGOList[index].SetActive(index < tobiraData.ViewLv); } } } }
public static void TryCraeteLeaderSkill(TobiraParam tobiraParam, int currentLv, ref SkillData skillData, bool isJust = false) { if (isJust) { if (tobiraParam.OverwriteLeaderSkillLevel != currentLv) { return; } skillData = new SkillData(); skillData.Setup(tobiraParam.OverwriteLeaderSkillIname, 1, 1, (MasterParam)null); } else { if (tobiraParam.OverwriteLeaderSkillLevel > currentLv) { return; } skillData = new SkillData(); skillData.Setup(tobiraParam.OverwriteLeaderSkillIname, 1, 1, (MasterParam)null); } }
public static void TryCraeteAbilityData(TobiraParam tobiraParam, int currentLv, List <AbilityData> newAbilitys, List <AbilityData> oldAbilitys, bool isJust = false) { List <TobiraLearnAbilityParam> learnAbilityParamList = !isJust ? ((IEnumerable <TobiraLearnAbilityParam>)tobiraParam.LeanAbilityParam).Where <TobiraLearnAbilityParam>((Func <TobiraLearnAbilityParam, bool>)(learnAbil => learnAbil.Level <= currentLv)).ToList <TobiraLearnAbilityParam>() : ((IEnumerable <TobiraLearnAbilityParam>)tobiraParam.LeanAbilityParam).Where <TobiraLearnAbilityParam>((Func <TobiraLearnAbilityParam, bool>)(learnAbil => learnAbil.Level == currentLv)).ToList <TobiraLearnAbilityParam>(); newAbilitys.Clear(); oldAbilitys.Clear(); newAbilitys.Capacity = learnAbilityParamList.Count; oldAbilitys.Capacity = learnAbilityParamList.Count; for (int index = 0; index < learnAbilityParamList.Count; ++index) { AbilityData abilityData1 = new AbilityData(); AbilityData abilityData2 = (AbilityData)null; abilityData1.Setup((UnitData)null, 0L, learnAbilityParamList[index].AbilityIname, 1, 0); newAbilitys.Add(abilityData1); if (!string.IsNullOrEmpty(learnAbilityParamList[index].AbilityOverwrite) && (learnAbilityParamList[index].AbilityAddType == TobiraLearnAbilityParam.AddType.JobOverwrite || learnAbilityParamList[index].AbilityAddType == TobiraLearnAbilityParam.AddType.MasterOverwrite)) { abilityData2 = new AbilityData(); abilityData2.Setup((UnitData)null, 0L, learnAbilityParamList[index].AbilityOverwrite, 0, 0); } oldAbilitys.Add(abilityData2); } }
private void SetMasterBonusText(TobiraParam tobiraParam) { if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.TobiraMasterEffectText, (UnityEngine.Object)null) || UnityEngine.Object.op_Equality((UnityEngine.Object) this.TobiraMasterEffectDescText, (UnityEngine.Object)null)) { return; } int tobiraLvCap = (int)MonoSingleton <GameManager> .Instance.MasterParam.FixParam.TobiraLvCap; this.TobiraMasterEffectText.set_text(string.Empty); this.TobiraMasterEffectDescText.set_text(string.Empty); List <AbilityData> newAbilitys = new List <AbilityData>(); List <AbilityData> oldAbilitys = new List <AbilityData>(); TobiraUtility.TryCraeteAbilityData(tobiraParam, tobiraLvCap, newAbilitys, oldAbilitys, true); if (newAbilitys.Count > 0) { AbilityParam abilityParam = oldAbilitys[0] == null ? (AbilityParam)null : oldAbilitys[0].Param; if (abilityParam != null) { this.TobiraMasterEffectText.set_text(string.Format(LocalizedText.Get("sys.TOBIRA_MASTER_OVERRIDE_NEW_ABILITY_TEXT"), (object)abilityParam.name, (object)newAbilitys[0].Param.name)); this.TobiraMasterEffectDescText.set_text(string.Format(LocalizedText.Get("sys.TOBIRA_MASTER_TEXT_DESC"), (object)newAbilitys[0].Param.expr)); } else { this.TobiraMasterEffectText.set_text(string.Format(LocalizedText.Get("sys.TOBIRA_MASTER_NEW_ABILITY_TEXT"), (object)newAbilitys[0].Param.name)); this.TobiraMasterEffectDescText.set_text(string.Format(LocalizedText.Get("sys.TOBIRA_MASTER_TEXT_DESC"), (object)newAbilitys[0].Param.expr)); } } SkillData skillData = (SkillData)null; TobiraUtility.TryCraeteLeaderSkill(tobiraParam, tobiraLvCap, ref skillData, true); if (skillData == null) { return; } this.TobiraMasterEffectText.set_text(string.Format(LocalizedText.Get("sys.TOBIRA_MASTER_NEW_LEADER_SKILL_TEXT"), (object)skillData.SkillParam.name)); this.TobiraMasterEffectDescText.set_text(string.Format(LocalizedText.Get("sys.TOBIRA_MASTER_TEXT_DESC"), (object)skillData.SkillParam.expr)); }
private void UnlockView(UnitData unitData, TobiraData tobiraData) { this.TobiraLevelUpButtonText.set_text(string.Format(LocalizedText.Get("sys.TOBIRA_INVENTORY_BTN_LV_UP"), (object)TobiraParam.GetCategoryName(tobiraData.Param.TobiraCategory))); this.TobiraLevelUpButton.SetActive(true); this.mLockedLayout.SetActive(!tobiraData.IsUnlocked); this.mTobiraConditionsLayout.SetActive(!tobiraData.IsUnlocked); this.mUnlockedLayout.SetActive(tobiraData.IsUnlocked); this.mTobiraMasterBonusLayout.SetActive(tobiraData.IsUnlocked); if (tobiraData.IsMaxLv) { this.TobiraLevelUpButton.SetActive(false); this.mTobiraMasterEbaleLayout.SetActive(true); } else { this.TobiraLevelUpButton.SetActive(true); this.mTobiraMasterEbaleLayout.SetActive(false); bool isEnable = TobiraUtility.IsClearAllToboraRecipe(unitData, tobiraData.Param.TobiraCategory, tobiraData.Lv); ((Selectable)this.TobiraOpenButton.GetComponent <Button>()).set_interactable(isEnable); UnitTobiraParamWindow.SetHilightAnimationEnable(this.TobiraLevelUpButton, isEnable); } }
public Json_Unit GetJson_Unit() { GameManager instance = MonoSingleton <GameManager> .Instance; if (Object.op_Equality((Object)instance, (Object)null)) { return((Json_Unit)null); } if (instance.GetUnitParam(this.mUnitIName) == null) { return((Json_Unit)null); } Json_Unit jsonUnit = new Json_Unit(); jsonUnit.iid = this.mDraftUnitId; jsonUnit.iname = this.mUnitIName; jsonUnit.rare = this.mRare; jsonUnit.plus = this.mAwake; jsonUnit.exp = instance.MasterParam.GetUnitLevelExp(this.mLevel); jsonUnit.lv = this.mLevel; jsonUnit.fav = 0; jsonUnit.elem = 0; jsonUnit.select = new Json_UnitSelectable(); jsonUnit.jobs = new Json_Job[this.mVersusDraftUnitJobs.Count]; for (int index1 = 0; index1 < this.mVersusDraftUnitJobs.Count; ++index1) { JobParam jobParam = instance.GetJobParam(this.mVersusDraftUnitJobs[index1].mIName); if (jobParam != null && jobParam.ranks.Length > this.mVersusDraftUnitJobs[index1].mRank) { JobRankParam rank = jobParam.ranks[this.mVersusDraftUnitJobs[index1].mRank]; Json_Job jsonJob = new Json_Job(); jsonJob.iid = this.mDummyIID * 10L + (long)index1; jsonJob.iname = this.mVersusDraftUnitJobs[index1].mIName; jsonJob.rank = this.mVersusDraftUnitJobs[index1].mRank; jsonJob.equips = new Json_Equip[JobRankParam.MAX_RANKUP_EQUIPS]; if (this.mVersusDraftUnitJobs[index1].mEquip) { for (int index2 = 0; index2 < JobRankParam.MAX_RANKUP_EQUIPS; ++index2) { jsonJob.equips[index2] = new Json_Equip() { iid = jsonJob.iid * 10L + (long)index2, iname = rank.equips[index2] } } ; } jsonJob.select = new Json_JobSelectable(); jsonJob.select.abils = new long[5]; jsonJob.select.artifacts = new long[3]; List <Json_Ability> jsonAbilityList = new List <Json_Ability>(); List <string> stringList = new List <string>(); stringList.Add(jobParam.fixed_ability); for (int index2 = 1; index2 <= jsonJob.rank; ++index2) { if (jobParam.ranks.Length >= index2 && jobParam.ranks[index2] != null && jobParam.ranks[index2].learnings != null) { for (int index3 = 0; index3 < jobParam.ranks[index2].learnings.Length; ++index3) { stringList.Add((string)jobParam.ranks[index2].learnings[index3]); } } } for (int index2 = 0; index2 < stringList.Count; ++index2) { Json_Ability jsonAbility = new Json_Ability(); jsonAbility.iid = jsonJob.iid * 10L + (long)index2; jsonAbility.iname = stringList[index2]; jsonAbility.exp = 0; jsonAbilityList.Add(jsonAbility); if (this.mAbilities.ContainsKey(jsonAbility.iname)) { jsonAbility.exp = this.mAbilities[jsonAbility.iname].mLevel - 1; jsonAbility.iid = this.mAbilities[jsonAbility.iname].mIID; } } jsonJob.abils = jsonAbilityList.ToArray(); if (index1 == this.mSelectJobIndex) { jsonUnit.select.job = jsonJob.iid; jsonJob.artis = new Json_Artifact[3]; for (int index2 = 0; index2 < this.mVersusDraftUnitArtifacts.Count; ++index2) { Json_Artifact jsonArtifact = new Json_Artifact(); jsonArtifact.iid = jsonJob.iid * 100L + (long)index2; jsonArtifact.iname = this.mVersusDraftUnitArtifacts[index2].mIName; jsonArtifact.rare = this.mVersusDraftUnitArtifacts[index2].mRare; jsonArtifact.exp = ArtifactData.StaticCalcExpFromLevel(this.mVersusDraftUnitArtifacts[index2].mLevel); jsonJob.artis[index2] = jsonArtifact; jsonJob.select.artifacts[index2] = jsonArtifact.iid; } int index3 = 0; using (Dictionary <string, VersusDraftUnitAbility> .ValueCollection.Enumerator enumerator = this.mAbilities.Values.GetEnumerator()) { while (enumerator.MoveNext()) { VersusDraftUnitAbility current = enumerator.Current; jsonJob.select.abils[index3] = current.mIID; ++index3; } } jsonJob.cur_skin = this.mSkinIName; } jsonUnit.jobs[index1] = jsonJob; } } if (!string.IsNullOrEmpty(this.mMasterAbilityIName)) { jsonUnit.abil = new Json_MasterAbility(); jsonUnit.abil.iid = this.mDummyIID; jsonUnit.abil.iname = this.mMasterAbilityIName; jsonUnit.abil.exp = 0; } ConceptCardParam conceptCardParam = instance.MasterParam.GetConceptCardParam(this.mConceptCardIName); if (conceptCardParam != null) { RarityParam rarityParam = instance.GetRarityParam(conceptCardParam.rare); jsonUnit.concept_card = new JSON_ConceptCard(); jsonUnit.concept_card.iname = this.mConceptCardIName; jsonUnit.concept_card.iid = this.mDummyIID; jsonUnit.concept_card.plus = (int)rarityParam.ConceptCardAwakeCountMax; jsonUnit.concept_card.exp = instance.MasterParam.GetConceptCardLevelExp(conceptCardParam.rare, this.mConceptCardLevel); jsonUnit.concept_card.trust = 0; jsonUnit.concept_card.trust_bonus = 0; jsonUnit.concept_card.fav = 0; } jsonUnit.doors = new Json_Tobira[this.mVersusDraftUnitDoors.Count]; List <Json_Ability> jsonAbilityList1 = new List <Json_Ability>(); for (int index1 = 0; index1 < this.mVersusDraftUnitDoors.Count; ++index1) { Json_Tobira jsonTobira = new Json_Tobira(); jsonTobira.category = (int)this.mVersusDraftUnitDoors[index1].mCategory; jsonTobira.lv = this.mVersusDraftUnitDoors[index1].mLevel; jsonUnit.doors[index1] = jsonTobira; TobiraParam tobiraParam = instance.MasterParam.GetTobiraParam(this.mUnitIName, this.mVersusDraftUnitDoors[index1].mCategory); if (tobiraParam != null) { for (int index2 = 0; index2 < tobiraParam.LeanAbilityParam.Length; ++index2) { TobiraLearnAbilityParam learnAbilityParam = tobiraParam.LeanAbilityParam[index2]; if (learnAbilityParam.Level <= jsonTobira.lv) { switch (learnAbilityParam.AbilityAddType) { case TobiraLearnAbilityParam.AddType.JobOverwrite: for (int index3 = 0; index3 < jsonUnit.jobs.Length; ++index3) { for (int index4 = 0; index4 < jsonUnit.jobs[index3].abils.Length; ++index4) { if (jsonUnit.jobs[index3].abils[index4].iname == learnAbilityParam.AbilityOverwrite) { jsonUnit.jobs[index3].abils[index4].iname = learnAbilityParam.AbilityIname; if (this.mAbilities.ContainsKey(learnAbilityParam.AbilityIname)) { jsonUnit.jobs[index3].abils[index4].iid = this.mAbilities[learnAbilityParam.AbilityIname].mIID; jsonUnit.jobs[index3].abils[index4].exp = this.mAbilities[learnAbilityParam.AbilityIname].mLevel - 1; } } } } continue; case TobiraLearnAbilityParam.AddType.MasterAdd: jsonAbilityList1.Add(new Json_Ability() { iid = this.mDummyIID * 100L + (long)(index1 * 10) + (long)index2, iname = learnAbilityParam.AbilityIname, exp = 0 }); continue; default: continue; } } } } } jsonUnit.door_abils = jsonAbilityList1.ToArray(); return(jsonUnit); } }