aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs53
1 files changed, 51 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 753d0cf..ceaadc2 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -357,7 +357,7 @@ namespace OpenSim.Region.Environment.Scenes
357 } 357 }
358 358
359 /// <summary> 359 /// <summary>
360 /// 360 /// Request a prim (task) inventory
361 /// </summary> 361 /// </summary>
362 /// <param name="remoteClient"></param> 362 /// <param name="remoteClient"></param>
363 /// <param name="primLocalID"></param> 363 /// <param name="primLocalID"></param>
@@ -375,8 +375,19 @@ namespace OpenSim.Region.Environment.Scenes
375 } 375 }
376 } 376 }
377 } 377 }
378 else
379 {
380 MainLog.Instance.Warn(
381 "PRIMINVENTORY", "Inventory requested of prim {0} which doesn't exist", primLocalID);
382 }
378 } 383 }
379 384
385 /// <summary>
386 /// Remove an item from a prim (task) inventory
387 /// </summary>
388 /// <param name="remoteClient"></param>
389 /// <param name="itemID"></param>
390 /// <param name="localID"></param>
380 public void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID) 391 public void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID)
381 { 392 {
382 SceneObjectGroup group = GetGroupByPrim(localID); 393 SceneObjectGroup group = GetGroupByPrim(localID);
@@ -389,6 +400,44 @@ namespace OpenSim.Region.Environment.Scenes
389 EventManager.TriggerRemoveScript(localID, itemID); 400 EventManager.TriggerRemoveScript(localID, itemID);
390 } 401 }
391 } 402 }
403 else
404 {
405 MainLog.Instance.Warn(
406 "PRIMINVENTORY",
407 "Removal of item {0} requested of prim {1} but this prim does not exist",
408 itemID,
409 localID);
410 }
411 }
412
413 /// <summary>
414 /// Update an item in a prim (task) inventory
415 /// </summary>
416 /// <param name="remoteClient"></param>
417 /// <param name="itemID"></param>
418 /// <param name="folderID"></param>
419 /// <param name="primLocalID"></param>
420 public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID,
421 uint primLocalID)
422 {
423 SceneObjectGroup group = GetGroupByPrim(primLocalID);
424 if (group != null)
425 {
426 // TODO Retrieve itemID from client's inventory to pass on
427 //group.AddInventoryItem(rmoteClient, primLocalID, null);
428 MainLog.Instance.Verbose(
429 "PRIMINVENTORY",
430 "UpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}",
431 itemID, folderID, primLocalID);
432 }
433 else
434 {
435 MainLog.Instance.Warn(
436 "PRIMINVENTORY",
437 "Update with item {0} requested of prim {1} but this prim does not exist",
438 itemID,
439 primLocalID);
440 }
392 } 441 }
393 442
394 public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID) 443 public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID)
@@ -430,7 +479,7 @@ namespace OpenSim.Region.Environment.Scenes
430 if (group != null) 479 if (group != null)
431 { 480 {
432 // TODO: do we care about the value of this bool? 481 // TODO: do we care about the value of this bool?
433 bool added = group.AddInventoryItem(remoteClient, localID, item, copyID); 482 group.AddInventoryItem(remoteClient, localID, item, copyID);
434 group.GetProperites(remoteClient); 483 group.GetProperites(remoteClient);
435 } 484 }
436 } 485 }