aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs35
1 files changed, 28 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index bfa9763..2b560f4 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -151,23 +151,44 @@ namespace OpenSim.Region.Environment.Scenes
151 taskItem.AssetID = item.AssetID; 151 taskItem.AssetID = item.AssetID;
152 taskItem.Name = item.Name; 152 taskItem.Name = item.Name;
153 taskItem.Description = item.Description; 153 taskItem.Description = item.Description;
154 taskItem.OwnerID = item.Owner; 154 taskItem.OwnerID = part.OwnerID; // Transfer ownership
155 taskItem.CreatorID = item.Creator; 155 taskItem.CreatorID = item.Creator;
156 taskItem.Type = item.AssetType; 156 taskItem.Type = item.AssetType;
157 taskItem.InvType = item.InvType; 157 taskItem.InvType = item.InvType;
158 158
159 taskItem.BasePermissions = item.BasePermissions; 159 if (remoteClient != null &&
160 taskItem.CurrentPermissions = item.CurrentPermissions; 160 remoteClient.AgentId != part.OwnerID &&
161 // FIXME: ignoring group permissions for now as they aren't stored in item 161 m_scene.ExternalChecks.ExternalChecksPropagatePermissions())
162 taskItem.EveryonePermissions = item.EveryOnePermissions; 162 {
163 taskItem.NextPermissions = item.NextPermissions; 163 taskItem.BasePermissions = item.BasePermissions &
164 item.NextPermissions;
165 taskItem.CurrentPermissions = item.CurrentPermissions &
166 item.NextPermissions;
167 taskItem.EveryonePermissions = item.EveryOnePermissions &
168 item.NextPermissions;
169 taskItem.NextPermissions = item.NextPermissions;
170 taskItem.CurrentPermissions |= 8;
171 } else {
172 taskItem.BasePermissions = item.BasePermissions;
173 taskItem.CurrentPermissions = item.CurrentPermissions;
174 taskItem.CurrentPermissions |= 8;
175 taskItem.EveryonePermissions = item.EveryOnePermissions;
176 taskItem.NextPermissions = item.NextPermissions;
177 }
178
164 taskItem.Flags = item.Flags; 179 taskItem.Flags = item.Flags;
165 // TODO: These are pending addition of those fields to TaskInventoryItem 180 // TODO: These are pending addition of those fields to TaskInventoryItem
166// taskItem.SalePrice = item.SalePrice; 181// taskItem.SalePrice = item.SalePrice;
167// taskItem.SaleType = item.SaleType; 182// taskItem.SaleType = item.SaleType;
168 taskItem.CreationDate = (uint)item.CreationDate; 183 taskItem.CreationDate = (uint)item.CreationDate;
184
185 bool addFromAllowedDrop = false;
186 if (remoteClient!=null)
187 {
188 addFromAllowedDrop = remoteClient.AgentId!=part.OwnerID;
189 }
169 190
170 part.AddInventoryItem(taskItem); 191 part.AddInventoryItem(taskItem, addFromAllowedDrop);
171 192
172 return true; 193 return true;
173 } 194 }