Make drag copy and copy-on-ray handle friends list perms properly

prebuild-update
Melanie Thielker 2010-06-27 21:04:30 +02:00 committed by Melanie
parent 6cf0b8f6fe
commit 660a560d3b
1 changed files with 22 additions and 0 deletions

View File

@ -1750,6 +1750,28 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectGroup copy = original.Copy(AgentID, GroupID, true); SceneObjectGroup copy = original.Copy(AgentID, GroupID, true);
copy.AbsolutePosition = copy.AbsolutePosition + offset; copy.AbsolutePosition = copy.AbsolutePosition + offset;
if (copy.OwnerID != AgentID)
{
copy.SetOwnerId(AgentID);
copy.SetRootPartOwner(copy.RootPart, AgentID, GroupID);
List<SceneObjectPart> partList =
new List<SceneObjectPart>(copy.Children.Values);
if (m_parentScene.Permissions.PropagatePermissions())
{
foreach (SceneObjectPart child in partList)
{
child.Inventory.ChangeInventoryOwner(AgentID);
child.TriggerScriptChangedEvent(Changed.OWNER);
child.ApplyNextOwnerPermissions();
}
}
copy.RootPart.ObjectSaleType = 0;
copy.RootPart.SalePrice = 10;
}
Entities.Add(copy); Entities.Add(copy);
// Since we copy from a source group that is in selected // Since we copy from a source group that is in selected