diff options
author | Justin Clark-Casey (justincc) | 2012-03-22 22:33:37 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-03-22 23:02:49 +0000 |
commit | 4021709371c6923897c11e55b6645f7174107352 (patch) | |
tree | c7414ee874ed2cea3397e83044486844738e4a58 /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |
parent | Add llGiveInventory() test from object to object where both objects are owned... (diff) | |
download | opensim-SC_OLD-4021709371c6923897c11e55b6645f7174107352.zip opensim-SC_OLD-4021709371c6923897c11e55b6645f7174107352.tar.gz opensim-SC_OLD-4021709371c6923897c11e55b6645f7174107352.tar.bz2 opensim-SC_OLD-4021709371c6923897c11e55b6645f7174107352.tar.xz |
Fix llGiveInventory() so that it checks the destination part for AllowInventoryDrop, not the source.
This allows llAllowInventoryDrop() to work.
Regression test added for this case.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 23f39a8..b5558d1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1210,9 +1210,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1210 | /// <summary> | 1210 | /// <summary> |
1211 | /// Copy a task (prim) inventory item to another task (prim) | 1211 | /// Copy a task (prim) inventory item to another task (prim) |
1212 | /// </summary> | 1212 | /// </summary> |
1213 | /// <param name="destId"></param> | 1213 | /// <param name="destId">ID of destination part</param> |
1214 | /// <param name="part"></param> | 1214 | /// <param name="part">Source part</param> |
1215 | /// <param name="itemId"></param> | 1215 | /// <param name="itemId">Source item id to transfer</param> |
1216 | public void MoveTaskInventoryItem(UUID destId, SceneObjectPart part, UUID itemId) | 1216 | public void MoveTaskInventoryItem(UUID destId, SceneObjectPart part, UUID itemId) |
1217 | { | 1217 | { |
1218 | TaskInventoryItem srcTaskItem = part.Inventory.GetInventoryItem(itemId); | 1218 | TaskInventoryItem srcTaskItem = part.Inventory.GetInventoryItem(itemId); |
@@ -1240,10 +1240,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1240 | 1240 | ||
1241 | // Can't transfer this | 1241 | // Can't transfer this |
1242 | // | 1242 | // |
1243 | if ((part.OwnerID != destPart.OwnerID) && ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Transfer) == 0)) | 1243 | if (part.OwnerID != destPart.OwnerID && (srcTaskItem.CurrentPermissions & (uint)PermissionMask.Transfer) == 0) |
1244 | return; | 1244 | return; |
1245 | 1245 | ||
1246 | if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) == 0) | 1246 | if (part.OwnerID != destPart.OwnerID && (destPart.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) == 0) |
1247 | { | 1247 | { |
1248 | // object cannot copy items to an object owned by a different owner | 1248 | // object cannot copy items to an object owned by a different owner |
1249 | // unless llAllowInventoryDrop has been called | 1249 | // unless llAllowInventoryDrop has been called |