private void Setup(UnitData unit_data) { if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.m_TobiraStatusListItemTemplate, (UnityEngine.Object)null) || unit_data == null) { return; } ((Component)this.m_TobiraStatusListItemTemplate).get_gameObject().SetActive(false); TobiraParam[] array = ((IEnumerable <TobiraParam>)MonoSingleton <GameManager> .Instance.MasterParam.GetTobiraListForUnit(unit_data.UnitParam.iname)).Where <TobiraParam>((Func <TobiraParam, bool>)(tobiraParam => tobiraParam.TobiraCategory != TobiraParam.Category.START)).ToArray <TobiraParam>(); for (int index = 0; index < array.Length; ++index) { TobiraData tobiraData1 = unit_data.GetTobiraData(array[index].TobiraCategory); TobiraStatusListItem listItem = this.CreateListItem(); if (tobiraData1 != null) { listItem.SetTobiraLvIsMax(tobiraData1.IsMaxLv); } else { listItem.SetTobiraLvIsMax(false); } if (!array[index].Enable) { listItem.Setup(array[index]); } else { TobiraData tobiraData2 = new TobiraData(); tobiraData2.Setup(unit_data.UnitParam.iname, array[index].TobiraCategory, (int)MonoSingleton <GameManager> .Instance.MasterParam.FixParam.TobiraLvCap); listItem.Setup(tobiraData2); } } }
public static void CalcTobiraParameter(string unit_iname, TobiraParam.Category category, int lv, ref BaseStatus add, ref BaseStatus scale) { TobiraData tobiraData = new TobiraData(); if (!tobiraData.Setup(unit_iname, category, lv)) { return; } UnitParam unitParam = MonoSingleton <GameManager> .Instance.MasterParam.GetUnitParam(unit_iname); SkillData.GetHomePassiveBuffStatus(tobiraData.ParameterBuffSkill, unitParam == null ? EElement.None : unitParam.element, ref add, ref scale); }
public static List <TobiraData> CreateDummyData(UnitData unit) { TobiraParam[] tobiraListForUnit = MonoSingleton <GameManager> .Instance.MasterParam.GetTobiraListForUnit(unit.UnitParam.iname); List <TobiraData> tobiraDataList = new List <TobiraData>(); for (int index = 0; index < tobiraListForUnit.Length; ++index) { if (tobiraListForUnit[index] != null) { TobiraData tobiraData = new TobiraData(); tobiraData.Setup(tobiraListForUnit[index].UnitIname, tobiraListForUnit[index].TobiraCategory, index % 5 + 1); tobiraDataList.Add(tobiraData); } } return(tobiraDataList); }