When creating a coalesced object, set its Creator ID if all the objects have the same creator

master-beforevarregion
Oren Hurvitz 2013-11-06 12:57:44 +02:00 committed by Justin Clark-Casey (justincc)
parent 91fd9c4670
commit a94e1e0e08
1 changed files with 15 additions and 4 deletions

View File

@ -413,16 +413,27 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
if (item == null) if (item == null)
return null; return null;
// Can't know creator is the same, so null it in inventory item.CreatorId = objlist[0].RootPart.CreatorID.ToString();
item.CreatorData = objlist[0].RootPart.CreatorData;
if (objlist.Count > 1) if (objlist.Count > 1)
{ {
item.CreatorId = UUID.Zero.ToString();
item.Flags = (uint)InventoryItemFlags.ObjectHasMultipleItems; item.Flags = (uint)InventoryItemFlags.ObjectHasMultipleItems;
// If the objects have different creators then don't specify a creator at all
foreach (SceneObjectGroup objectGroup in objlist)
{
if ((objectGroup.RootPart.CreatorID.ToString() != item.CreatorId)
|| (objectGroup.RootPart.CreatorData.ToString() != item.CreatorData))
{
item.CreatorId = UUID.Zero.ToString();
item.CreatorData = string.Empty;
break;
}
}
} }
else else
{ {
item.CreatorId = objlist[0].RootPart.CreatorID.ToString();
item.CreatorData = objlist[0].RootPart.CreatorData;
item.SaleType = objlist[0].RootPart.ObjectSaleType; item.SaleType = objlist[0].RootPart.ObjectSaleType;
item.SalePrice = objlist[0].RootPart.SalePrice; item.SalePrice = objlist[0].RootPart.SalePrice;
} }