From ec8c93aa5e1d0af2c0adf38156b05e85421f4a81 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 4 Dec 2011 12:35:01 +0100 Subject: Implement ChangeInventoryItemFlagsPacket handling --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 3186dff..effa8d0 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -286,6 +286,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; public event SimWideDeletesDelegate OnSimWideDeletes; public event SendPostcard OnSendPostcard; + public event ChangeInventoryItemFlags OnChangeInventoryItemFlags; public event MuteListEntryUpdate OnUpdateMuteListEntry; public event MuteListEntryRemove OnRemoveMuteListEntry; public event GodlikeMessage onGodlikeMessage; @@ -5344,6 +5345,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP AddLocalPacketHandler(PacketType.GroupVoteHistoryRequest, HandleGroupVoteHistoryRequest); AddLocalPacketHandler(PacketType.SimWideDeletes, HandleSimWideDeletes); AddLocalPacketHandler(PacketType.SendPostcard, HandleSendPostcard); + AddLocalPacketHandler(PacketType.ChangeInventoryItemFlags, HandleChangeInventoryItemFlags); AddGenericPacketHandler("autopilot", HandleAutopilot); } @@ -9822,6 +9824,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP return false; } + private bool HandleChangeInventoryItemFlags(IClientAPI client, Packet packet) + { + ChangeInventoryItemFlagsPacket ChangeInventoryItemFlags = + (ChangeInventoryItemFlagsPacket)packet; + ChangeInventoryItemFlags handlerChangeInventoryItemFlags = OnChangeInventoryItemFlags; + if (handlerChangeInventoryItemFlags != null) + { + foreach(ChangeInventoryItemFlagsPacket.InventoryDataBlock b in ChangeInventoryItemFlags.InventoryData) + handlerChangeInventoryItemFlags(this, b.ItemID, b.Flags); + return true; + } + return false; + } + private bool HandleUseCircuitCode(IClientAPI sender, Packet Pack) { return true; -- cgit v1.1