diff options
Diffstat (limited to 'OpenSim/Region/Storage')
-rw-r--r-- | OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index f9ab0c5..8bad730 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | |||
@@ -340,18 +340,24 @@ namespace OpenSim.DataStore.MonoSqlite | |||
340 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); | 340 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); |
341 | DataRow[] dbItemRows = dbItems.Select(sql); | 341 | DataRow[] dbItemRows = dbItems.Select(sql); |
342 | 342 | ||
343 | IDictionary<LLUUID, SceneObjectPart.TaskInventoryItem> inventory | 343 | IList<SceneObjectPart.TaskInventoryItem> inventory = new List<SceneObjectPart.TaskInventoryItem>(); |
344 | = new Dictionary<LLUUID, SceneObjectPart.TaskInventoryItem>(); | ||
345 | 344 | ||
346 | foreach (DataRow row in dbItemRows) | 345 | foreach (DataRow row in dbItemRows) |
347 | { | 346 | { |
348 | SceneObjectPart.TaskInventoryItem item = buildItem(row); | 347 | SceneObjectPart.TaskInventoryItem item = buildItem(row); |
349 | inventory.Add(item.item_id, item); | 348 | inventory.Add(item); |
350 | 349 | ||
351 | MainLog.Instance.Verbose("DATASTORE", "Restored item {0}, {1}", item.name, item.item_id); | 350 | MainLog.Instance.Verbose("DATASTORE", "Restored item {0}, {1}", item.name, item.item_id); |
352 | } | 351 | } |
353 | 352 | ||
354 | prim.TaskInventory = inventory; | 353 | prim.AddInventoryItems(inventory); |
354 | |||
355 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in | ||
356 | // every item). This data should really be stored in the prim table itself. | ||
357 | if (dbItemRows.Length > 0) | ||
358 | { | ||
359 | prim.FolderID = inventory[0].parent_id; | ||
360 | } | ||
355 | } | 361 | } |
356 | 362 | ||
357 | public void StoreTerrain(double[,] ter, LLUUID regionID) | 363 | public void StoreTerrain(double[,] ter, LLUUID regionID) |