diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 5e2eb73..a119efc 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -638,36 +638,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
638 | /// <param name="itemID"></param> | 638 | /// <param name="itemID"></param> |
639 | /// <param name="length"></param> | 639 | /// <param name="length"></param> |
640 | /// <param name="newName"></param> | 640 | /// <param name="newName"></param> |
641 | public void MoveInventoryItem(IClientAPI remoteClient, UUID folderID, UUID itemID, int length, | 641 | public void MoveInventoryItem(IClientAPI remoteClient, List<InventoryItemBase> items) |
642 | string newName) | ||
643 | { | 642 | { |
644 | m_log.DebugFormat( | 643 | m_log.DebugFormat( |
645 | "[AGENT INVENTORY]: Moving item {0} to {1} for {2}", itemID, folderID, remoteClient.AgentId); | 644 | "[AGENT INVENTORY]: Moving {0} items for user {1}", items.Count, remoteClient.AgentId); |
646 | 645 | ||
647 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); | 646 | if (!InventoryService.MoveItems(remoteClient.AgentId, items)) |
648 | item = InventoryService.GetItem(item); | 647 | m_log.Warn("[AGENT INVENTORY]: Failed to move items for user " + remoteClient.AgentId); |
649 | |||
650 | if (item != null) | ||
651 | { | ||
652 | if (newName != String.Empty) | ||
653 | { | ||
654 | item.Name = newName; | ||
655 | } | ||
656 | item.Folder = folderID; | ||
657 | |||
658 | // Diva comment: can't we just update? | ||
659 | List<UUID> uuids = new List<UUID>(); | ||
660 | uuids.Add(item.ID); | ||
661 | InventoryService.DeleteItems(item.Owner, uuids); | ||
662 | |||
663 | AddInventoryItem(remoteClient, item); | ||
664 | } | ||
665 | else | ||
666 | { | ||
667 | m_log.Warn("[AGENT INVENTORY]: Failed to find item " + itemID.ToString()); | ||
668 | |||
669 | return; | ||
670 | } | ||
671 | } | 648 | } |
672 | 649 | ||
673 | /// <summary> | 650 | /// <summary> |