mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Continuing refactor. Refactor DeRezObject to deal with multiple objects
This commit is contained in:
@@ -119,9 +119,22 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
///
|
||||
/// DeleteToInventory
|
||||
///
|
||||
public override UUID DeleteToInventory(DeRezAction action, UUID folderID, SceneObjectGroup objectGroup, IClientAPI remoteClient)
|
||||
public override UUID DeleteToInventory(DeRezAction action, UUID folderID, List<SceneObjectGroup> objectGroups, IClientAPI remoteClient)
|
||||
{
|
||||
UUID assetID = base.DeleteToInventory(action, folderID, objectGroup, remoteClient);
|
||||
UUID ret = UUID.Zero;
|
||||
|
||||
// HACK: Only works for lists of length one.
|
||||
// Intermediate version, just to make things compile
|
||||
foreach (SceneObjectGroup g in objectGroups)
|
||||
ret = DeleteToInventory(action, folderID, g, remoteClient);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
|
||||
SceneObjectGroup objectGroup, IClientAPI remoteClient)
|
||||
{
|
||||
UUID assetID = base.DeleteToInventory(action, folderID, new List<SceneObjectGroup>() {objectGroup}, remoteClient);
|
||||
|
||||
if (!assetID.Equals(UUID.Zero))
|
||||
{
|
||||
|
||||
@@ -188,6 +188,20 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
/// <param name="folderID"></param>
|
||||
/// <param name="objectGroup"></param>
|
||||
/// <param name="remoteClient"> </param>
|
||||
public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
|
||||
List<SceneObjectGroup> objectGroups, IClientAPI remoteClient)
|
||||
{
|
||||
// HACK: This is only working for lists containing a single item!
|
||||
// It's just a hack to make this WIP compile and run. Nothing
|
||||
// currently calls this with multiple items.
|
||||
UUID ret = UUID.Zero;
|
||||
|
||||
foreach (SceneObjectGroup g in objectGroups)
|
||||
ret = DeleteToInventory(action, folderID, g, remoteClient);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
|
||||
SceneObjectGroup objectGroup, IClientAPI remoteClient)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user