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