private void CalculationCollectWeaponStat(TotalCollectionWeaponStat totalCollectionWeaponStat, string type, int index, int weaponindex) { switch (type) { case "Deffence": totalCollectionWeaponStat.def = totalCollectionWeaponStat.def + weapon[weaponindex].GetCollectionWeaponStatList()[index].cValue; break; case "Attack": totalCollectionWeaponStat.atk = totalCollectionWeaponStat.atk + weapon[weaponindex].GetCollectionWeaponStatList()[index].cValue; break; case "Hp": totalCollectionWeaponStat.hp = totalCollectionWeaponStat.hp + weapon[weaponindex].GetCollectionWeaponStatList()[index].cValue; break; case "AccuracyRate": totalCollectionWeaponStat.accuracyRate = totalCollectionWeaponStat.accuracyRate + weapon[weaponindex].GetCollectionWeaponStatList()[index].cValue; break; case "AvoidanceRate": totalCollectionWeaponStat.avoidanceRate = totalCollectionWeaponStat.avoidanceRate + weapon[weaponindex].GetCollectionWeaponStatList()[index].cValue; break; } }
// 무기의 총합 스탯을 주세요. public TotalCollectionWeaponStat GetTotalCollectionWeapon() { TotalCollectionWeaponStat totalCollectionWeaponStat = new TotalCollectionWeaponStat(); for (int i = 0; i < weapon.Count; i++) { if (weapon[i].lockedState) { CalculationCollectWeaponStat(totalCollectionWeaponStat, weapon[i].rowWeapon.cstatType1, 0, i); CalculationCollectWeaponStat(totalCollectionWeaponStat, weapon[i].rowWeapon.cstatType2, 1, i); } } return(totalCollectionWeaponStat); }
public TotalStat GetTotalStats() { TotalStat totalStat = new TotalStat(); TotalWeaponStat totalWeaponStat = GetTotlaWEaponStat(); TotalSkillStat totalSkillStat = GetTotalSkillStat(); TotalCollectionWeaponStat totalCollectionWeaponStat = GetTotalCollectionWeapon(); totalStat.atk = (int)((characterRow.atk + totalWeaponStat.atk + EnchantLevel) * totalSkillStat.atkMultiple + totalCollectionWeaponStat.atk); totalStat.def = (int)((characterRow.def + totalWeaponStat.def + EnchantLevel) * totalSkillStat.defMultiple + totalCollectionWeaponStat.def); totalStat.hp = (int)((characterRow.hp + totalWeaponStat.hp + EnchantLevel) * totalSkillStat.hpMultiple + totalCollectionWeaponStat.hp); totalStat.accuracyRate = 90 + totalCollectionWeaponStat.accuracyRate; totalStat.avoidanceRate = 10 + totalCollectionWeaponStat.avoidanceRate; totalStat.skillValue = totalSkillStat.skillValueMultiple; return(totalStat); }