Nullguard

This commit is contained in:
Dev 2023-08-13 16:34:06 +01:00
parent 5f20616e26
commit a69d83b50d
2 changed files with 6 additions and 1 deletions

View File

@ -140,7 +140,11 @@ public class MultithreadSteppedDumpProcessor : IDumpProcessor
{
if (mapName == "Streets of Tarkov")
{
return Math.Round((double)(LootDumpProcessorContext.GetTarkovItems().GetProbabilityByContainerId(td.Key.Id).probability), 2);
var result = LootDumpProcessorContext.GetTarkovItems().GetProbabilityByContainerId(td.Key.Id);
if (result != null)
{
return Math.Round((double)(result.probability), 2);
}
}
return Math.Round((double)((decimal)td.Value / (decimal)mapDumpCounter[mapName]), 2);

View File

@ -66,6 +66,7 @@ public class StaticLootProcessor
foreach (var item in data)
{
// remove all but first item from containers items
item.Items = new List<Item> { item.Items[0] };
}