diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index 9b99df7..6e815a6 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |||
@@ -115,6 +115,31 @@ namespace OpenSim.Region.Environment.Scenes | |||
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
118 | public void ChangeInventoryOwner(LLUUID ownerId) | ||
119 | { | ||
120 | lock (TaskInventory) | ||
121 | { | ||
122 | if (0 == TaskInventory.Count) | ||
123 | { | ||
124 | return; | ||
125 | } | ||
126 | |||
127 | HasInventoryChanged = true; | ||
128 | |||
129 | IList<TaskInventoryItem> items = new List<TaskInventoryItem>(TaskInventory.Values); | ||
130 | foreach (TaskInventoryItem item in items) | ||
131 | { | ||
132 | if (ownerId != item.OwnerID) | ||
133 | { | ||
134 | item.LastOwnerID = item.OwnerID; | ||
135 | item.OwnerID = ownerId; | ||
136 | item.BaseMask = item.NextOwnerMask & (uint)PermissionMask.All; | ||
137 | item.OwnerMask = item.NextOwnerMask & (uint)PermissionMask.All; | ||
138 | } | ||
139 | } | ||
140 | } | ||
141 | } | ||
142 | |||
118 | /// <summary> | 143 | /// <summary> |
119 | /// Start all the scripts contained in this prim's inventory | 144 | /// Start all the scripts contained in this prim's inventory |
120 | /// </summary> | 145 | /// </summary> |