diff --git a/OpenSim/Framework/Client/IClientInventory.cs b/OpenSim/Framework/Client/IClientInventory.cs index 00651e0917..d59f8b7151 100644 --- a/OpenSim/Framework/Client/IClientInventory.cs +++ b/OpenSim/Framework/Client/IClientInventory.cs @@ -33,5 +33,6 @@ namespace OpenSim.Framework.Client public interface IClientInventory { void SendRemoveInventoryFolders(UUID[] folders); + void SendRemoveInventoryItems(UUID[] folders); } } diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 7ba9eaf0fd..0c1d7f2677 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -12264,6 +12264,44 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(reply, ThrottleOutPacketType.Task); } + public void SendRemoveInventoryItems(UUID[] items) + { + IEventQueue eq = Scene.RequestModuleInterface(); + + if (eq == null) + { + m_log.DebugFormat("[LLCLIENT]: Null event queue"); + return; + } + + OSDMap llsd = new OSDMap(3); + + OSDMap AgentDataMap = new OSDMap(1); + AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId)); + AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId)); + + OSDArray AgentData = new OSDArray(1); + AgentData.Add(AgentDataMap); + + llsd.Add("AgentData", AgentData); + + OSDArray ItemData = new OSDArray(); + + foreach (UUID item in items) + { + OSDMap ItemDataMap = new OSDMap(2); + ItemDataMap.Add("ItemID", OSD.FromUUID(item)); + ItemDataMap.Add("AgentID", OSD.FromUUID(AgentId)); + + ItemData.Add(ItemDataMap); + } + + llsd.Add("ItemData", ItemData); + + eq.Enqueue(BuildEvent("RemoveInventoryItem", + llsd), AgentId); + } + public void SendRemoveInventoryFolders(UUID[] folders) { IEventQueue eq = Scene.RequestModuleInterface();