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.cs45
1 files changed, 38 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index e41f180..8481737 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -606,16 +606,47 @@ namespace OpenSim.Region.Environment.Scenes
606 public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, 606 public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID,
607 uint primLocalID) 607 uint primLocalID)
608 { 608 {
609
609 SceneObjectGroup group = GetGroupByPrim(primLocalID); 610 SceneObjectGroup group = GetGroupByPrim(primLocalID);
611
610 if (group != null) 612 if (group != null)
611 { 613 {
612 // TODO Retrieve itemID from client's inventory to pass on 614 LLUUID copyID = LLUUID.Random();
613 //group.AddInventoryItem(remoteClient, primLocalID, null); 615 if (itemID != LLUUID.Zero)
614 m_log.InfoFormat( 616 {
615 "[PRIM INVENTORY]: " + 617 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
616 "Non script prim inventory not yet implemented!" 618
617 + "\nUpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}, user {3}", 619 if (userInfo != null && userInfo.RootFolder != null)
618 itemID, folderID, primLocalID, remoteClient.Name); 620 {
621 InventoryItemBase item = userInfo.RootFolder.HasItem(itemID);
622
623 // Try library
624 // XXX clumsy, possibly should be one call
625 if (null == item)
626 {
627 item = CommsManager.UserProfileCacheService.libraryRoot.HasItem(itemID);
628 }
629
630 if (item != null)
631 {
632
633 group.AddInventoryItem(remoteClient, primLocalID, item, copyID);
634 m_log.InfoFormat("[PRIMINVENTORY]: Update with item {0} requested of prim {1} for {2}", item.inventoryName, primLocalID, remoteClient.Name);
635 group.GetProperties(remoteClient);
636
637 }
638 else
639 {
640 m_log.ErrorFormat(
641 "[PRIM INVENTORY]: Could not find inventory item {0} to update for {1}!",
642 itemID, remoteClient.Name);
643 }
644
645 }
646
647 }
648
649
619 } 650 }
620 else 651 else
621 { 652 {