Pass Map list into CreateStaticLootDistribution

This commit is contained in:
Dev 2024-04-22 19:08:40 +01:00
parent e1de79f0be
commit 7002b60e02
2 changed files with 13 additions and 6 deletions

View File

@ -146,7 +146,7 @@ public class MultithreadSteppedDumpProcessor : IDumpProcessor
// Static loot distribution
output.Add(
OutputFileType.StaticLoot,
StaticLootProcessor.CreateStaticLootDistribution(dumpProcessData.ContainerCounts)
StaticLootProcessor.CreateStaticLootDistribution(dumpProcessData.ContainerCounts, staticContainers)
);
if (LoggerFactory.GetInstance().CanBeLogged(LogLevel.Info))

View File

@ -113,17 +113,24 @@ public static class StaticLootProcessor
}
public static Dictionary<string, StaticItemDistribution> CreateStaticLootDistribution(
List<PreProcessedStaticLoot> container_counts
)
List<PreProcessedStaticLoot> container_counts,
Dictionary<string, MapStaticLoot> staticContainers)
{
// Iterate over each map we have containers for
foreach (var map in staticContainers)
{
var mapName = map.Key;
var mapContainers = map.Value;
}
var static_loot_distribution = new Dictionary<string, StaticItemDistribution>();
var types = Enumerable.Distinct((from ci in container_counts
var uniqueContainerTypeIds = Enumerable.Distinct((from ci in container_counts
select ci.Type).ToList());
foreach (var typei in types)
foreach (var typeId in uniqueContainerTypeIds)
{
var container_counts_selected = (from ci in container_counts
where ci.Type == typei
where ci.Type == typeId
select ci).ToList();
var itemscounts = new List<int>();
foreach (var ci in container_counts_selected)