aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs31
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs1
2 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 3b7f38e..7c68ef4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -722,6 +722,37 @@ namespace OpenSim.Region.Framework.Scenes
722 } 722 }
723 } 723 }
724 724
725 private void HandleLinkInventoryItem(IClientAPI remoteClient, UUID transActionID, UUID folderID,
726 uint callbackID, string description, string name,
727 sbyte invType, sbyte type, UUID olditemID)
728 {
729 m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item link {0} in folder {1} pointing to {2}", name, folderID, olditemID);
730
731 if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId))
732 return;
733
734 ScenePresence presence;
735 if (TryGetScenePresence(remoteClient.AgentId, out presence))
736 {
737 byte[] data = null;
738
739 AssetBase asset = new AssetBase();
740 asset.FullID = olditemID;
741 asset.Type = type;
742 asset.Name = name;
743 asset.Description = description;
744
745 CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), folderID, name, 0, callbackID, asset, invType, (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch());
746
747 }
748 else
749 {
750 m_log.ErrorFormat(
751 "ScenePresence for agent uuid {0} unexpectedly not found in HandleLinkInventoryItem",
752 remoteClient.AgentId);
753 }
754 }
755
725 /// <summary> 756 /// <summary>
726 /// Remove an inventory item for the client's inventory 757 /// Remove an inventory item for the client's inventory
727 /// </summary> 758 /// </summary>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index fc915a3..685a678 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2749,6 +2749,7 @@ namespace OpenSim.Region.Framework.Scenes
2749 public virtual void SubscribeToClientInventoryEvents(IClientAPI client) 2749 public virtual void SubscribeToClientInventoryEvents(IClientAPI client)
2750 { 2750 {
2751 client.OnCreateNewInventoryItem += CreateNewInventoryItem; 2751 client.OnCreateNewInventoryItem += CreateNewInventoryItem;
2752 client.OnLinkInventoryItem += HandleLinkInventoryItem;
2752 client.OnCreateNewInventoryFolder += HandleCreateInventoryFolder; 2753 client.OnCreateNewInventoryFolder += HandleCreateInventoryFolder;
2753 client.OnUpdateInventoryFolder += HandleUpdateInventoryFolder; 2754 client.OnUpdateInventoryFolder += HandleUpdateInventoryFolder;
2754 client.OnMoveInventoryFolder += HandleMoveInventoryFolder; // 2; //!! 2755 client.OnMoveInventoryFolder += HandleMoveInventoryFolder; // 2; //!!