diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 864fc796a4..a43db338a9 100755 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -1235,7 +1235,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments if (objatt == null) { m_log.WarnFormat( - "[ATTACHMENTS MODULE]: Could not retrieve item {0} for attaching to avatar {1} at point {2}", + "[ATTACHMENTS MODULE]: did not attached item {0} to avatar {1} at point {2}", itemID, sp.Name, attachmentPt); return null; diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 69c1e4edce..4c4db3aae1 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -556,10 +556,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess } } +/* this is already done under m_Scene.AddInventoryItem(item) that triggers TriggerOnNewInventoryItemUploadComplete calling HG // This is a hook to do some per-asset post-processing for subclasses that need that if (remoteClient != null && action != DeRezAction.Delete) ExportAsset(remoteClient.AgentId, asset.FullID); - +*/ return item; } @@ -918,8 +919,29 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess } int primcount = 0; - foreach (SceneObjectGroup g in objlist) - primcount += g.PrimCount; + if(attachment) + { + foreach (SceneObjectGroup g in objlist) + { + if(g.RootPart.Shape != null) + { + PCode code = (PCode)g.RootPart.Shape.PCode; + if(code == PCode.Grass || code == PCode.NewTree || code == PCode.Tree) + { + // dont wear vegetables + remoteClient.SendAgentAlertMessage("You cannot wear system plants. They could grow roots inside your avatar", false); + return null; + } + } + primcount += g.PrimCount; + } + } + else + { + foreach (SceneObjectGroup g in objlist) + primcount += g.PrimCount; + } + if (!m_Scene.Permissions.CanRezObject( primcount, remoteClient.AgentId, pos)