From 751150100b2276626346aaf2a1886b758751e9c7 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Thu, 26 Jun 2008 20:52:05 +0000 Subject: Mantis#1603. Thank you, Matth for a patch to llGiveInventory and Melanie for helping to finish it. --- .../Region/Environment/Scenes/Scene.Inventory.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 05c0a28..eac74c2 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -1009,6 +1009,21 @@ namespace OpenSim.Region.Environment.Scenes return; } + // todo: also check llAllowInventoryDrop when implemented + if(part.OwnerID != destPart.OwnerID) + { + // object cannot copy items to an object owned by a different owner + // unless llAllowInventoryDrop has been called + + return; + } + + // must have both move and modify permission to put an item in an object + if((part.OwnerMask & ((uint)PermissionMask.Move | (uint)PermissionMask.Modify)) == 0 ) + { + return; + } + TaskInventoryItem destTaskItem = new TaskInventoryItem(); destTaskItem.ItemID = LLUUID.Random(); @@ -1051,7 +1066,13 @@ namespace OpenSim.Region.Environment.Scenes if ((srcTaskItem.OwnerMask & (uint)PermissionMask.Copy) == 0) part.RemoveInventoryItem(itemId); + + ScenePresence avatar; + if(TryGetAvatar(srcTaskItem.OwnerID, out avatar)) + { + destPart.GetProperties(avatar.ControllingClient); + } } public void MoveTaskInventoryItems(LLUUID destID, string category, SceneObjectPart host, List items) -- cgit v1.1