diff options
author | Diva Canto | 2009-08-19 10:56:08 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-19 10:56:08 -0700 |
commit | d519f1885f587409592cf92bc0f4ba8533a1866f (patch) | |
tree | dc8d0073d09050c8787121290b1e3a8f65119812 /OpenSim/Region/ClientStack/LindenUDP | |
parent | Async purge so that the client thread doesn't wait. (diff) | |
download | opensim-SC_OLD-d519f1885f587409592cf92bc0f4ba8533a1866f.zip opensim-SC_OLD-d519f1885f587409592cf92bc0f4ba8533a1866f.tar.gz opensim-SC_OLD-d519f1885f587409592cf92bc0f4ba8533a1866f.tar.bz2 opensim-SC_OLD-d519f1885f587409592cf92bc0f4ba8533a1866f.tar.xz |
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).
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index e2fb659..6969a3d 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -7027,14 +7027,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7027 | if (OnMoveInventoryItem != null) | 7027 | if (OnMoveInventoryItem != null) |
7028 | { | 7028 | { |
7029 | handlerMoveInventoryItem = null; | 7029 | handlerMoveInventoryItem = null; |
7030 | InventoryItemBase itm = null; | ||
7031 | List<InventoryItemBase> items = new List<InventoryItemBase>(); | ||
7030 | foreach (MoveInventoryItemPacket.InventoryDataBlock datablock in moveitem.InventoryData) | 7032 | foreach (MoveInventoryItemPacket.InventoryDataBlock datablock in moveitem.InventoryData) |
7031 | { | 7033 | { |
7032 | handlerMoveInventoryItem = OnMoveInventoryItem; | 7034 | itm = new InventoryItemBase(datablock.ItemID, AgentId); |
7033 | if (handlerMoveInventoryItem != null) | 7035 | itm.Folder = datablock.FolderID; |
7034 | { | 7036 | itm.Name = Util.FieldToString(datablock.NewName); |
7035 | handlerMoveInventoryItem(this, datablock.FolderID, datablock.ItemID, datablock.Length, | 7037 | // weird, comes out as empty string |
7036 | Util.FieldToString(datablock.NewName)); | 7038 | //m_log.DebugFormat("[XXX] new name: {0}", itm.Name); |
7037 | } | 7039 | items.Add(itm); |
7040 | } | ||
7041 | handlerMoveInventoryItem = OnMoveInventoryItem; | ||
7042 | if (handlerMoveInventoryItem != null) | ||
7043 | { | ||
7044 | handlerMoveInventoryItem(this, items); | ||
7038 | } | 7045 | } |
7039 | } | 7046 | } |
7040 | break; | 7047 | break; |