fix shotgun dmg value / ticket 145

This commit is contained in:
XTigerHyperX 2021-05-23 07:47:56 +01:00
parent 3a6b166cf6
commit df27d650a8
No known key found for this signature in database
GPG Key ID: 8A8613BA3CC915BD

View File

@ -84,9 +84,9 @@ namespace FModel.Creator.Bases.FN
weaponStatHandle.TryGetValue(out UDataTable dataTable, "DataTable") &&
dataTable.TryGetDataTableRow(weaponRowName.Text, StringComparison.OrdinalIgnoreCase, out var weaponRowValue))
{
if (weaponRowValue.TryGetValue(out float dmgPb, "DmgPB") && dmgPb != 0f)
if (weaponRowValue.TryGetValue(out float dmgPb, "DmgPB") && dmgPb != 0f && weaponRowValue.TryGetValue(out int bpc , "BulletsPerCartridge")&& bpc != 0f)
{
_statistics.Add(new IconStat(Utils.GetLocalizedResource("", "BF7E3CF34A9ACFF52E95EAAD4F09F133", "Damage to Player"), dmgPb, 200));
_statistics.Add(new IconStat(Utils.GetLocalizedResource("", "BF7E3CF34A9ACFF52E95EAAD4F09F133", "Damage to Player"), dmgPb * bpc, 200));
}
if (weaponRowValue.TryGetValue(out int clipSize, "ClipSize") && clipSize != 0)