mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile] Fix contains, split
This commit is contained in:
@@ -1258,7 +1258,7 @@ namespace SabreTools.Library.DatFiles
|
|||||||
{
|
{
|
||||||
if (_items.ContainsKey(key))
|
if (_items.ContainsKey(key))
|
||||||
{
|
{
|
||||||
contains = _items.ContainsKey(key);
|
contains = _items[key].Contains(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1329,14 +1329,10 @@ namespace SabreTools.Library.DatFiles
|
|||||||
|
|
||||||
lock (_items)
|
lock (_items)
|
||||||
{
|
{
|
||||||
// While the key is in the dictionary and the item is there, remove it
|
// Remove the statistics first
|
||||||
if (_items.ContainsKey(key) && _items[key].Contains(value))
|
_datStats.RemoveItem(value);
|
||||||
{
|
|
||||||
// Remove the statistics first
|
|
||||||
_datStats.RemoveItem(value);
|
|
||||||
|
|
||||||
_items[key].Remove(value);
|
_items[key].Remove(value);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3004,7 +3000,10 @@ namespace SabreTools.Library.DatFiles
|
|||||||
foreach (DatItem item in parentItems)
|
foreach (DatItem item in parentItems)
|
||||||
{
|
{
|
||||||
DatItem datItem = (DatItem)item.Clone();
|
DatItem datItem = (DatItem)item.Clone();
|
||||||
Remove(game, datItem);
|
while (this[game].Contains(datItem))
|
||||||
|
{
|
||||||
|
Remove(game, datItem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we want to get the parent romof tag and put it in each of the items
|
// Now we want to get the parent romof tag and put it in each of the items
|
||||||
|
|||||||
Reference in New Issue
Block a user