* Fix mantis 345 - it is now possible to duplicate prims directly in the region again without breakage

* This includes their inventories
* Also, this revision properly synchronizes prim inventory crud.
This commit is contained in:
Justin Clarke Casey
2008-01-16 20:27:12 +00:00
parent c3061717d0
commit b33da2538e
5 changed files with 179 additions and 112 deletions

View File

@@ -952,10 +952,10 @@ namespace OpenSim.Region.Environment.Scenes
#region Copying
/// <summary>
///
/// Duplicates this part.
/// </summary>
/// <returns></returns>
public SceneObjectPart Copy(uint localID, LLUUID AgentID, LLUUID GroupID)
public SceneObjectPart Copy(uint localID, LLUUID AgentID, LLUUID GroupID, int linkNum)
{
SceneObjectPart dupe = (SceneObjectPart) MemberwiseClone();
dupe.m_shape = m_shape.Copy();
@@ -977,6 +977,10 @@ namespace OpenSim.Region.Environment.Scenes
dupe.ObjectSaleType = ObjectSaleType;
dupe.SalePrice = SalePrice;
dupe.Category = Category;
dupe.TaskInventory = (TaskInventoryDictionary)dupe.TaskInventory.Clone();
dupe.ResetIDs(linkNum);
// This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated.
dupe.LastOwnerID = ObjectOwner;