From accd89b3f1c7729e6bb34b52e8095baf9c1f440a Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Sat, 26 Apr 2008 20:31:01 +0000 Subject: * First draft implementation of copying prim inventory items back to agent inventory * Now, if you own an item in a prim, you should be able to successfully drag it back into your inventory * Temporarily, users which are not owners of the item cannot copy it, even if 'everyone can copy' is set * This is pending fixes/implementation of upstream permission implementation --- OpenSim/Region/ClientStack/ClientView.cs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index db0b2cd..35b248a 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -196,6 +196,7 @@ namespace OpenSim.Region.ClientStack private RemoveInventoryFolder handlerRemoveInventoryFolder = null; private RequestTaskInventory handlerRequestTaskInventory = null; //OnRequestTaskInventory; private UpdateTaskInventory handlerUpdateTaskInventory = null; //OnUpdateTaskInventory; + private MoveTaskInventory handlerMoveTaskItem = null; private RemoveTaskInventory handlerRemoveTaskItem = null; //OnRemoveTaskItem; private RezScript handlerRezScript = null; //OnRezScript; private RequestMapBlocks handlerRequestMapBlocks = null; //OnRequestMapBlocks; @@ -762,6 +763,7 @@ namespace OpenSim.Region.ClientStack public event ConfirmXfer OnConfirmXfer; public event RezScript OnRezScript; public event UpdateTaskInventory OnUpdateTaskInventory; + public event MoveTaskInventory OnMoveTaskItem; public event RemoveTaskInventory OnRemoveTaskItem; public event RequestAsset OnRequestAsset; @@ -4250,8 +4252,11 @@ namespace OpenSim.Region.ClientStack } } } + break; + case PacketType.RemoveTaskInventory: + RemoveTaskInventoryPacket removeTask = (RemoveTaskInventoryPacket)Pack; handlerRemoveTaskItem = OnRemoveTaskItem; @@ -4260,11 +4265,27 @@ namespace OpenSim.Region.ClientStack { handlerRemoveTaskItem(this, removeTask.InventoryData.ItemID, removeTask.InventoryData.LocalID); } + break; + case PacketType.MoveTaskInventory: - m_log.Warn("[CLIENT]: unhandled MoveTaskInventory packet"); + + MoveTaskInventoryPacket moveTaskInventoryPacket = (MoveTaskInventoryPacket)Pack; + + handlerMoveTaskItem = OnMoveTaskItem; + + if (handlerMoveTaskItem != null) + { + handlerMoveTaskItem( + this, moveTaskInventoryPacket.AgentData.FolderID, + moveTaskInventoryPacket.InventoryData.LocalID, + moveTaskInventoryPacket.InventoryData.ItemID); + } + break; + case PacketType.RezScript: + //Console.WriteLine(Pack.ToString()); RezScriptPacket rezScriptx = (RezScriptPacket)Pack; @@ -4275,6 +4296,7 @@ namespace OpenSim.Region.ClientStack handlerRezScript(this, rezScriptx.InventoryBlock.ItemID, rezScriptx.UpdateBlock.ObjectLocalID); } break; + case PacketType.MapLayerRequest: RequestMapLayer(); break; -- cgit v1.1