diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 0e3daf76..210f5cd 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -140,6 +140,33 @@ namespace OpenSim.Region.Framework.Scenes | |||
140 | } | 140 | } |
141 | } | 141 | } |
142 | 142 | ||
143 | public void ResetObjectID() | ||
144 | { | ||
145 | lock (Items) | ||
146 | { | ||
147 | if (Items.Count == 0) | ||
148 | { | ||
149 | return; | ||
150 | } | ||
151 | |||
152 | HasInventoryChanged = true; | ||
153 | if (m_part.ParentGroup != null) | ||
154 | { | ||
155 | m_part.ParentGroup.HasGroupChanged = true; | ||
156 | } | ||
157 | |||
158 | IList<TaskInventoryItem> items = new List<TaskInventoryItem>(Items.Values); | ||
159 | Items.Clear(); | ||
160 | |||
161 | foreach (TaskInventoryItem item in items) | ||
162 | { | ||
163 | item.ParentPartID = m_part.UUID; | ||
164 | item.ParentID = m_part.UUID; | ||
165 | Items.Add(item.ItemID, item); | ||
166 | } | ||
167 | } | ||
168 | } | ||
169 | |||
143 | /// <summary> | 170 | /// <summary> |
144 | /// Change every item in this inventory to a new owner. | 171 | /// Change every item in this inventory to a new owner. |
145 | /// </summary> | 172 | /// </summary> |