From e77c919290e166f19e77f3ef040418dd39f2f5bd Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Mon, 3 Oct 2011 11:55:54 -0700 Subject: Remove usage of Linden packet types from inside Attachments Module and interface --- OpenSim/Framework/IClientAPI.cs | 3 +-- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 7 ++++--- .../Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 9 ++++----- OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | 4 ++-- 4 files changed, 11 insertions(+), 12 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 47e79d1..d8ccc89 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -53,8 +53,7 @@ namespace OpenSim.Framework public delegate ISceneEntity RezSingleAttachmentFromInv(IClientAPI remoteClient, UUID itemID, uint AttachmentPt); - public delegate void RezMultipleAttachmentsFromInv(IClientAPI remoteClient, RezMultipleAttachmentsFromInvPacket.HeaderDataBlock header, - RezMultipleAttachmentsFromInvPacket.ObjectDataBlock[] objects); + public delegate void RezMultipleAttachmentsFromInv(IClientAPI remoteClient, List> rezlist ); public delegate void ObjectAttach( IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent); diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index ce2ff86..29dce17 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -6079,9 +6079,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP RezMultipleAttachmentsFromInv handlerRezMultipleAttachments = OnRezMultipleAttachmentsFromInv; if (handlerRezMultipleAttachments != null) { - RezMultipleAttachmentsFromInvPacket rez = (RezMultipleAttachmentsFromInvPacket)Pack; - handlerRezMultipleAttachments(this, rez.HeaderData, - rez.ObjectData); + List> rezlist = new List>(); + foreach (RezMultipleAttachmentsFromInvPacket.ObjectDataBlock obj in ((RezMultipleAttachmentsFromInvPacket)Pack).ObjectData) + rezlist.Add(new KeyValuePair(obj.ItemID, obj.AttachmentPt)); + handlerRezMultipleAttachments(this, rezlist); } return true; diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 8757251..48695a4 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -360,8 +360,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments public void RezMultipleAttachmentsFromInventory( IClientAPI remoteClient, - RezMultipleAttachmentsFromInvPacket.HeaderDataBlock header, - RezMultipleAttachmentsFromInvPacket.ObjectDataBlock[] objects) + List> rezlist) { if (!Enabled) return; @@ -380,9 +379,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments { // m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing multiple attachments from inventory for {0}", sp.Name); - foreach (RezMultipleAttachmentsFromInvPacket.ObjectDataBlock obj in objects) + foreach (KeyValuePair rez in rezlist) { - RezSingleAttachmentFromInventory(sp, obj.ItemID, obj.AttachmentPt); + RezSingleAttachmentFromInventory(sp, rez.Key, rez.Value); } } } @@ -941,4 +940,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments return item; } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs index 5ffbec8..8d3366c 100644 --- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs @@ -26,6 +26,7 @@ */ using System; +using System.Collections.Generic; using OpenMetaverse; using OpenMetaverse.Packets; using OpenSim.Framework; @@ -104,8 +105,7 @@ namespace OpenSim.Region.Framework.Interfaces /// void RezMultipleAttachmentsFromInventory( IClientAPI remoteClient, - RezMultipleAttachmentsFromInvPacket.HeaderDataBlock header, - RezMultipleAttachmentsFromInvPacket.ObjectDataBlock[] objects); + List> rezlist); /// /// Detach an object from the avatar. -- cgit v1.1