Add a corresponding method for items. HG v2

0.7.3-extended
Melanie 2012-03-28 02:10:07 +01:00 committed by Justin Clark-Casey (justincc)
parent de7e0d7e52
commit ccd7d35b3f
2 changed files with 39 additions and 0 deletions

View File

@ -33,5 +33,6 @@ namespace OpenSim.Framework.Client
public interface IClientInventory public interface IClientInventory
{ {
void SendRemoveInventoryFolders(UUID[] folders); void SendRemoveInventoryFolders(UUID[] folders);
void SendRemoveInventoryItems(UUID[] folders);
} }
} }

View File

@ -12293,6 +12293,44 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(reply, ThrottleOutPacketType.Task); OutPacket(reply, ThrottleOutPacketType.Task);
} }
public void SendRemoveInventoryItems(UUID[] items)
{
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
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) public void SendRemoveInventoryFolders(UUID[] folders)
{ {
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();