When creating a coalesced object, set its Creator ID if all the objects have the same creator
parent
91fd9c4670
commit
a94e1e0e08
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue