diff options
author | Oren Hurvitz | 2013-11-06 12:57:44 +0200 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-01-10 19:54:17 +0000 |
commit | a94e1e0e085a3c70e35e2c9cf0583d193c6ed32f (patch) | |
tree | 753971f70fcb58234fa9c2a1107a9ad0aa9e7aac /OpenSim | |
parent | Refactored: use a single function to apply an object's folded permissions to ... (diff) | |
download | opensim-SC_OLD-a94e1e0e085a3c70e35e2c9cf0583d193c6ed32f.zip opensim-SC_OLD-a94e1e0e085a3c70e35e2c9cf0583d193c6ed32f.tar.gz opensim-SC_OLD-a94e1e0e085a3c70e35e2c9cf0583d193c6ed32f.tar.bz2 opensim-SC_OLD-a94e1e0e085a3c70e35e2c9cf0583d193c6ed32f.tar.xz |
When creating a coalesced object, set its Creator ID if all the objects have the same creator
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index a7e6fdd..af95577 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -412,17 +412,28 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
412 | 412 | ||
413 | if (item == null) | 413 | if (item == null) |
414 | return null; | 414 | return null; |
415 | |||
416 | item.CreatorId = objlist[0].RootPart.CreatorID.ToString(); | ||
417 | item.CreatorData = objlist[0].RootPart.CreatorData; | ||
415 | 418 | ||
416 | // Can't know creator is the same, so null it in inventory | ||
417 | if (objlist.Count > 1) | 419 | if (objlist.Count > 1) |
418 | { | 420 | { |
419 | item.CreatorId = UUID.Zero.ToString(); | ||
420 | item.Flags = (uint)InventoryItemFlags.ObjectHasMultipleItems; | 421 | item.Flags = (uint)InventoryItemFlags.ObjectHasMultipleItems; |
422 | |||
423 | // If the objects have different creators then don't specify a creator at all | ||
424 | foreach (SceneObjectGroup objectGroup in objlist) | ||
425 | { | ||
426 | if ((objectGroup.RootPart.CreatorID.ToString() != item.CreatorId) | ||
427 | || (objectGroup.RootPart.CreatorData.ToString() != item.CreatorData)) | ||
428 | { | ||
429 | item.CreatorId = UUID.Zero.ToString(); | ||
430 | item.CreatorData = string.Empty; | ||
431 | break; | ||
432 | } | ||
433 | } | ||
421 | } | 434 | } |
422 | else | 435 | else |
423 | { | 436 | { |
424 | item.CreatorId = objlist[0].RootPart.CreatorID.ToString(); | ||
425 | item.CreatorData = objlist[0].RootPart.CreatorData; | ||
426 | item.SaleType = objlist[0].RootPart.ObjectSaleType; | 437 | item.SaleType = objlist[0].RootPart.ObjectSaleType; |
427 | item.SalePrice = objlist[0].RootPart.SalePrice; | 438 | item.SalePrice = objlist[0].RootPart.SalePrice; |
428 | } | 439 | } |