diff options
author | Melanie | 2012-01-26 00:21:21 +0000 |
---|---|---|
committer | Melanie | 2012-01-26 00:21:21 +0000 |
commit | 4ce42762ee2a8ae323b6a1d118bb4b9b0f447caf (patch) | |
tree | 6173c8da92084547e89db40e5762a74249b4a8db /OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |
parent | Typo fix (diff) | |
parent | refactor: change RezScriptFromAgentInventory(), RezNewScript() and AddInvento... (diff) | |
download | opensim-SC-4ce42762ee2a8ae323b6a1d118bb4b9b0f447caf.zip opensim-SC-4ce42762ee2a8ae323b6a1d118bb4b9b0f447caf.tar.gz opensim-SC-4ce42762ee2a8ae323b6a1d118bb4b9b0f447caf.tar.bz2 opensim-SC-4ce42762ee2a8ae323b6a1d118bb4b9b0f447caf.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index c7da4f4..b56d3fc 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -79,13 +79,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
79 | /// <summary> | 79 | /// <summary> |
80 | /// Add an inventory item from a user's inventory to a prim in this scene object. | 80 | /// Add an inventory item from a user's inventory to a prim in this scene object. |
81 | /// </summary> | 81 | /// </summary> |
82 | /// <param name="remoteClient">The client adding the item.</param> | 82 | /// <param name="agentID">The agent adding the item.</param> |
83 | /// <param name="localID">The local ID of the part receiving the add.</param> | 83 | /// <param name="localID">The local ID of the part receiving the add.</param> |
84 | /// <param name="item">The user inventory item being added.</param> | 84 | /// <param name="item">The user inventory item being added.</param> |
85 | /// <param name="copyItemID">The item UUID that should be used by the new item.</param> | 85 | /// <param name="copyItemID">The item UUID that should be used by the new item.</param> |
86 | /// <returns></returns> | 86 | /// <returns></returns> |
87 | public bool AddInventoryItem(IClientAPI remoteClient, uint localID, | 87 | public bool AddInventoryItem(UUID agentID, uint localID, InventoryItemBase item, UUID copyItemID) |
88 | InventoryItemBase item, UUID copyItemID) | ||
89 | { | 88 | { |
90 | // m_log.DebugFormat( | 89 | // m_log.DebugFormat( |
91 | // "[PRIM INVENTORY]: Adding inventory item {0} from {1} to part with local ID {2}", | 90 | // "[PRIM INVENTORY]: Adding inventory item {0} from {1} to part with local ID {2}", |
@@ -107,9 +106,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
107 | taskItem.Type = item.AssetType; | 106 | taskItem.Type = item.AssetType; |
108 | taskItem.InvType = item.InvType; | 107 | taskItem.InvType = item.InvType; |
109 | 108 | ||
110 | if (remoteClient != null && | 109 | if (agentID != part.OwnerID && m_scene.Permissions.PropagatePermissions()) |
111 | remoteClient.AgentId != part.OwnerID && | ||
112 | m_scene.Permissions.PropagatePermissions()) | ||
113 | { | 110 | { |
114 | taskItem.BasePermissions = item.BasePermissions & | 111 | taskItem.BasePermissions = item.BasePermissions & |
115 | item.NextPermissions; | 112 | item.NextPermissions; |
@@ -144,11 +141,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
144 | // taskItem.SaleType = item.SaleType; | 141 | // taskItem.SaleType = item.SaleType; |
145 | taskItem.CreationDate = (uint)item.CreationDate; | 142 | taskItem.CreationDate = (uint)item.CreationDate; |
146 | 143 | ||
147 | bool addFromAllowedDrop = false; | 144 | bool addFromAllowedDrop = agentID != part.OwnerID; |
148 | if (remoteClient != null) | ||
149 | { | ||
150 | addFromAllowedDrop = remoteClient.AgentId != part.OwnerID; | ||
151 | } | ||
152 | 145 | ||
153 | part.Inventory.AddInventoryItem(taskItem, addFromAllowedDrop); | 146 | part.Inventory.AddInventoryItem(taskItem, addFromAllowedDrop); |
154 | 147 | ||