If a scene object part UUID is changed (only possible when not in a scene), then adjust the inventory items to point to the new uuid as well

This commit is contained in:
Justin Clark-Casey (justincc)
2010-09-07 03:41:29 +01:00
parent 84ad9e4d4e
commit f7b28dd321
4 changed files with 17 additions and 8 deletions

View File

@@ -494,7 +494,14 @@ namespace OpenSim.Region.Framework.Scenes
public UUID UUID
{
get { return m_uuid; }
set { m_uuid = value; }
set
{
m_uuid = value;
// This is necessary so that TaskInventoryItem parent ids correctly reference the new uuid of this part
if (Inventory != null)
Inventory.ResetInventoryIDs();
}
}
public uint LocalId
@@ -2756,7 +2763,6 @@ namespace OpenSim.Region.Framework.Scenes
UUID = UUID.Random();
LinkNum = linkNum;
LocalId = 0;
Inventory.ResetInventoryIDs();
}
/// <summary>