diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index d051ed9..824a536 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -49,6 +49,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
49 | if (part != null) | 49 | if (part != null) |
50 | { | 50 | { |
51 | part.StartScript(itemID); | 51 | part.StartScript(itemID); |
52 | |||
52 | } | 53 | } |
53 | else | 54 | else |
54 | { | 55 | { |
@@ -56,9 +57,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
56 | "[PRIMINVENTORY]: " + | 57 | "[PRIMINVENTORY]: " + |
57 | "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", | 58 | "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", |
58 | localID, Name, UUID, itemID); | 59 | localID, Name, UUID, itemID); |
59 | } | 60 | } |
60 | } | 61 | } |
61 | 62 | ||
62 | // /// Start a given script. | 63 | // /// Start a given script. |
63 | // /// </summary> | 64 | // /// </summary> |
64 | // /// <param name="localID"> | 65 | // /// <param name="localID"> |
@@ -79,7 +80,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
79 | // localID, Name, UUID, itemID); | 80 | // localID, Name, UUID, itemID); |
80 | // } | 81 | // } |
81 | // } | 82 | // } |
82 | 83 | ||
83 | /// <summary> | 84 | /// <summary> |
84 | /// Start the scripts contained in all the prims in this group. | 85 | /// Start the scripts contained in all the prims in this group. |
85 | /// </summary> | 86 | /// </summary> |
@@ -105,7 +106,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
105 | } | 106 | } |
106 | } | 107 | } |
107 | } | 108 | } |
108 | 109 | ||
109 | /// Start a given script. | 110 | /// Start a given script. |
110 | /// </summary> | 111 | /// </summary> |
111 | /// <param name="localID"> | 112 | /// <param name="localID"> |
@@ -125,9 +126,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
125 | "[PRIMINVENTORY]: " + | 126 | "[PRIMINVENTORY]: " + |
126 | "Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}", | 127 | "Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}", |
127 | partID, Name, UUID, itemID); | 128 | partID, Name, UUID, itemID); |
128 | } | 129 | } |
129 | } | 130 | } |
130 | 131 | ||
131 | /// <summary> | 132 | /// <summary> |
132 | /// | 133 | /// |
133 | /// </summary> | 134 | /// </summary> |
@@ -170,7 +171,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
170 | localID, Name, UUID); | 171 | localID, Name, UUID); |
171 | } | 172 | } |
172 | } | 173 | } |
173 | 174 | ||
174 | /// <summary> | 175 | /// <summary> |
175 | /// Add an inventory item to a prim in this group. | 176 | /// Add an inventory item to a prim in this group. |
176 | /// </summary> | 177 | /// </summary> |
@@ -179,7 +180,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
179 | /// <param name="item"></param> | 180 | /// <param name="item"></param> |
180 | /// <param name="copyItemID">The item UUID that should be used by the new item.</param> | 181 | /// <param name="copyItemID">The item UUID that should be used by the new item.</param> |
181 | /// <returns></returns> | 182 | /// <returns></returns> |
182 | public bool AddInventoryItem(IClientAPI remoteClient, uint localID, | 183 | public bool AddInventoryItem(IClientAPI remoteClient, uint localID, |
183 | InventoryItemBase item, LLUUID copyItemID) | 184 | InventoryItemBase item, LLUUID copyItemID) |
184 | { | 185 | { |
185 | LLUUID newItemId = (copyItemID != LLUUID.Zero) ? copyItemID : item.ID; | 186 | LLUUID newItemId = (copyItemID != LLUUID.Zero) ? copyItemID : item.ID; |
@@ -188,8 +189,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
188 | if (part != null) | 189 | if (part != null) |
189 | { | 190 | { |
190 | TaskInventoryItem taskItem = new TaskInventoryItem(); | 191 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
191 | 192 | ||
192 | taskItem.ItemID = newItemId; | 193 | taskItem.ItemID = newItemId; |
193 | taskItem.AssetID = item.AssetID; | 194 | taskItem.AssetID = item.AssetID; |
194 | taskItem.Name = item.Name; | 195 | taskItem.Name = item.Name; |
195 | taskItem.Description = item.Description; | 196 | taskItem.Description = item.Description; |
@@ -197,15 +198,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
197 | taskItem.CreatorID = item.Creator; | 198 | taskItem.CreatorID = item.Creator; |
198 | taskItem.Type = item.AssetType; | 199 | taskItem.Type = item.AssetType; |
199 | taskItem.InvType = item.InvType; | 200 | taskItem.InvType = item.InvType; |
200 | 201 | ||
201 | taskItem.BaseMask = item.BasePermissions; | 202 | taskItem.BaseMask = item.BasePermissions; |
202 | taskItem.OwnerMask = item.CurrentPermissions; | 203 | taskItem.OwnerMask = item.CurrentPermissions; |
203 | // FIXME: ignoring group permissions for now as they aren't stored in item | 204 | // FIXME: ignoring group permissions for now as they aren't stored in item |
204 | taskItem.EveryoneMask = item.EveryOnePermissions; | 205 | taskItem.EveryoneMask = item.EveryOnePermissions; |
205 | taskItem.NextOwnerMask = item.NextPermissions; | 206 | taskItem.NextOwnerMask = item.NextPermissions; |
206 | 207 | ||
207 | part.AddInventoryItem(taskItem); | 208 | part.AddInventoryItem(taskItem); |
208 | 209 | ||
209 | return true; | 210 | return true; |
210 | } | 211 | } |
211 | else | 212 | else |
@@ -218,7 +219,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
218 | 219 | ||
219 | return false; | 220 | return false; |
220 | } | 221 | } |
221 | 222 | ||
222 | /// <summary> | 223 | /// <summary> |
223 | /// Returns an existing inventory item. Returns the original, so any changes will be live. | 224 | /// Returns an existing inventory item. Returns the original, so any changes will be live. |
224 | /// </summary> | 225 | /// </summary> |
@@ -238,11 +239,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
238 | "[PRIMINVENTORY]: " + | 239 | "[PRIMINVENTORY]: " + |
239 | "Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}", | 240 | "Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}", |
240 | primID, part.Name, part.UUID, itemID); | 241 | primID, part.Name, part.UUID, itemID); |
241 | } | 242 | } |
242 | 243 | ||
243 | return null; | 244 | return null; |
244 | } | 245 | } |
245 | 246 | ||
246 | /// <summary> | 247 | /// <summary> |
247 | /// Update an existing inventory item. | 248 | /// Update an existing inventory item. |
248 | /// </summary> | 249 | /// </summary> |
@@ -254,8 +255,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
254 | SceneObjectPart part = GetChildPart(item.ParentPartID); | 255 | SceneObjectPart part = GetChildPart(item.ParentPartID); |
255 | if (part != null) | 256 | if (part != null) |
256 | { | 257 | { |
257 | part.UpdateInventoryItem(item); | 258 | part.UpdateInventoryItem(item); |
258 | 259 | ||
259 | return true; | 260 | return true; |
260 | } | 261 | } |
261 | else | 262 | else |
@@ -264,22 +265,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
264 | "[PRIMINVENTORY]: " + | 265 | "[PRIMINVENTORY]: " + |
265 | "Couldn't find prim ID {0} to update item {1}, {2}", | 266 | "Couldn't find prim ID {0} to update item {1}, {2}", |
266 | item.ParentPartID, item.Name, item.ItemID); | 267 | item.ParentPartID, item.Name, item.ItemID); |
267 | } | 268 | } |
268 | 269 | ||
269 | return false; | 270 | return false; |
270 | } | 271 | } |
271 | 272 | ||
272 | public int RemoveInventoryItem(uint localID, LLUUID itemID) | 273 | public int RemoveInventoryItem(uint localID, LLUUID itemID) |
273 | { | 274 | { |
274 | SceneObjectPart part = GetChildPart(localID); | 275 | SceneObjectPart part = GetChildPart(localID); |
275 | if (part != null) | 276 | if (part != null) |
276 | { | 277 | { |
277 | int type = part.RemoveInventoryItem(itemID); | 278 | int type = part.RemoveInventoryItem(itemID); |
278 | 279 | ||
279 | return type; | 280 | return type; |
280 | } | 281 | } |
281 | 282 | ||
282 | return -1; | 283 | return -1; |
283 | } | 284 | } |
284 | } | 285 | } |
285 | } \ No newline at end of file | 286 | } |