//============================================================================* // ProcessAmmo() //============================================================================* public void ProcessAmmo() { m_nNumBadAmmo = 0; m_nNumAmmoTests = 0; m_nNumBadAmmoTests = 0; foreach (cAmmo Ammo in m_DataFiles.AmmoList) { if (!Ammo.Validate()) { m_nNumBadAmmo++; } ProcessTransactionList(Ammo); m_nNumAmmoTests += Ammo.TestList.Count(); bool fFirearmFound = false; foreach (cAmmoTest AmmoTest in Ammo.TestList) { if (!AmmoTest.Validate()) { m_nNumBadAmmoTests++; } if (Ammo.CompareTo(AmmoTest.Ammo) != 0) { m_nNumBadAmmoTests++; } if (AmmoTest.Firearm != null) { foreach (cFirearm firearm in m_DataFiles.FirearmList) { if (firearm.CompareTo(AmmoTest.Firearm) == 0) { fFirearmFound = true; break; } } if (!fFirearmFound) { m_nNumBadAmmoTests++; } } m_nNumTestShots += AmmoTest.TestShotList.Count; foreach (cTestShot TestShot in AmmoTest.TestShotList) { if (!TestShot.Validate()) { m_nNumBadTestShots++; } } } } }