aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs27
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs6
3 files changed, 14 insertions, 24 deletions
diff --git a/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs b/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs
index d9d2e64..4362e28 100644
--- a/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs
+++ b/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs
@@ -143,8 +143,7 @@ namespace OpenSim.Region.Framework.Scenes
143// m_log.DebugFormat( 143// m_log.DebugFormat(
144// "[ASYNC INVENTORY SENDER]: Handling request from {0} for {1} on queue", fh.Client.Name, fh.ItemID); 144// "[ASYNC INVENTORY SENDER]: Handling request from {0} for {1} on queue", fh.Client.Name, fh.ItemID);
145 145
146 InventoryItemBase item = new InventoryItemBase(fh.ItemID, fh.Client.AgentId); 146 InventoryItemBase item = m_scene.InventoryService.GetItem(fh.Client.AgentId, fh.ItemID);
147 item = m_scene.InventoryService.GetItem(item);
148 147
149 if (item != null) 148 if (item != null)
150 fh.Client.SendInventoryItemDetails(item.Owner, item); 149 fh.Client.SendInventoryItemDetails(item.Owner, item);
@@ -153,4 +152,4 @@ namespace OpenSim.Region.Framework.Scenes
153 } 152 }
154 } 153 }
155 } 154 }
156} \ No newline at end of file 155}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 30bc75b..f2df364 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -223,8 +223,7 @@ namespace OpenSim.Region.Framework.Scenes
223 223
224 if (core.TryGet<IClientInventory>(out inv)) 224 if (core.TryGet<IClientInventory>(out inv))
225 { 225 {
226 InventoryFolderBase parent = new InventoryFolderBase(f.ParentID, f.Owner); 226 InventoryFolderBase parent = InventoryService.GetFolder(f.Owner, f.ParentID);
227 parent = InventoryService.GetFolder(parent);
228 inv.SendRemoveInventoryItems(new UUID[] { item.ID }); 227 inv.SendRemoveInventoryItems(new UUID[] { item.ID });
229 inv.SendBulkUpdateInventory(new InventoryFolderBase[0], new InventoryItemBase[] { item }); 228 inv.SendBulkUpdateInventory(new InventoryFolderBase[0], new InventoryItemBase[] { item });
230 string message = "The item was placed in folder " + f.Name; 229 string message = "The item was placed in folder " + f.Name;
@@ -407,8 +406,7 @@ namespace OpenSim.Region.Framework.Scenes
407 // inventory. Rut-Roh. Whatever. Make this secure. Yeah. 406 // inventory. Rut-Roh. Whatever. Make this secure. Yeah.
408 // 407 //
409 // Passing something to another avatar or a an object will already 408 // Passing something to another avatar or a an object will already
410 InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); 409 InventoryItemBase item = InventoryService.GetItem(remoteClient.AgentId, itemID);
411 item = InventoryService.GetItem(item);
412 410
413 if (item != null) 411 if (item != null)
414 { 412 {
@@ -585,8 +583,7 @@ namespace OpenSim.Region.Framework.Scenes
585 return null; 583 return null;
586 } 584 }
587 585
588 InventoryItemBase item = new InventoryItemBase(itemId, senderId); 586 InventoryItemBase item = InventoryService.GetItem(senderId, itemId);
589 item = InventoryService.GetItem(item);
590 587
591 if (item == null) 588 if (item == null)
592 { 589 {
@@ -807,7 +804,7 @@ namespace OpenSim.Region.Framework.Scenes
807 UUID recipientId, UUID senderId, UUID folderId, UUID recipientParentFolderId) 804 UUID recipientId, UUID senderId, UUID folderId, UUID recipientParentFolderId)
808 { 805 {
809 //// Retrieve the folder from the sender 806 //// Retrieve the folder from the sender
810 InventoryFolderBase folder = InventoryService.GetFolder(new InventoryFolderBase(folderId, senderId)); 807 InventoryFolderBase folder = InventoryService.GetFolder(senderId, folderId);
811 if (null == folder) 808 if (null == folder)
812 { 809 {
813 m_log.ErrorFormat( 810 m_log.ErrorFormat(
@@ -868,8 +865,7 @@ namespace OpenSim.Region.Framework.Scenes
868 865
869 if (item == null) 866 if (item == null)
870 { 867 {
871 item = new InventoryItemBase(oldItemID, remoteClient.AgentId); 868 item = InventoryService.GetItem(remoteClient.AgentId, oldItemID);
872 item = InventoryService.GetItem(item);
873 869
874 if (item == null) 870 if (item == null)
875 { 871 {
@@ -953,7 +949,7 @@ namespace OpenSim.Region.Framework.Scenes
953 foreach (InventoryItemBase b in items) 949 foreach (InventoryItemBase b in items)
954 { 950 {
955 CopyInventoryItem(remoteClient, 0, remoteClient.AgentId, b.ID, b.Folder, null); 951 CopyInventoryItem(remoteClient, 0, remoteClient.AgentId, b.ID, b.Folder, null);
956 InventoryItemBase n = InventoryService.GetItem(b); 952 InventoryItemBase n = InventoryService.GetItem(b.Owner, b.ID);
957 n.Folder = destfolder; 953 n.Folder = destfolder;
958 moveitems.Add(n); 954 moveitems.Add(n);
959 remoteClient.SendInventoryItemCreateUpdate(n, 0); 955 remoteClient.SendInventoryItemCreateUpdate(n, 0);
@@ -1605,8 +1601,7 @@ namespace OpenSim.Region.Framework.Scenes
1605 InventoryCollection contents = InventoryService.GetFolderContent(client.AgentId, folder.ID); 1601 InventoryCollection contents = InventoryService.GetFolderContent(client.AgentId, folder.ID);
1606 1602
1607 // Fetch the folder itself to get its current version 1603 // Fetch the folder itself to get its current version
1608 InventoryFolderBase containingFolder = new InventoryFolderBase(folder.ID, client.AgentId); 1604 InventoryFolderBase containingFolder = InventoryService.GetFolder(client.AgentId, folder.ID);
1609 containingFolder = InventoryService.GetFolder(containingFolder);
1610 1605
1611// m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}", 1606// m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}",
1612// contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName); 1607// contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName);
@@ -1620,7 +1615,7 @@ namespace OpenSim.Region.Framework.Scenes
1620 { 1615 {
1621 if (item.AssetType == (int)AssetType.Link) 1616 if (item.AssetType == (int)AssetType.Link)
1622 { 1617 {
1623 InventoryItemBase linkedItem = InventoryService.GetItem(new InventoryItemBase(item.AssetID)); 1618 InventoryItemBase linkedItem = InventoryService.GetItem(client.AgentId, item.AssetID);
1624 1619
1625 // Take care of genuinely broken links where the target doesn't exist 1620 // Take care of genuinely broken links where the target doesn't exist
1626 // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, 1621 // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate,
@@ -1680,8 +1675,7 @@ namespace OpenSim.Region.Framework.Scenes
1680 UUID copyID = UUID.Random(); 1675 UUID copyID = UUID.Random();
1681 if (itemID != UUID.Zero) 1676 if (itemID != UUID.Zero)
1682 { 1677 {
1683 InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); 1678 InventoryItemBase item = InventoryService.GetItem(remoteClient.AgentId, itemID);
1684 item = InventoryService.GetItem(item);
1685 1679
1686 // Try library 1680 // Try library
1687 if (null == item && LibraryService != null && LibraryService.LibraryRootFolder != null) 1681 if (null == item && LibraryService != null && LibraryService.LibraryRootFolder != null)
@@ -1836,8 +1830,7 @@ namespace OpenSim.Region.Framework.Scenes
1836 public SceneObjectPart RezScriptFromAgentInventory(UUID agentID, UUID fromItemID, uint localID) 1830 public SceneObjectPart RezScriptFromAgentInventory(UUID agentID, UUID fromItemID, uint localID)
1837 { 1831 {
1838 UUID copyID = UUID.Random(); 1832 UUID copyID = UUID.Random();
1839 InventoryItemBase item = new InventoryItemBase(fromItemID, agentID); 1833 InventoryItemBase item = InventoryService.GetItem(agentID, fromItemID);
1840 item = InventoryService.GetItem(item);
1841 1834
1842 // Try library 1835 // Try library
1843 // XXX clumsy, possibly should be one call 1836 // XXX clumsy, possibly should be one call
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 34b9c5f..c49edd1 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -627,8 +627,7 @@ namespace OpenSim.Region.Framework.Scenes
627// m_log.DebugFormat( 627// m_log.DebugFormat(
628// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); 628// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
629 629
630 InventoryFolderBase folder = new InventoryFolderBase(folderID, remoteClient.AgentId); 630 InventoryFolderBase folder = InventoryService.GetFolder(remoteClient.AgentId, folderID);
631 folder = InventoryService.GetFolder(folder);
632 if (folder != null) 631 if (folder != null)
633 { 632 {
634 folder.Name = name; 633 folder.Name = name;
@@ -645,8 +644,7 @@ namespace OpenSim.Region.Framework.Scenes
645 644
646 public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID) 645 public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID)
647 { 646 {
648 InventoryFolderBase folder = new InventoryFolderBase(folderID, remoteClient.AgentId); 647 InventoryFolderBase folder = InventoryService.GetFolder(remoteClient.AgentId, folderID);
649 folder = InventoryService.GetFolder(folder);
650 if (folder != null) 648 if (folder != null)
651 { 649 {
652 folder.ParentID = parentID; 650 folder.ParentID = parentID;