merge into main #1

Merged
chomp merged 35 commits from WeightedSystem into master 2023-08-15 05:29:21 -04:00
Showing only changes of commit 64ceb6684b - Show all commits

View File

@ -15,27 +15,27 @@ namespace Generator.Helpers.Gear
var itemsWithModsInRawBot = new List<Item>(); var itemsWithModsInRawBot = new List<Item>();
foreach (var inv in rawParsedBot.Inventory.items.Where(x => x.slotId == "mod_magazine")) //foreach (var inv in rawParsedBot.Inventory.items.Where(x => x.slotId == "mod_magazine"))
{ //{
var count = rawParsedBot.Inventory.items.Where(x => x.slotId == "mod_magazine").Count(); //var count = rawParsedBot.Inventory.items.Where(x => x.slotId == "mod_magazine").Count();
if (inv._tpl == "60dc519adf4c47305f6d410d") // if (inv._tpl == "60dc519adf4c47305f6d410d")
{ // {
var y = 1; // var y = 1;
} // }
} //}
modItemsInRawBot = rawParsedBot.Inventory.items modItemsInRawBot = rawParsedBot.Inventory.items
.Where(x => x.slotId != null && (x.slotId.StartsWith("mod_") || x.slotId.StartsWith("patron_in_weapon"))).ToList(); .Where(x => x.slotId != null && (x.slotId.StartsWith("mod_") || x.slotId.StartsWith("patron_in_weapon"))).ToList();
var x = new List<Item>(); //var x = new List<Item>();
foreach (var item in rawParsedBot.Inventory.items.Where(x=>x.slotId == "mod_magazine")) //foreach (var item in rawParsedBot.Inventory.items.Where(x=>x.slotId == "mod_magazine"))
{ //{
if (item._tpl == "60dc519adf4c47305f6d410d") // if (item._tpl == "60dc519adf4c47305f6d410d")
{ // {
var wow = 1; // var wow = 1;
} // }
x.Add(item); // x.Add(item);
} //}
// get items with Mods by iterating over mod items and getting the parent item // get items with Mods by iterating over mod items and getting the parent item
itemsWithModsInRawBot.AddRange(modItemsInRawBot itemsWithModsInRawBot.AddRange(modItemsInRawBot
@ -56,7 +56,7 @@ namespace Generator.Helpers.Gear
var subItems = rawParsedBot.Inventory.items.Where(x => x.parentId == modAdded._id && x.slotId != "cartridges").ToList(); var subItems = rawParsedBot.Inventory.items.Where(x => x.parentId == modAdded._id && x.slotId != "cartridges").ToList();
if (subItems.Count > 0) if (subItems.Count > 0)
{ {
AddItemToDictionary(itemToAdd, subItems, itemsWithModsDictionary); AddItemToDictionary(modAdded, subItems, itemsWithModsDictionary);
} }
} }
} }