aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs2
4 files changed, 15 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index 712dcc7..1eef8d0 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -384,7 +384,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
384 } 384 }
385 } 385 }
386 386
387 AssetBase Animasset = new AssetBase(UUID.Random(), "Random Animation", (sbyte)AssetType.Animation); 387 AssetBase Animasset = new AssetBase(UUID.Random(), "Random Animation", (sbyte)AssetType.Animation, m_scenePresence.UUID);
388 Animasset.Data = anim.ToBytes(); 388 Animasset.Data = anim.ToBytes();
389 Animasset.Temporary = true; 389 Animasset.Temporary = true;
390 Animasset.Local = true; 390 Animasset.Local = true;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index ded001b..7928811 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Framework.Scenes
192 return new ArrayList(); 192 return new ArrayList();
193 } 193 }
194 194
195 AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data); 195 AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data, remoteClient.AgentId);
196 AssetService.Store(asset); 196 AssetService.Store(asset);
197 197
198 if (isScriptRunning) 198 if (isScriptRunning)
@@ -570,15 +570,9 @@ namespace OpenSim.Region.Framework.Scenes
570 /// <summary> 570 /// <summary>
571 /// Create a new asset data structure. 571 /// Create a new asset data structure.
572 /// </summary> 572 /// </summary>
573 /// <param name="name"></param> 573 private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data, UUID creatorID)
574 /// <param name="description"></param>
575 /// <param name="invType"></param>
576 /// <param name="assetType"></param>
577 /// <param name="data"></param>
578 /// <returns></returns>
579 private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data)
580 { 574 {
581 AssetBase asset = new AssetBase(UUID.Random(), name, assetType); 575 AssetBase asset = new AssetBase(UUID.Random(), name, assetType, creatorID);
582 asset.Description = description; 576 asset.Description = description;
583 asset.Data = (data == null) ? new byte[1] : data; 577 asset.Data = (data == null) ? new byte[1] : data;
584 578
@@ -704,7 +698,7 @@ namespace OpenSim.Region.Framework.Scenes
704 data = Encoding.ASCII.GetBytes(strdata); 698 data = Encoding.ASCII.GetBytes(strdata);
705 } 699 }
706 700
707 AssetBase asset = CreateAsset(name, description, assetType, data); 701 AssetBase asset = CreateAsset(name, description, assetType, data, remoteClient.AgentId);
708 AssetService.Store(asset); 702 AssetService.Store(asset);
709 703
710 CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); 704 CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate);
@@ -1289,7 +1283,9 @@ namespace OpenSim.Region.Framework.Scenes
1289 itemBase.InvType, part.UUID, remoteClient.AgentId)) 1283 itemBase.InvType, part.UUID, remoteClient.AgentId))
1290 return; 1284 return;
1291 1285
1292 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}")); 1286 AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.AssetType,
1287 Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}"),
1288 remoteClient.AgentId);
1293 AssetService.Store(asset); 1289 AssetService.Store(asset);
1294 1290
1295 TaskInventoryItem taskItem = new TaskInventoryItem(); 1291 TaskInventoryItem taskItem = new TaskInventoryItem();
@@ -1583,7 +1579,8 @@ namespace OpenSim.Region.Framework.Scenes
1583 objectGroup.GetPartName(objectGroup.LocalId), 1579 objectGroup.GetPartName(objectGroup.LocalId),
1584 objectGroup.GetPartDescription(objectGroup.LocalId), 1580 objectGroup.GetPartDescription(objectGroup.LocalId),
1585 (sbyte)AssetType.Object, 1581 (sbyte)AssetType.Object,
1586 Utils.StringToBytes(sceneObjectXml)); 1582 Utils.StringToBytes(sceneObjectXml),
1583 remoteClient.AgentId);
1587 AssetService.Store(asset); 1584 AssetService.Store(asset);
1588 1585
1589 item.AssetID = asset.FullID; 1586 item.AssetID = asset.FullID;
@@ -1630,7 +1627,8 @@ namespace OpenSim.Region.Framework.Scenes
1630 grp.GetPartName(grp.LocalId), 1627 grp.GetPartName(grp.LocalId),
1631 grp.GetPartDescription(grp.LocalId), 1628 grp.GetPartDescription(grp.LocalId),
1632 (sbyte)AssetType.Object, 1629 (sbyte)AssetType.Object,
1633 Utils.StringToBytes(sceneObjectXml)); 1630 Utils.StringToBytes(sceneObjectXml),
1631 remoteClient.AgentId);
1634 AssetService.Store(asset); 1632 AssetService.Store(asset);
1635 1633
1636 InventoryItemBase item = new InventoryItemBase(); 1634 InventoryItemBase item = new InventoryItemBase();
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 66f7a1b..b9b16ad 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4389,7 +4389,8 @@ namespace OpenSim.Region.Framework.Scenes
4389 group.GetPartName(localID), 4389 group.GetPartName(localID),
4390 group.GetPartDescription(localID), 4390 group.GetPartDescription(localID),
4391 (sbyte)AssetType.Object, 4391 (sbyte)AssetType.Object,
4392 Utils.StringToBytes(sceneObjectXml)); 4392 Utils.StringToBytes(sceneObjectXml),
4393 group.OwnerID);
4393 AssetService.Store(asset); 4394 AssetService.Store(asset);
4394 4395
4395 InventoryItemBase item = new InventoryItemBase(); 4396 InventoryItemBase item = new InventoryItemBase();
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
index a36c4db..6686264 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
58 TestHelper.InMethod(); 58 TestHelper.InMethod();
59 59
60 UUID corruptAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666"); 60 UUID corruptAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666");
61 AssetBase corruptAsset = AssetHelpers.CreateAsset(corruptAssetUuid, "CORRUPT ASSET"); 61 AssetBase corruptAsset = AssetHelpers.CreateAsset(corruptAssetUuid, "CORRUPT ASSET", UUID.Zero);
62 m_assetService.Store(corruptAsset); 62 m_assetService.Store(corruptAsset);
63 63
64 IDictionary<UUID, int> foundAssetUuids = new Dictionary<UUID, int>(); 64 IDictionary<UUID, int> foundAssetUuids = new Dictionary<UUID, int>();