diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index f638386071..4ea283f653 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1620,8 +1620,24 @@ namespace OpenSim.Region.Framework.Scenes { UUID assetID = UUID.Zero; + Vector3 inventoryStoredPosition = new Vector3 + (((objectGroup.AbsolutePosition.X > (int)Constants.RegionSize) + ? 250 + : objectGroup.AbsolutePosition.X) + , + (objectGroup.AbsolutePosition.X > (int)Constants.RegionSize) + ? 250 + : objectGroup.AbsolutePosition.X, + objectGroup.AbsolutePosition.Z); + + Vector3 originalPosition = objectGroup.AbsolutePosition; + + objectGroup.AbsolutePosition = inventoryStoredPosition; + string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(objectGroup); + objectGroup.AbsolutePosition = originalPosition; + // Get the user info of the item destination // UUID userID = UUID.Zero; @@ -1683,6 +1699,8 @@ namespace OpenSim.Region.Framework.Scenes { // Deleting someone else's item // + + if (remoteClient == null || objectGroup.OwnerID != remoteClient.AgentId) { @@ -1857,8 +1875,24 @@ namespace OpenSim.Region.Framework.Scenes itemID = UUID.Zero; if (grp != null) { + Vector3 inventoryStoredPosition = new Vector3 + (((grp.AbsolutePosition.X > (int)Constants.RegionSize) + ? 250 + : grp.AbsolutePosition.X) + , + (grp.AbsolutePosition.X > (int)Constants.RegionSize) + ? 250 + : grp.AbsolutePosition.X, + grp.AbsolutePosition.Z); + + Vector3 originalPosition = grp.AbsolutePosition; + + grp.AbsolutePosition = inventoryStoredPosition; + string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(grp); - + + grp.AbsolutePosition = originalPosition; + AssetBase asset = CreateAsset( grp.GetPartName(grp.LocalId), grp.GetPartDescription(grp.LocalId), diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3b91dd0b8f..d43a7e22e6 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4256,7 +4256,24 @@ namespace OpenSim.Region.Framework.Scenes break; case 2: // Sell a copy + + + Vector3 inventoryStoredPosition = new Vector3 + (((group.AbsolutePosition.X > (int)Constants.RegionSize) + ? 250 + : group.AbsolutePosition.X) + , + (group.AbsolutePosition.X > (int)Constants.RegionSize) + ? 250 + : group.AbsolutePosition.X, + group.AbsolutePosition.Z); + + Vector3 originalPosition = group.AbsolutePosition; + + group.AbsolutePosition = inventoryStoredPosition; + string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(group); + group.AbsolutePosition = originalPosition; uint perms=group.GetEffectivePermissions();