diff options
11 files changed, 65 insertions, 3 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index ce2e9a1..84c6916 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs | |||
@@ -593,6 +593,7 @@ namespace OpenSim.Client.MXP.ClientStack | |||
593 | public event DisconnectUser OnDisconnectUser; | 593 | public event DisconnectUser OnDisconnectUser; |
594 | public event RequestAvatarProperties OnRequestAvatarProperties; | 594 | public event RequestAvatarProperties OnRequestAvatarProperties; |
595 | public event SetAlwaysRun OnSetAlwaysRun; | 595 | public event SetAlwaysRun OnSetAlwaysRun; |
596 | public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy; | ||
596 | public event TeleportLandmarkRequest OnTeleportLandmarkRequest; | 597 | public event TeleportLandmarkRequest OnTeleportLandmarkRequest; |
597 | public event DeRezObject OnDeRezObject; | 598 | public event DeRezObject OnDeRezObject; |
598 | public event Action<IClientAPI> OnRegionHandShakeReply; | 599 | public event Action<IClientAPI> OnRegionHandShakeReply; |
diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs index 2063616..6ad5f5a 100644 --- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs +++ b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs | |||
@@ -253,6 +253,7 @@ namespace OpenSim.Client.Sirikata.ClientStack | |||
253 | public event AddNewPrim OnAddPrim; | 253 | public event AddNewPrim OnAddPrim; |
254 | public event FetchInventory OnAgentDataUpdateRequest; | 254 | public event FetchInventory OnAgentDataUpdateRequest; |
255 | public event TeleportLocationRequest OnSetStartLocationRequest; | 255 | public event TeleportLocationRequest OnSetStartLocationRequest; |
256 | public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy; | ||
256 | public event RequestGodlikePowers OnRequestGodlikePowers; | 257 | public event RequestGodlikePowers OnRequestGodlikePowers; |
257 | public event GodKickUser OnGodKickUser; | 258 | public event GodKickUser OnGodKickUser; |
258 | public event ObjectDuplicate OnObjectDuplicate; | 259 | public event ObjectDuplicate OnObjectDuplicate; |
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index 841f9a4..8ef411b 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs | |||
@@ -290,6 +290,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack | |||
290 | public event GenericCall2 OnStopMovement = delegate { }; | 290 | public event GenericCall2 OnStopMovement = delegate { }; |
291 | public event Action<UUID> OnRemoveAvatar = delegate { }; | 291 | public event Action<UUID> OnRemoveAvatar = delegate { }; |
292 | public event ObjectPermissions OnObjectPermissions = delegate { }; | 292 | public event ObjectPermissions OnObjectPermissions = delegate { }; |
293 | public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy = delegate { }; | ||
293 | public event CreateNewInventoryItem OnCreateNewInventoryItem = delegate { }; | 294 | public event CreateNewInventoryItem OnCreateNewInventoryItem = delegate { }; |
294 | public event LinkInventoryItem OnLinkInventoryItem = delegate { }; | 295 | public event LinkInventoryItem OnLinkInventoryItem = delegate { }; |
295 | public event CreateInventoryFolder OnCreateNewInventoryFolder = delegate { }; | 296 | public event CreateInventoryFolder OnCreateNewInventoryFolder = delegate { }; |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 95aec94..07bded6 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -264,6 +264,9 @@ namespace OpenSim.Framework | |||
264 | public delegate void MoveInventoryItem( | 264 | public delegate void MoveInventoryItem( |
265 | IClientAPI remoteClient, List<InventoryItemBase> items); | 265 | IClientAPI remoteClient, List<InventoryItemBase> items); |
266 | 266 | ||
267 | public delegate void MoveItemsAndLeaveCopy( | ||
268 | IClientAPI remoteClient, List<InventoryItemBase> items, UUID destFolder); | ||
269 | |||
267 | public delegate void RemoveInventoryItem( | 270 | public delegate void RemoveInventoryItem( |
268 | IClientAPI remoteClient, List<UUID> itemIDs); | 271 | IClientAPI remoteClient, List<UUID> itemIDs); |
269 | 272 | ||
@@ -772,6 +775,7 @@ namespace OpenSim.Framework | |||
772 | event RequestTaskInventory OnRequestTaskInventory; | 775 | event RequestTaskInventory OnRequestTaskInventory; |
773 | event UpdateInventoryItem OnUpdateInventoryItem; | 776 | event UpdateInventoryItem OnUpdateInventoryItem; |
774 | event CopyInventoryItem OnCopyInventoryItem; | 777 | event CopyInventoryItem OnCopyInventoryItem; |
778 | event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy; | ||
775 | event MoveInventoryItem OnMoveInventoryItem; | 779 | event MoveInventoryItem OnMoveInventoryItem; |
776 | event RemoveInventoryFolder OnRemoveInventoryFolder; | 780 | event RemoveInventoryFolder OnRemoveInventoryFolder; |
777 | event RemoveInventoryItem OnRemoveInventoryItem; | 781 | event RemoveInventoryItem OnRemoveInventoryItem; |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index ac4be4d..d2d1e8f 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -154,6 +154,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
154 | public event RequestTaskInventory OnRequestTaskInventory; | 154 | public event RequestTaskInventory OnRequestTaskInventory; |
155 | public event UpdateInventoryItem OnUpdateInventoryItem; | 155 | public event UpdateInventoryItem OnUpdateInventoryItem; |
156 | public event CopyInventoryItem OnCopyInventoryItem; | 156 | public event CopyInventoryItem OnCopyInventoryItem; |
157 | public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy; | ||
157 | public event MoveInventoryItem OnMoveInventoryItem; | 158 | public event MoveInventoryItem OnMoveInventoryItem; |
158 | public event RemoveInventoryItem OnRemoveInventoryItem; | 159 | public event RemoveInventoryItem OnRemoveInventoryItem; |
159 | public event RemoveInventoryFolder OnRemoveInventoryFolder; | 160 | public event RemoveInventoryFolder OnRemoveInventoryFolder; |
@@ -4839,6 +4840,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4839 | AddLocalPacketHandler(PacketType.TransferAbort, HandleTransferAbort, false); | 4840 | AddLocalPacketHandler(PacketType.TransferAbort, HandleTransferAbort, false); |
4840 | AddLocalPacketHandler(PacketType.MuteListRequest, HandleMuteListRequest, false); | 4841 | AddLocalPacketHandler(PacketType.MuteListRequest, HandleMuteListRequest, false); |
4841 | AddLocalPacketHandler(PacketType.UseCircuitCode, HandleUseCircuitCode); | 4842 | AddLocalPacketHandler(PacketType.UseCircuitCode, HandleUseCircuitCode); |
4843 | AddLocalPacketHandler(PacketType.CreateNewOutfitAttachments, HandleCreateNewOutfitAttachments); | ||
4842 | AddLocalPacketHandler(PacketType.AgentHeightWidth, HandleAgentHeightWidth, false); | 4844 | AddLocalPacketHandler(PacketType.AgentHeightWidth, HandleAgentHeightWidth, false); |
4843 | AddLocalPacketHandler(PacketType.InventoryDescendents, HandleInventoryDescendents); | 4845 | AddLocalPacketHandler(PacketType.InventoryDescendents, HandleInventoryDescendents); |
4844 | AddLocalPacketHandler(PacketType.DirPlacesQuery, HandleDirPlacesQuery); | 4846 | AddLocalPacketHandler(PacketType.DirPlacesQuery, HandleDirPlacesQuery); |
@@ -9348,6 +9350,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9348 | { | 9350 | { |
9349 | return true; | 9351 | return true; |
9350 | } | 9352 | } |
9353 | |||
9354 | private bool HandleCreateNewOutfitAttachments(IClientAPI sender, Packet Pack) | ||
9355 | { | ||
9356 | CreateNewOutfitAttachmentsPacket packet = (CreateNewOutfitAttachmentsPacket)Pack; | ||
9357 | |||
9358 | #region Packet Session and User Check | ||
9359 | if (m_checkPackets) | ||
9360 | { | ||
9361 | if (packet.AgentData.SessionID != SessionId || | ||
9362 | packet.AgentData.AgentID != AgentId) | ||
9363 | return true; | ||
9364 | } | ||
9365 | #endregion | ||
9366 | MoveItemsAndLeaveCopy handlerMoveItemsAndLeaveCopy = null; | ||
9367 | List<InventoryItemBase> items = new List<InventoryItemBase>(); | ||
9368 | foreach (CreateNewOutfitAttachmentsPacket.ObjectDataBlock n in packet.ObjectData) | ||
9369 | { | ||
9370 | InventoryItemBase b = new InventoryItemBase(); | ||
9371 | b.ID = n.OldItemID; | ||
9372 | b.Folder = n.OldFolderID; | ||
9373 | items.Add(b); | ||
9374 | } | ||
9375 | |||
9376 | handlerMoveItemsAndLeaveCopy = OnMoveItemsAndLeaveCopy; | ||
9377 | if (handlerMoveItemsAndLeaveCopy != null) | ||
9378 | { | ||
9379 | handlerMoveItemsAndLeaveCopy(this, items, packet.HeaderData.NewFolderID); | ||
9380 | } | ||
9381 | |||
9382 | return true; | ||
9383 | } | ||
9351 | 9384 | ||
9352 | private bool HandleAgentHeightWidth(IClientAPI sender, Packet Pack) | 9385 | private bool HandleAgentHeightWidth(IClientAPI sender, Packet Pack) |
9353 | { | 9386 | { |
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 4db8f9e..cdc56a2 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
79 | public event DisconnectUser OnDisconnectUser; | 79 | public event DisconnectUser OnDisconnectUser; |
80 | public event RequestAvatarProperties OnRequestAvatarProperties; | 80 | public event RequestAvatarProperties OnRequestAvatarProperties; |
81 | public event SetAlwaysRun OnSetAlwaysRun; | 81 | public event SetAlwaysRun OnSetAlwaysRun; |
82 | 82 | public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy; | |
83 | public event DeRezObject OnDeRezObject; | 83 | public event DeRezObject OnDeRezObject; |
84 | public event Action<IClientAPI> OnRegionHandShakeReply; | 84 | public event Action<IClientAPI> OnRegionHandShakeReply; |
85 | public event GenericCall2 OnRequestWearables; | 85 | public event GenericCall2 OnRequestWearables; |
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 d55c7a1..6c17be8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2924,6 +2924,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2924 | client.OnFetchInventory += HandleFetchInventory; | 2924 | client.OnFetchInventory += HandleFetchInventory; |
2925 | client.OnUpdateInventoryItem += UpdateInventoryItemAsset; | 2925 | client.OnUpdateInventoryItem += UpdateInventoryItemAsset; |
2926 | client.OnCopyInventoryItem += CopyInventoryItem; | 2926 | client.OnCopyInventoryItem += CopyInventoryItem; |
2927 | client.OnMoveItemsAndLeaveCopy += MoveInventoryItemsLeaveCopy; | ||
2927 | client.OnMoveInventoryItem += MoveInventoryItem; | 2928 | client.OnMoveInventoryItem += MoveInventoryItem; |
2928 | client.OnRemoveInventoryItem += RemoveInventoryItem; | 2929 | client.OnRemoveInventoryItem += RemoveInventoryItem; |
2929 | client.OnRemoveInventoryFolder += RemoveInventoryFolder; | 2930 | client.OnRemoveInventoryFolder += RemoveInventoryFolder; |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index c7a9484..91cbee9 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -815,6 +815,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
815 | public event ObjectOwner OnObjectOwner; | 815 | public event ObjectOwner OnObjectOwner; |
816 | public event DirPlacesQuery OnDirPlacesQuery; | 816 | public event DirPlacesQuery OnDirPlacesQuery; |
817 | public event DirFindQuery OnDirFindQuery; | 817 | public event DirFindQuery OnDirFindQuery; |
818 | public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy; | ||
818 | public event DirLandQuery OnDirLandQuery; | 819 | public event DirLandQuery OnDirLandQuery; |
819 | public event DirPopularQuery OnDirPopularQuery; | 820 | public event DirPopularQuery OnDirPopularQuery; |
820 | public event DirClassifiedQuery OnDirClassifiedQuery; | 821 | public event DirClassifiedQuery OnDirClassifiedQuery; |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 23255fb..d6f4d53 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -156,7 +156,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
156 | #pragma warning disable 67 | 156 | #pragma warning disable 67 |
157 | public event Action<IClientAPI> OnLogout; | 157 | public event Action<IClientAPI> OnLogout; |
158 | public event ObjectPermissions OnObjectPermissions; | 158 | public event ObjectPermissions OnObjectPermissions; |
159 | 159 | public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy; | |
160 | public event MoneyTransferRequest OnMoneyTransferRequest; | 160 | public event MoneyTransferRequest OnMoneyTransferRequest; |
161 | public event ParcelBuy OnParcelBuy; | 161 | public event ParcelBuy OnParcelBuy; |
162 | public event Action<IClientAPI> OnConnectionClosed; | 162 | public event Action<IClientAPI> OnConnectionClosed; |
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 2993b46..1e4bc2a 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Tests.Common.Mock | |||
65 | public event MoneyTransferRequest OnMoneyTransferRequest; | 65 | public event MoneyTransferRequest OnMoneyTransferRequest; |
66 | public event ParcelBuy OnParcelBuy; | 66 | public event ParcelBuy OnParcelBuy; |
67 | public event Action<IClientAPI> OnConnectionClosed; | 67 | public event Action<IClientAPI> OnConnectionClosed; |
68 | 68 | public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy; | |
69 | public event ImprovedInstantMessage OnInstantMessage; | 69 | public event ImprovedInstantMessage OnInstantMessage; |
70 | public event ChatMessage OnChatFromClient; | 70 | public event ChatMessage OnChatFromClient; |
71 | public event TextureRequest OnRequestTexture; | 71 | public event TextureRequest OnRequestTexture; |