aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authordahlia2010-04-12 17:10:51 -0700
committerdahlia2010-04-12 17:10:51 -0700
commit3d0860ae616749518a40c6f6088d2644d589daf9 (patch)
tree0c4be75377265948201b742a342b078c4ece3609 /OpenSim/Region/Framework
parentminor - add some documentation to PrimitiveBaseShape constructor with OpenMet... (diff)
downloadopensim-SC_OLD-3d0860ae616749518a40c6f6088d2644d589daf9.zip
opensim-SC_OLD-3d0860ae616749518a40c6f6088d2644d589daf9.tar.gz
opensim-SC_OLD-3d0860ae616749518a40c6f6088d2644d589daf9.tar.bz2
opensim-SC_OLD-3d0860ae616749518a40c6f6088d2644d589daf9.tar.xz
thanks lkalif for Mantis #4676 - a patch that adds support for inventory links
Signed-off-by: dahlia <dahliaTrimble@gmail.removeme.com>
Diffstat (limited to 'OpenSim/Region/Framework')
-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; //!!