Implement ChangeInventoryItemFlagsPacket handling

avinationmerge
Melanie 2011-12-04 12:35:01 +01:00
parent 516c3dfbbb
commit ec8c93aa5e
5 changed files with 21 additions and 0 deletions

View File

@ -503,6 +503,7 @@ namespace OpenSim.Framework
public delegate void SimWideDeletesDelegate(IClientAPI client,UUID agentID, int flags, UUID targetID); public delegate void SimWideDeletesDelegate(IClientAPI client,UUID agentID, int flags, UUID targetID);
public delegate void SendPostcard(IClientAPI client); public delegate void SendPostcard(IClientAPI client);
public delegate void ChangeInventoryItemFlags(IClientAPI client, UUID itemID, uint flags);
#endregion #endregion
@ -1007,6 +1008,7 @@ namespace OpenSim.Framework
event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
event SimWideDeletesDelegate OnSimWideDeletes; event SimWideDeletesDelegate OnSimWideDeletes;
event SendPostcard OnSendPostcard; event SendPostcard OnSendPostcard;
event ChangeInventoryItemFlags OnChangeInventoryItemFlags;
event MuteListEntryUpdate OnUpdateMuteListEntry; event MuteListEntryUpdate OnUpdateMuteListEntry;
event MuteListEntryRemove OnRemoveMuteListEntry; event MuteListEntryRemove OnRemoveMuteListEntry;
event GodlikeMessage onGodlikeMessage; event GodlikeMessage onGodlikeMessage;

View File

@ -286,6 +286,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
public event SimWideDeletesDelegate OnSimWideDeletes; public event SimWideDeletesDelegate OnSimWideDeletes;
public event SendPostcard OnSendPostcard; public event SendPostcard OnSendPostcard;
public event ChangeInventoryItemFlags OnChangeInventoryItemFlags;
public event MuteListEntryUpdate OnUpdateMuteListEntry; public event MuteListEntryUpdate OnUpdateMuteListEntry;
public event MuteListEntryRemove OnRemoveMuteListEntry; public event MuteListEntryRemove OnRemoveMuteListEntry;
public event GodlikeMessage onGodlikeMessage; public event GodlikeMessage onGodlikeMessage;
@ -5344,6 +5345,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AddLocalPacketHandler(PacketType.GroupVoteHistoryRequest, HandleGroupVoteHistoryRequest); AddLocalPacketHandler(PacketType.GroupVoteHistoryRequest, HandleGroupVoteHistoryRequest);
AddLocalPacketHandler(PacketType.SimWideDeletes, HandleSimWideDeletes); AddLocalPacketHandler(PacketType.SimWideDeletes, HandleSimWideDeletes);
AddLocalPacketHandler(PacketType.SendPostcard, HandleSendPostcard); AddLocalPacketHandler(PacketType.SendPostcard, HandleSendPostcard);
AddLocalPacketHandler(PacketType.ChangeInventoryItemFlags, HandleChangeInventoryItemFlags);
AddGenericPacketHandler("autopilot", HandleAutopilot); AddGenericPacketHandler("autopilot", HandleAutopilot);
} }
@ -9822,6 +9824,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return false; 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) private bool HandleUseCircuitCode(IClientAPI sender, Packet Pack)
{ {
return true; return true;

View File

@ -860,6 +860,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
public event SimWideDeletesDelegate OnSimWideDeletes; public event SimWideDeletesDelegate OnSimWideDeletes;
public event SendPostcard OnSendPostcard; public event SendPostcard OnSendPostcard;
public event ChangeInventoryItemFlags OnChangeInventoryItemFlags;
public event MuteListEntryUpdate OnUpdateMuteListEntry; public event MuteListEntryUpdate OnUpdateMuteListEntry;
public event MuteListEntryRemove OnRemoveMuteListEntry; public event MuteListEntryRemove OnRemoveMuteListEntry;
public event GodlikeMessage onGodlikeMessage; public event GodlikeMessage onGodlikeMessage;

View File

@ -400,6 +400,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
public event SimWideDeletesDelegate OnSimWideDeletes; public event SimWideDeletesDelegate OnSimWideDeletes;
public event SendPostcard OnSendPostcard; public event SendPostcard OnSendPostcard;
public event ChangeInventoryItemFlags OnChangeInventoryItemFlags;
public event MuteListEntryUpdate OnUpdateMuteListEntry; public event MuteListEntryUpdate OnUpdateMuteListEntry;
public event MuteListEntryRemove OnRemoveMuteListEntry; public event MuteListEntryRemove OnRemoveMuteListEntry;
public event GodlikeMessage onGodlikeMessage; public event GodlikeMessage onGodlikeMessage;

View File

@ -312,6 +312,7 @@ namespace OpenSim.Tests.Common.Mock
public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
public event SimWideDeletesDelegate OnSimWideDeletes; public event SimWideDeletesDelegate OnSimWideDeletes;
public event SendPostcard OnSendPostcard; public event SendPostcard OnSendPostcard;
public event ChangeInventoryItemFlags OnChangeInventoryItemFlags;
public event MuteListEntryUpdate OnUpdateMuteListEntry; public event MuteListEntryUpdate OnUpdateMuteListEntry;
public event MuteListEntryRemove OnRemoveMuteListEntry; public event MuteListEntryRemove OnRemoveMuteListEntry;
public event GodlikeMessage onGodlikeMessage; public event GodlikeMessage onGodlikeMessage;