From 1ac57290ae0fd962f0af28cc9b84405162a99799 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Sat, 22 Dec 2007 02:52:35 +0000
Subject: Initial hookup of update task inventory event. No functionality yet.
---
.../Region/Environment/Scenes/Scene.Inventory.cs | 53 +++++++++++++++++++++-
OpenSim/Region/Environment/Scenes/Scene.cs | 4 +-
2 files changed, 54 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 753d0cf..ceaadc2 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -357,7 +357,7 @@ namespace OpenSim.Region.Environment.Scenes
}
///
- ///
+ /// Request a prim (task) inventory
///
///
///
@@ -375,8 +375,19 @@ namespace OpenSim.Region.Environment.Scenes
}
}
}
+ else
+ {
+ MainLog.Instance.Warn(
+ "PRIMINVENTORY", "Inventory requested of prim {0} which doesn't exist", primLocalID);
+ }
}
+ ///
+ /// Remove an item from a prim (task) inventory
+ ///
+ ///
+ ///
+ ///
public void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID)
{
SceneObjectGroup group = GetGroupByPrim(localID);
@@ -389,6 +400,44 @@ namespace OpenSim.Region.Environment.Scenes
EventManager.TriggerRemoveScript(localID, itemID);
}
}
+ else
+ {
+ MainLog.Instance.Warn(
+ "PRIMINVENTORY",
+ "Removal of item {0} requested of prim {1} but this prim does not exist",
+ itemID,
+ localID);
+ }
+ }
+
+ ///
+ /// Update an item in a prim (task) inventory
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID,
+ uint primLocalID)
+ {
+ SceneObjectGroup group = GetGroupByPrim(primLocalID);
+ if (group != null)
+ {
+ // TODO Retrieve itemID from client's inventory to pass on
+ //group.AddInventoryItem(rmoteClient, primLocalID, null);
+ MainLog.Instance.Verbose(
+ "PRIMINVENTORY",
+ "UpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}",
+ itemID, folderID, primLocalID);
+ }
+ else
+ {
+ MainLog.Instance.Warn(
+ "PRIMINVENTORY",
+ "Update with item {0} requested of prim {1} but this prim does not exist",
+ itemID,
+ primLocalID);
+ }
}
public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID)
@@ -430,7 +479,7 @@ namespace OpenSim.Region.Environment.Scenes
if (group != null)
{
// TODO: do we care about the value of this bool?
- bool added = group.AddInventoryItem(remoteClient, localID, item, copyID);
+ group.AddInventoryItem(remoteClient, localID, item, copyID);
group.GetProperites(remoteClient);
}
}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index c4b409f..79803a5 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1149,7 +1149,6 @@ namespace OpenSim.Region.Environment.Scenes
client.OnMoveInventoryFolder += CommsManager.UserProfileCacheService.HandleMoveInventoryFolder;
client.OnFetchInventoryDescendents += CommsManager.UserProfileCacheService.HandleFetchInventoryDescendents;
client.OnPurgeInventoryDescendents += CommsManager.UserProfileCacheService.HandlePurgeInventoryDescendents;
- client.OnRequestTaskInventory += RequestTaskInventory;
client.OnFetchInventory += CommsManager.UserProfileCacheService.HandleFetchInventory;
client.OnUpdateInventoryItem += UpdateInventoryItemAsset;
client.OnCopyInventoryItem += CopyInventoryItem;
@@ -1157,7 +1156,10 @@ namespace OpenSim.Region.Environment.Scenes
client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest;
client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer;
client.OnRezScript += RezScript;
+
+ client.OnRequestTaskInventory += RequestTaskInventory;
client.OnRemoveTaskItem += RemoveTaskInventory;
+ client.OnUpdateTaskInventory += UpdateTaskInventory;
client.OnGrabObject += ProcessObjectGrab;
client.OnAvatarPickerRequest += ProcessAvatarPickerRequest;
--
cgit v1.1