diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index 8275ceb..bfa9763 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -151,42 +151,23 @@ 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 = part.OwnerID; // Transfer ownership | 154 | taskItem.OwnerID = item.Owner; |
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 | if (remoteClient!=null && remoteClient.AgentId!=part.OwnerID && | 159 | taskItem.BasePermissions = item.BasePermissions; |
160 | m_scene.ExternalChecks.ExternalChecksPropagatePermissions()) { | 160 | taskItem.CurrentPermissions = item.CurrentPermissions; |
161 | taskItem.BasePermissions = item.BasePermissions & item.NextPermissions; | 161 | // FIXME: ignoring group permissions for now as they aren't stored in item |
162 | taskItem.CurrentPermissions = item.CurrentPermissions & item.NextPermissions; | 162 | taskItem.EveryonePermissions = item.EveryOnePermissions; |
163 | taskItem.EveryonePermissions = item.EveryOnePermissions & item.NextPermissions; | 163 | taskItem.NextPermissions = item.NextPermissions; |
164 | taskItem.NextPermissions = item.NextPermissions; | ||
165 | taskItem.CurrentPermissions |= 8; | ||
166 | } else { | ||
167 | taskItem.BasePermissions = item.BasePermissions; | ||
168 | taskItem.CurrentPermissions = item.CurrentPermissions; | ||
169 | taskItem.CurrentPermissions |= 8; | ||
170 | taskItem.EveryonePermissions = item.EveryOnePermissions; | ||
171 | taskItem.NextPermissions = item.NextPermissions; | ||
172 | } | ||
173 | |||
174 | |||
175 | |||
176 | taskItem.Flags = item.Flags; | 164 | taskItem.Flags = item.Flags; |
177 | // TODO: These are pending addition of those fields to TaskInventoryItem | 165 | // TODO: These are pending addition of those fields to TaskInventoryItem |
178 | // taskItem.SalePrice = item.SalePrice; | 166 | // taskItem.SalePrice = item.SalePrice; |
179 | // taskItem.SaleType = item.SaleType; | 167 | // taskItem.SaleType = item.SaleType; |
180 | taskItem.CreationDate = (uint)item.CreationDate; | 168 | taskItem.CreationDate = (uint)item.CreationDate; |
181 | 169 | ||
182 | bool addFromAllowedDrop = false; | 170 | part.AddInventoryItem(taskItem); |
183 | if (remoteClient!=null) | ||
184 | { | ||
185 | addFromAllowedDrop = remoteClient.AgentId!=part.OwnerID && | ||
186 | m_scene.ExternalChecks.ExternalChecksPropagatePermissions(); | ||
187 | } | ||
188 | |||
189 | part.AddInventoryItem(taskItem, addFromAllowedDrop); | ||
190 | 171 | ||
191 | return true; | 172 | return true; |
192 | } | 173 | } |