From 1a31f7b579753bdcb5f52adc16a41eef4b14a25f Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 21 Feb 2011 04:14:49 +0100 Subject: Allow modifying a no mod object through llGiveInventoryItem if the object sets allowed drop. This makes breedables feasible. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 9a93a26..9150257 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1227,6 +1227,10 @@ namespace OpenSim.Region.Framework.Scenes if ((part.OwnerID != destPart.OwnerID) && ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Transfer) == 0)) return; + bool overrideNoMod = false; + if ((part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) != 0) + overrideNoMod = true; + if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) == 0) { // object cannot copy items to an object owned by a different owner @@ -1236,7 +1240,7 @@ namespace OpenSim.Region.Framework.Scenes } // must have both move and modify permission to put an item in an object - if ((part.OwnerMask & ((uint)PermissionMask.Move | (uint)PermissionMask.Modify)) == 0) + if (((part.OwnerMask & (uint)PermissionMask.Modify) == 0) && (!overrideNoMod)) { return; } -- cgit v1.1