Changed the DeRezObject event so it passes a list<uint> of localIDs in one event trigger rather than triggering the event once for every localid in the derez packet.
parent
71ab7a1e2d
commit
d9a8ecf238
|
@ -99,7 +99,7 @@ namespace OpenSim.Framework
|
|||
public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
|
||||
|
||||
public delegate void DeRezObject(
|
||||
IClientAPI remoteClient, uint localID, UUID groupID, DeRezAction action, UUID destinationID);
|
||||
IClientAPI remoteClient, List<uint> localIDs, UUID groupID, DeRezAction action, UUID destinationID);
|
||||
|
||||
public delegate void GenericCall5(IClientAPI remoteClient, bool status);
|
||||
|
||||
|
|
|
@ -5065,16 +5065,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
handlerDeRezObject = OnDeRezObject;
|
||||
if (handlerDeRezObject != null)
|
||||
{
|
||||
List<uint> deRezIDs = new List<uint>();
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -1684,6 +1684,23 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when one or more objects are removed from the environment into inventory.
|
||||
/// </summary>
|
||||
/// <param name="remoteClient"></param>
|
||||
/// <param name="localID"></param>
|
||||
/// <param name="groupID"></param>
|
||||
/// <param name="action"></param>
|
||||
/// <param name="destinationID"></param>
|
||||
public virtual void DeRezObject(IClientAPI remoteClient, List<uint> localIDs,
|
||||
UUID groupID, DeRezAction action, UUID destinationID)
|
||||
{
|
||||
foreach (uint localID in localIDs)
|
||||
{
|
||||
DeRezObject(remoteClient, localID, groupID, action, destinationID);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when an object is removed from the environment into inventory.
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue