Disable code to get server-side to move given items to a destination folder on TaskInventoryAccepted.
This is because the fixes to inventory versioning (so that they better match viewer expections) now appear to allow the viewer to execute #RLV moves, as happens on the LL grid. Doing it again server-side now wrongly creates another child #RLV folder underneath the root one. As per http://opensimulator.org/mantis/view.php?id=6311integration
parent
48577af325
commit
f605a62427
|
@ -298,73 +298,76 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~<name>
|
// Disabled for now as it looks like http://opensimulator.org/mantis/view.php?id=6311 was fixed by fixes
|
||||||
// to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis
|
// to inventory folder versioning allowing the viewer to move the received folder itself as happens on the
|
||||||
// of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously
|
// LL grid. Doing it again server-side then wrongly does a second create and move
|
||||||
// done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here.
|
// // XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~<name>
|
||||||
else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
|
// // to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis
|
||||||
{
|
// // of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously
|
||||||
UUID destinationFolderID = UUID.Zero;
|
// // done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here.
|
||||||
|
// else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
|
||||||
if (im.binaryBucket != null && im.binaryBucket.Length >= 16)
|
// {
|
||||||
{
|
// UUID destinationFolderID = UUID.Zero;
|
||||||
destinationFolderID = new UUID(im.binaryBucket, 0);
|
//
|
||||||
}
|
// if (im.binaryBucket != null && im.binaryBucket.Length >= 16)
|
||||||
|
// {
|
||||||
if (destinationFolderID != UUID.Zero)
|
// destinationFolderID = new UUID(im.binaryBucket, 0);
|
||||||
{
|
// }
|
||||||
InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId);
|
//
|
||||||
if (destinationFolder == null)
|
// if (destinationFolderID != UUID.Zero)
|
||||||
{
|
// {
|
||||||
m_log.WarnFormat(
|
// InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId);
|
||||||
"[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist",
|
// if (destinationFolder == null)
|
||||||
client.Name, scene.Name, destinationFolderID);
|
// {
|
||||||
|
// m_log.WarnFormat(
|
||||||
return;
|
// "[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist",
|
||||||
}
|
// client.Name, scene.Name, destinationFolderID);
|
||||||
|
//
|
||||||
IInventoryService invService = scene.InventoryService;
|
// return;
|
||||||
|
// }
|
||||||
UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip
|
//
|
||||||
|
// IInventoryService invService = scene.InventoryService;
|
||||||
InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId);
|
//
|
||||||
item = invService.GetItem(item);
|
// UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip
|
||||||
InventoryFolderBase folder = null;
|
//
|
||||||
UUID? previousParentFolderID = null;
|
// InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId);
|
||||||
|
// item = invService.GetItem(item);
|
||||||
if (item != null) // It's an item
|
// InventoryFolderBase folder = null;
|
||||||
{
|
// UUID? previousParentFolderID = null;
|
||||||
previousParentFolderID = item.Folder;
|
//
|
||||||
item.Folder = destinationFolderID;
|
// if (item != null) // It's an item
|
||||||
|
// {
|
||||||
invService.DeleteItems(item.Owner, new List<UUID>() { item.ID });
|
// previousParentFolderID = item.Folder;
|
||||||
scene.AddInventoryItem(client, item);
|
// item.Folder = destinationFolderID;
|
||||||
}
|
//
|
||||||
else
|
// invService.DeleteItems(item.Owner, new List<UUID>() { item.ID });
|
||||||
{
|
// scene.AddInventoryItem(client, item);
|
||||||
folder = new InventoryFolderBase(inventoryID, client.AgentId);
|
// }
|
||||||
folder = invService.GetFolder(folder);
|
// else
|
||||||
|
// {
|
||||||
if (folder != null) // It's a folder
|
// folder = new InventoryFolderBase(inventoryID, client.AgentId);
|
||||||
{
|
// folder = invService.GetFolder(folder);
|
||||||
previousParentFolderID = folder.ParentID;
|
//
|
||||||
folder.ParentID = destinationFolderID;
|
// if (folder != null) // It's a folder
|
||||||
invService.MoveFolder(folder);
|
// {
|
||||||
}
|
// previousParentFolderID = folder.ParentID;
|
||||||
}
|
// folder.ParentID = destinationFolderID;
|
||||||
|
// invService.MoveFolder(folder);
|
||||||
// Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code).
|
// }
|
||||||
if (previousParentFolderID != null)
|
// }
|
||||||
{
|
//
|
||||||
InventoryFolderBase previousParentFolder
|
// // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code).
|
||||||
= new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId);
|
// if (previousParentFolderID != null)
|
||||||
previousParentFolder = invService.GetFolder(previousParentFolder);
|
// {
|
||||||
scene.SendInventoryUpdate(client, previousParentFolder, true, true);
|
// InventoryFolderBase previousParentFolder
|
||||||
|
// = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId);
|
||||||
scene.SendInventoryUpdate(client, destinationFolder, true, true);
|
// previousParentFolder = invService.GetFolder(previousParentFolder);
|
||||||
}
|
// scene.SendInventoryUpdate(client, previousParentFolder, true, true);
|
||||||
}
|
//
|
||||||
}
|
// scene.SendInventoryUpdate(client, destinationFolder, true, true);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
else if (
|
else if (
|
||||||
im.dialog == (byte)InstantMessageDialog.InventoryDeclined
|
im.dialog == (byte)InstantMessageDialog.InventoryDeclined
|
||||||
|| im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined)
|
|| im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined)
|
||||||
|
|
Loading…
Reference in New Issue