From d9a8ecf238344374274b2d5dcc7c4efa3ecd0c11 Mon Sep 17 00:00:00 2001 From: MW Date: Sun, 12 Jul 2009 12:32:39 +0000 Subject: Changed the DeRezObject event so it passes a list of localIDs in one event trigger rather than triggering the event once for every localid in the derez packet. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 8 ++++++-- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 74a8874..3fdb386 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -5065,16 +5065,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP handlerDeRezObject = OnDeRezObject; if (handlerDeRezObject != null) { + List deRezIDs = new List(); + foreach (DeRezObjectPacket.ObjectDataBlock data in DeRezPacket.ObjectData) { + deRezIDs.Add(data.ObjectLocalID); + } // It just so happens that the values on the DeRezAction enumerator match the Destination // values given by a Second Life client - handlerDeRezObject(this, data.ObjectLocalID, + handlerDeRezObject(this, deRezIDs, DeRezPacket.AgentBlock.GroupID, (DeRezAction)DeRezPacket.AgentBlock.Destination, DeRezPacket.AgentBlock.DestinationID); - } + } break; diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index f65f834..3fe879a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1684,6 +1684,23 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Called when one or more objects are removed from the environment into inventory. + /// + /// + /// + /// + /// + /// + public virtual void DeRezObject(IClientAPI remoteClient, List localIDs, + UUID groupID, DeRezAction action, UUID destinationID) + { + foreach (uint localID in localIDs) + { + DeRezObject(remoteClient, localID, groupID, action, destinationID); + } + } + /// /// Called when an object is removed from the environment into inventory. /// -- cgit v1.1