A stab at making CHANGED_OWNER work

0.7.1-dev
Melanie 2011-04-01 22:04:29 +01:00
parent e974fde953
commit 3a113f9902
2 changed files with 12 additions and 22 deletions

View File

@ -668,28 +668,18 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0) if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
part.GroupMask = item.GroupPermissions; part.GroupMask = item.GroupPermissions;
} }
foreach (SceneObjectPart part in group.Parts)
{
part.LastOwnerID = part.OwnerID;
part.OwnerID = item.Owner;
part.Inventory.ChangeInventoryOwner(item.Owner);
}
group.ApplyNextOwnerPermissions(); group.ApplyNextOwnerPermissions();
} }
} }
foreach (SceneObjectPart part in group.Parts)
{
if ((part.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0)
{
part.LastOwnerID = part.OwnerID;
part.OwnerID = item.Owner;
part.Inventory.ChangeInventoryOwner(item.Owner);
part.GroupMask = 0; // DO NOT propagate here
}
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
part.EveryoneMask = item.EveryOnePermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
part.NextOwnerMask = item.NextPermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
part.GroupMask = item.GroupPermissions;
}
rootPart.TrimPermissions(); rootPart.TrimPermissions();
if (!attachment) if (!attachment)

View File

@ -175,12 +175,12 @@ namespace OpenSim.Region.Framework.Scenes
foreach (TaskInventoryItem item in items) foreach (TaskInventoryItem item in items)
{ {
if (ownerId != item.OwnerID) if (ownerId != item.OwnerID)
{
item.LastOwnerID = item.OwnerID; item.LastOwnerID = item.OwnerID;
item.OwnerID = ownerId;
item.PermsMask = 0; item.OwnerID = ownerId;
item.PermsGranter = UUID.Zero; item.PermsMask = 0;
} item.PermsGranter = UUID.Zero;
item.OwnerChanged = true;
} }
} }