diff --git a/SabreTools.DatFiles/ItemDictionaryDB.cs b/SabreTools.DatFiles/ItemDictionaryDB.cs index 81dcc620..80005d1b 100644 --- a/SabreTools.DatFiles/ItemDictionaryDB.cs +++ b/SabreTools.DatFiles/ItemDictionaryDB.cs @@ -100,9 +100,10 @@ namespace SabreTools.DatFiles /// /// Add an item, returning the insert index /// - public long AddItem(DatItem item) + public long AddItem(DatItem item, long machineIndex) { _items[_itemIndex++] = item; + _itemToMachineMapping[_itemIndex - 1] = machineIndex; DatStatistics.AddItemStatistics(item); return _itemIndex - 1; }