Continuing refactor. Refactor DeRezObject to deal with multiple objects

This commit is contained in:
Melanie Thielker
2010-06-01 02:27:30 +02:00
parent f57f2370f1
commit bf233ea0dc
5 changed files with 122 additions and 75 deletions

View File

@@ -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))
{

View File

@@ -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)
{