diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 59731f7..17159b4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -648,6 +648,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
648 | return; | 648 | return; |
649 | } | 649 | } |
650 | 650 | ||
651 | if (newName == null) newName = item.Name; | ||
652 | |||
651 | AssetBase asset = AssetService.Get(item.AssetID.ToString()); | 653 | AssetBase asset = AssetService.Get(item.AssetID.ToString()); |
652 | 654 | ||
653 | if (asset != null) | 655 | if (asset != null) |
@@ -695,6 +697,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
695 | } | 697 | } |
696 | 698 | ||
697 | /// <summary> | 699 | /// <summary> |
700 | /// Move an item within the agent's inventory, and leave a copy (used in making a new outfit) | ||
701 | /// </summary> | ||
702 | public void MoveInventoryItemsLeaveCopy(IClientAPI remoteClient, List<InventoryItemBase> items, UUID destfolder) | ||
703 | { | ||
704 | List<InventoryItemBase> moveitems = new List<InventoryItemBase>(); | ||
705 | foreach (InventoryItemBase b in items) | ||
706 | { | ||
707 | CopyInventoryItem(remoteClient, 0, remoteClient.AgentId, b.ID, b.Folder, null); | ||
708 | InventoryItemBase n = InventoryService.GetItem(b); | ||
709 | n.Folder = destfolder; | ||
710 | moveitems.Add(n); | ||
711 | remoteClient.SendInventoryItemCreateUpdate(n, 0); | ||
712 | } | ||
713 | |||
714 | MoveInventoryItem(remoteClient, moveitems); | ||
715 | } | ||
716 | |||
717 | /// <summary> | ||
698 | /// Move an item within the agent's inventory. | 718 | /// Move an item within the agent's inventory. |
699 | /// </summary> | 719 | /// </summary> |
700 | /// <param name="remoteClient"></param> | 720 | /// <param name="remoteClient"></param> |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 644fbb0..ea52ffb 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2922,6 +2922,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2922 | client.OnFetchInventory += HandleFetchInventory; | 2922 | client.OnFetchInventory += HandleFetchInventory; |
2923 | client.OnUpdateInventoryItem += UpdateInventoryItemAsset; | 2923 | client.OnUpdateInventoryItem += UpdateInventoryItemAsset; |
2924 | client.OnCopyInventoryItem += CopyInventoryItem; | 2924 | client.OnCopyInventoryItem += CopyInventoryItem; |
2925 | client.OnMoveItemsAndLeaveCopy += MoveInventoryItemsLeaveCopy; | ||
2925 | client.OnMoveInventoryItem += MoveInventoryItem; | 2926 | client.OnMoveInventoryItem += MoveInventoryItem; |
2926 | client.OnRemoveInventoryItem += RemoveInventoryItem; | 2927 | client.OnRemoveInventoryItem += RemoveInventoryItem; |
2927 | client.OnRemoveInventoryFolder += RemoveInventoryFolder; | 2928 | client.OnRemoveInventoryFolder += RemoveInventoryFolder; |