mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Write RemoveItemsFromRomOfChild tests, fix issues
This commit is contained in:
@@ -1101,10 +1101,10 @@ namespace SabreTools.DatFiles
|
||||
// If the parent exists and has items, we remove the items that are in the parent from the current game
|
||||
foreach (DatItem item in parentItems)
|
||||
{
|
||||
DatItem datItem = (DatItem)item.Clone();
|
||||
while (items.Contains(datItem))
|
||||
var matchedItems = items.FindAll(i => i.Equals(item));
|
||||
foreach (var match in matchedItems)
|
||||
{
|
||||
Items.Remove(bucket, datItem);
|
||||
Items.Remove(bucket, match);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1147,7 +1147,7 @@ namespace SabreTools.DatFiles
|
||||
// If the parent exists and has items, we remove the items that are in the parent from the current game
|
||||
foreach (var item in parentItems)
|
||||
{
|
||||
var matchedItems = items.Where(i => i.Value == item.Value);
|
||||
var matchedItems = items.Where(i => i.Value.Equals(item.Value));
|
||||
foreach (var match in matchedItems)
|
||||
{
|
||||
ItemsDB.RemoveItem(match.Key);
|
||||
|
||||
Reference in New Issue
Block a user