aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
diff options
context:
space:
mode:
authorroot2010-09-16 23:12:32 +0200
committerMelanie2010-09-16 23:19:46 +0100
commit1b2edfe75f4fe8b320f65ad54f6f2b0972fda154 (patch)
tree7985e5df6f02fc475a84d451e2a3fe2d35b0494e /OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
parentAdd the modules include line back that i dropped by mistake (diff)
downloadopensim-SC-1b2edfe75f4fe8b320f65ad54f6f2b0972fda154.zip
opensim-SC-1b2edfe75f4fe8b320f65ad54f6f2b0972fda154.tar.gz
opensim-SC-1b2edfe75f4fe8b320f65ad54f6f2b0972fda154.tar.bz2
opensim-SC-1b2edfe75f4fe8b320f65ad54f6f2b0972fda154.tar.xz
JustinCC is evil. f7b28dd3 broke script persistence. This fixes it.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 53ddb5d..fbaa7d4 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -140,6 +140,34 @@ namespace OpenSim.Region.Framework.Scenes
140 } 140 }
141 } 141 }
142 142
143 public void ResetObjectID()
144 {
145 m_items.LockItemsForWrite(true);
146
147 if (Items.Count == 0)
148 {
149 m_items.LockItemsForWrite(false);
150 return;
151 }
152
153 HasInventoryChanged = true;
154 if (m_part.ParentGroup != null)
155 {
156 m_part.ParentGroup.HasGroupChanged = true;
157 }
158
159 IList<TaskInventoryItem> items = new List<TaskInventoryItem>(Items.Values);
160 Items.Clear();
161
162 foreach (TaskInventoryItem item in items)
163 {
164 item.ParentPartID = m_part.UUID;
165 item.ParentID = m_part.UUID;
166 Items.Add(item.ItemID, item);
167 }
168 m_items.LockItemsForWrite(false);
169 }
170
143 /// <summary> 171 /// <summary>
144 /// Change every item in this inventory to a new owner. 172 /// Change every item in this inventory to a new owner.
145 /// </summary> 173 /// </summary>