mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Added MoveItems, which is most useful upon viewer-delete inventory operation. Moving a batch of items is a 1-time operation. Made it async anyway, so that the viewer doesn't wait in case the DB layer is dumb (which is the case currently).
This commit is contained in:
@@ -7027,14 +7027,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
if (OnMoveInventoryItem != null)
|
||||
{
|
||||
handlerMoveInventoryItem = null;
|
||||
InventoryItemBase itm = null;
|
||||
List<InventoryItemBase> items = new List<InventoryItemBase>();
|
||||
foreach (MoveInventoryItemPacket.InventoryDataBlock datablock in moveitem.InventoryData)
|
||||
{
|
||||
handlerMoveInventoryItem = OnMoveInventoryItem;
|
||||
if (handlerMoveInventoryItem != null)
|
||||
{
|
||||
handlerMoveInventoryItem(this, datablock.FolderID, datablock.ItemID, datablock.Length,
|
||||
Util.FieldToString(datablock.NewName));
|
||||
}
|
||||
itm = new InventoryItemBase(datablock.ItemID, AgentId);
|
||||
itm.Folder = datablock.FolderID;
|
||||
itm.Name = Util.FieldToString(datablock.NewName);
|
||||
// weird, comes out as empty string
|
||||
//m_log.DebugFormat("[XXX] new name: {0}", itm.Name);
|
||||
items.Add(itm);
|
||||
}
|
||||
handlerMoveInventoryItem = OnMoveInventoryItem;
|
||||
if (handlerMoveInventoryItem != null)
|
||||
{
|
||||
handlerMoveInventoryItem(this, items);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user