aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs22
1 files changed, 10 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 1dcdc06..0694576 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -193,7 +193,7 @@ namespace OpenSim.Region.Framework.Scenes
193 193
194 AssetBase asset = 194 AssetBase asset =
195 CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data); 195 CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data);
196 CommsManager.AssetCache.AddAsset(asset); 196 AssetService.Store(asset);
197 197
198 item.AssetID = asset.FullID; 198 item.AssetID = asset.FullID;
199 userInfo.UpdateItem(item); 199 userInfo.UpdateItem(item);
@@ -279,7 +279,7 @@ namespace OpenSim.Region.Framework.Scenes
279 } 279 }
280 280
281 AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data); 281 AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data);
282 CommsManager.AssetCache.AddAsset(asset); 282 AssetService.Store(asset);
283 283
284 if (isScriptRunning) 284 if (isScriptRunning)
285 { 285 {
@@ -688,9 +688,7 @@ namespace OpenSim.Region.Framework.Scenes
688 } 688 }
689 } 689 }
690 690
691 AssetBase asset 691 AssetBase asset = AssetService.Get(item.AssetID.ToString());
692 = CommsManager.AssetCache.GetAsset(
693 item.AssetID, (item.AssetType == (int)AssetType.Texture ? true : false));
694 692
695 if (asset != null) 693 if (asset != null)
696 { 694 {
@@ -911,7 +909,7 @@ namespace OpenSim.Region.Framework.Scenes
911 } 909 }
912 910
913 AssetBase asset = CreateAsset(name, description, assetType, data); 911 AssetBase asset = CreateAsset(name, description, assetType, data);
914 CommsManager.AssetCache.AddAsset(asset); 912 AssetService.Store(asset);
915 913
916 CreateNewInventoryItem(remoteClient, folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); 914 CreateNewInventoryItem(remoteClient, folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate);
917 } 915 }
@@ -1538,7 +1536,7 @@ namespace OpenSim.Region.Framework.Scenes
1538 return; 1536 return;
1539 1537
1540 AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.AssetType, Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}")); 1538 AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.AssetType, Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}"));
1541 CommsManager.AssetCache.AddAsset(asset); 1539 AssetService.Store(asset);
1542 1540
1543 TaskInventoryItem taskItem = new TaskInventoryItem(); 1541 TaskInventoryItem taskItem = new TaskInventoryItem();
1544 1542
@@ -1959,7 +1957,7 @@ namespace OpenSim.Region.Framework.Scenes
1959 objectGroup.GetPartDescription(objectGroup.RootPart.LocalId), 1957 objectGroup.GetPartDescription(objectGroup.RootPart.LocalId),
1960 (sbyte)AssetType.Object, 1958 (sbyte)AssetType.Object,
1961 Utils.StringToBytes(sceneObjectXml)); 1959 Utils.StringToBytes(sceneObjectXml));
1962 CommsManager.AssetCache.AddAsset(asset); 1960 AssetService.Store(asset);
1963 assetID = asset.FullID; 1961 assetID = asset.FullID;
1964 1962
1965 if (DeRezAction.SaveToExistingUserInventoryItem == action) 1963 if (DeRezAction.SaveToExistingUserInventoryItem == action)
@@ -2085,7 +2083,7 @@ namespace OpenSim.Region.Framework.Scenes
2085 objectGroup.GetPartDescription(objectGroup.LocalId), 2083 objectGroup.GetPartDescription(objectGroup.LocalId),
2086 (sbyte)AssetType.Object, 2084 (sbyte)AssetType.Object,
2087 Utils.StringToBytes(sceneObjectXml)); 2085 Utils.StringToBytes(sceneObjectXml));
2088 CommsManager.AssetCache.AddAsset(asset); 2086 AssetService.Store(asset);
2089 2087
2090 item.AssetID = asset.FullID; 2088 item.AssetID = asset.FullID;
2091 item.Description = asset.Description; 2089 item.Description = asset.Description;
@@ -2123,7 +2121,7 @@ namespace OpenSim.Region.Framework.Scenes
2123 grp.GetPartDescription(grp.LocalId), 2121 grp.GetPartDescription(grp.LocalId),
2124 (sbyte)AssetType.Object, 2122 (sbyte)AssetType.Object,
2125 Utils.StringToBytes(sceneObjectXml)); 2123 Utils.StringToBytes(sceneObjectXml));
2126 CommsManager.AssetCache.AddAsset(asset); 2124 AssetService.Store(asset);
2127 2125
2128 InventoryItemBase item = new InventoryItemBase(); 2126 InventoryItemBase item = new InventoryItemBase();
2129 item.CreatorId = grp.RootPart.CreatorID.ToString(); 2127 item.CreatorId = grp.RootPart.CreatorID.ToString();
@@ -2247,7 +2245,7 @@ namespace OpenSim.Region.Framework.Scenes
2247 2245
2248 if (item != null) 2246 if (item != null)
2249 { 2247 {
2250 AssetBase rezAsset = CommsManager.AssetCache.GetAsset(item.AssetID, false); 2248 AssetBase rezAsset = AssetService.Get(item.AssetID.ToString());
2251 2249
2252 if (rezAsset != null) 2250 if (rezAsset != null)
2253 { 2251 {
@@ -2416,7 +2414,7 @@ namespace OpenSim.Region.Framework.Scenes
2416 { 2414 {
2417 UUID ownerID = item.OwnerID; 2415 UUID ownerID = item.OwnerID;
2418 2416
2419 AssetBase rezAsset = CommsManager.AssetCache.GetAsset(item.AssetID, false); 2417 AssetBase rezAsset = AssetService.Get(item.AssetID.ToString());
2420 2418
2421 if (rezAsset != null) 2419 if (rezAsset != null)
2422 { 2420 {