aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
diff options
context:
space:
mode:
authorJohn Hurliman2010-09-16 17:31:24 -0700
committerJohn Hurliman2010-09-16 17:31:24 -0700
commit5321e0e69f5813b03748155193b0833f28c532ec (patch)
treec51d4cc760056928e97a56b09b170259b0b9e5fd /OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
parentChanged SceneObjectGroup to store parts with the fast and thread-safe MapAndA... (diff)
parentFix build break by replacing Items.LockItemsForWrite() with lock (Items) {} (diff)
downloadopensim-SC-5321e0e69f5813b03748155193b0833f28c532ec.zip
opensim-SC-5321e0e69f5813b03748155193b0833f28c532ec.tar.gz
opensim-SC-5321e0e69f5813b03748155193b0833f28c532ec.tar.bz2
opensim-SC-5321e0e69f5813b03748155193b0833f28c532ec.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs27
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>