public ItemStatus[] GetEquipTypeSkillParam() { ItemStatus[] array = new ItemStatus[MonoBehaviourSingleton <StatusManager> .I.ENABLE_EQUIP_TYPE_MAX + 1]; int i = 0; for (int num = array.Length; i < num; i++) { array[i] = new ItemStatus(); } if (!tableData.IsPassive()) { return(array); } GrowSkillItemTable.GrowSkillItemData growSkillItemData = Singleton <GrowSkillItemTable> .I.GetGrowSkillItemData(tableData.growID, level); if (growSkillItemData == null) { return(array); } ENABLE_EQUIP_TYPE[] array2 = (ENABLE_EQUIP_TYPE[])Enum.GetValues(typeof(ENABLE_EQUIP_TYPE)); int j = 0; for (int num2 = array2.Length; j < num2; j++) { ItemStatus itemStatus = array[j]; for (int k = 0; k < 3; k++) { if (tableData.supportType[k] != BuffParam.BUFFTYPE.NONE && tableData.IsEnableSupportEquipType(array2[j], k)) { int growParamSupprtValue = growSkillItemData.GetGrowParamSupprtValue(tableData.supportValue, k); switch (tableData.supportType[k]) { case BuffParam.BUFFTYPE.DEFENCE_NORMAL: itemStatus.def += growParamSupprtValue; break; case BuffParam.BUFFTYPE.ATTACK_NORMAL: itemStatus.atk += growParamSupprtValue; break; case BuffParam.BUFFTYPE.ATTACK_FIRE: itemStatus.elemAtk[0] += growParamSupprtValue; break; case BuffParam.BUFFTYPE.ATTACK_WATER: itemStatus.elemAtk[1] += growParamSupprtValue; break; case BuffParam.BUFFTYPE.ATTACK_THUNDER: itemStatus.elemAtk[2] += growParamSupprtValue; break; case BuffParam.BUFFTYPE.ATTACK_SOIL: itemStatus.elemAtk[3] += growParamSupprtValue; break; case BuffParam.BUFFTYPE.ATTACK_LIGHT: itemStatus.elemAtk[4] += growParamSupprtValue; break; case BuffParam.BUFFTYPE.ATTACK_DARK: itemStatus.elemAtk[5] += growParamSupprtValue; break; case BuffParam.BUFFTYPE.ATTACK_ALLELEMENT: itemStatus.elemAtk[0] += (itemStatus.elemAtk[1] = (itemStatus.elemAtk[2] = (itemStatus.elemAtk[3] = (itemStatus.elemAtk[4] = (itemStatus.elemAtk[5] = growParamSupprtValue))))); break; } } } } return(array); }
public void Parse(CharaInfo.EquipItem item, EquipItemTable.EquipItemData data) { _Reset(); type = data.type; spAttackType = data.spAttackType; GrowEquipItemTable.GrowEquipItemData growEquipItemData = Singleton <GrowEquipItemTable> .I.GetGrowEquipItemData(data.growID, (uint)item.lv); if (object.ReferenceEquals(growEquipItemData, null)) { baseStatus.hp = data.baseHp; baseStatus.attacks[0] = data.baseAtk; baseStatus.defences[0] = data.baseDef; for (int i = 0; i < 6; i++) { baseStatus.attacks[i + 1] = data.atkElement[i]; baseStatus.tolerances[i] = data.defElement[i]; } } else { baseStatus.hp = growEquipItemData.GetGrowParamHp(data.baseHp); baseStatus.attacks[0] = growEquipItemData.GetGrowParamAtk(data.baseAtk); baseStatus.defences[0] = growEquipItemData.GetGrowParamDef(data.baseDef); int[] growParamElemAtk = growEquipItemData.GetGrowParamElemAtk(data.atkElement); int[] growParamElemDef = growEquipItemData.GetGrowParamElemDef(data.defElement); for (int j = 0; j < 6; j++) { baseStatus.attacks[j + 1] = growParamElemAtk[j]; baseStatus.tolerances[j] = growParamElemDef[j]; } } EquipItemExceedParamTable.EquipItemExceedParamAll exceedParam = data.GetExceedParam((uint)item.exceed); if (!object.ReferenceEquals(exceedParam, null)) { baseStatus.hp += exceedParam.hp; baseStatus.attacks[0] += exceedParam.atk; baseStatus.defences[0] += exceedParam.def; for (int k = 0; k < 6; k++) { baseStatus.attacks[k + 1] += exceedParam.atkElement[k]; baseStatus.tolerances[k] += exceedParam.defElement[k]; } } int l = 0; for (int count = item.sIds.Count; l < count; l++) { SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)item.sIds[l]); GrowSkillItemTable.GrowSkillItemData growSkillItemData = Singleton <GrowSkillItemTable> .I.GetGrowSkillItemData(skillItemData.growID, item.sLvs[l]); constHp += growSkillItemData.GetGrowParamHp(skillItemData.baseHp); constAtks[0] += growSkillItemData.GetGrowParamAtk(skillItemData.baseAtk); constDefs[0] += growSkillItemData.GetGrowParamDef(skillItemData.baseDef); int[] growParamElemAtk2 = growSkillItemData.GetGrowParamElemAtk(skillItemData.atkElement); int[] growParamElemDef2 = growSkillItemData.GetGrowParamElemDef(skillItemData.defElement); for (int m = 0; m < 6; m++) { constAtks[m + 1] += growParamElemAtk2[m]; constTols[m] += growParamElemDef2[m]; } if (skillItemData.IsPassive()) { int n = 0; for (int num = skillItemData.supportType.Length; n < num; n++) { if (skillItemData.supportType[n] != BuffParam.BUFFTYPE.NONE) { skillSupport.Add(new SkillSupport(skillItemData.supportPassiveEqType[n], skillItemData.supportType[n], growSkillItemData.GetGrowParamSupprtValue(skillItemData.supportValue, n), skillItemData.supportPassiveSpAttackType)); } } } } int num2 = 0; for (int count2 = item.aIds.Count; num2 < count2; num2++) { int num3 = item.aIds[num2]; int num4 = item.aPts[num2]; if (this.ability.ContainsKey(num3)) { Dictionary <int, int> dictionary; Dictionary <int, int> dictionary2 = dictionary = this.ability; int key; int key2 = key = num3; key = dictionary[key]; dictionary2[key2] = key + num4; } else { this.ability.Add(num3, num4); } } int num5 = 0; for (int num6 = data.fixedAbility.Length; num5 < num6; num5++) { EquipItem.Ability ability = data.fixedAbility[num5]; if (this.ability.ContainsKey(ability.id)) { Dictionary <int, int> dictionary3; Dictionary <int, int> dictionary4 = dictionary3 = this.ability; int key; int key3 = key = ability.id; key = dictionary3[key]; dictionary4[key3] = key + ability.pt; } else { this.ability.Add(ability.id, ability.pt); } } if (!object.ReferenceEquals(exceedParam, null)) { int num7 = 0; for (int num8 = exceedParam.ability.Length; num7 < num8; num7++) { EquipItem.Ability ability2 = exceedParam.ability[num7]; if (this.ability.ContainsKey(ability2.id)) { Dictionary <int, int> dictionary5; Dictionary <int, int> dictionary6 = dictionary5 = this.ability; int key; int key4 = key = ability2.id; key = dictionary5[key]; dictionary6[key4] = key + ability2.pt; } else { this.ability.Add(ability2.id, ability2.pt); } } } }