diff options
author | Justin Clarke Casey | 2008-01-06 01:16:06 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-01-06 01:16:06 +0000 |
commit | 7cedb098699fe31ac906c95d1b1fd906dd502955 (patch) | |
tree | 4db199055848d6c50b8ad6e516d739fde305656e /OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite | |
parent | Thank you, CharlieO for: miscellaneous folders for inventory files (diff) | |
download | opensim-SC_OLD-7cedb098699fe31ac906c95d1b1fd906dd502955.zip opensim-SC_OLD-7cedb098699fe31ac906c95d1b1fd906dd502955.tar.gz opensim-SC_OLD-7cedb098699fe31ac906c95d1b1fd906dd502955.tar.bz2 opensim-SC_OLD-7cedb098699fe31ac906c95d1b1fd906dd502955.tar.xz |
Prim inventory phase 4. Properly recover the prim folder ID from storage. Scripts now show up in prim inventories after region restart.
Probably doesn't yet work for any items other than scripts.
Still some work to do. No user functionality exposed. Not yet user tieable into normal code.
Diffstat (limited to 'OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite')
-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) |