aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorJustin Clarke Casey2007-12-22 02:52:35 +0000
committerJustin Clarke Casey2007-12-22 02:52:35 +0000
commit1ac57290ae0fd962f0af28cc9b84405162a99799 (patch)
tree68fe0c8ea5650fd90fbf41064cdb145c96c2ffff /OpenSim/Region/Environment/Scenes
parent*Fixed logic issue in LandManager that caused an 'invalid parcel' error to sp... (diff)
downloadopensim-SC-1ac57290ae0fd962f0af28cc9b84405162a99799.zip
opensim-SC-1ac57290ae0fd962f0af28cc9b84405162a99799.tar.gz
opensim-SC-1ac57290ae0fd962f0af28cc9b84405162a99799.tar.bz2
opensim-SC-1ac57290ae0fd962f0af28cc9b84405162a99799.tar.xz
Initial hookup of update task inventory event. No functionality yet.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs53
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs4
2 files changed, 54 insertions, 3 deletions
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
357 } 357 }
358 358
359 /// <summary> 359 /// <summary>
360 /// 360 /// Request a prim (task) inventory
361 /// </summary> 361 /// </summary>
362 /// <param name="remoteClient"></param> 362 /// <param name="remoteClient"></param>
363 /// <param name="primLocalID"></param> 363 /// <param name="primLocalID"></param>
@@ -375,8 +375,19 @@ namespace OpenSim.Region.Environment.Scenes
375 } 375 }
376 } 376 }
377 } 377 }
378 else
379 {
380 MainLog.Instance.Warn(
381 "PRIMINVENTORY", "Inventory requested of prim {0} which doesn't exist", primLocalID);
382 }
378 } 383 }
379 384
385 /// <summary>
386 /// Remove an item from a prim (task) inventory
387 /// </summary>
388 /// <param name="remoteClient"></param>
389 /// <param name="itemID"></param>
390 /// <param name="localID"></param>
380 public void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID) 391 public void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID)
381 { 392 {
382 SceneObjectGroup group = GetGroupByPrim(localID); 393 SceneObjectGroup group = GetGroupByPrim(localID);
@@ -389,6 +400,44 @@ namespace OpenSim.Region.Environment.Scenes
389 EventManager.TriggerRemoveScript(localID, itemID); 400 EventManager.TriggerRemoveScript(localID, itemID);
390 } 401 }
391 } 402 }
403 else
404 {
405 MainLog.Instance.Warn(
406 "PRIMINVENTORY",
407 "Removal of item {0} requested of prim {1} but this prim does not exist",
408 itemID,
409 localID);
410 }
411 }
412
413 /// <summary>
414 /// Update an item in a prim (task) inventory
415 /// </summary>
416 /// <param name="remoteClient"></param>
417 /// <param name="itemID"></param>
418 /// <param name="folderID"></param>
419 /// <param name="primLocalID"></param>
420 public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID,
421 uint primLocalID)
422 {
423 SceneObjectGroup group = GetGroupByPrim(primLocalID);
424 if (group != null)
425 {
426 // TODO Retrieve itemID from client's inventory to pass on
427 //group.AddInventoryItem(rmoteClient, primLocalID, null);
428 MainLog.Instance.Verbose(
429 "PRIMINVENTORY",
430 "UpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}",
431 itemID, folderID, primLocalID);
432 }
433 else
434 {
435 MainLog.Instance.Warn(
436 "PRIMINVENTORY",
437 "Update with item {0} requested of prim {1} but this prim does not exist",
438 itemID,
439 primLocalID);
440 }
392 } 441 }
393 442
394 public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID) 443 public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID)
@@ -430,7 +479,7 @@ namespace OpenSim.Region.Environment.Scenes
430 if (group != null) 479 if (group != null)
431 { 480 {
432 // TODO: do we care about the value of this bool? 481 // TODO: do we care about the value of this bool?
433 bool added = group.AddInventoryItem(remoteClient, localID, item, copyID); 482 group.AddInventoryItem(remoteClient, localID, item, copyID);
434 group.GetProperites(remoteClient); 483 group.GetProperites(remoteClient);
435 } 484 }
436 } 485 }
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
1149 client.OnMoveInventoryFolder += CommsManager.UserProfileCacheService.HandleMoveInventoryFolder; 1149 client.OnMoveInventoryFolder += CommsManager.UserProfileCacheService.HandleMoveInventoryFolder;
1150 client.OnFetchInventoryDescendents += CommsManager.UserProfileCacheService.HandleFetchInventoryDescendents; 1150 client.OnFetchInventoryDescendents += CommsManager.UserProfileCacheService.HandleFetchInventoryDescendents;
1151 client.OnPurgeInventoryDescendents += CommsManager.UserProfileCacheService.HandlePurgeInventoryDescendents; 1151 client.OnPurgeInventoryDescendents += CommsManager.UserProfileCacheService.HandlePurgeInventoryDescendents;
1152 client.OnRequestTaskInventory += RequestTaskInventory;
1153 client.OnFetchInventory += CommsManager.UserProfileCacheService.HandleFetchInventory; 1152 client.OnFetchInventory += CommsManager.UserProfileCacheService.HandleFetchInventory;
1154 client.OnUpdateInventoryItem += UpdateInventoryItemAsset; 1153 client.OnUpdateInventoryItem += UpdateInventoryItemAsset;
1155 client.OnCopyInventoryItem += CopyInventoryItem; 1154 client.OnCopyInventoryItem += CopyInventoryItem;
@@ -1157,7 +1156,10 @@ namespace OpenSim.Region.Environment.Scenes
1157 client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest; 1156 client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest;
1158 client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer; 1157 client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer;
1159 client.OnRezScript += RezScript; 1158 client.OnRezScript += RezScript;
1159
1160 client.OnRequestTaskInventory += RequestTaskInventory;
1160 client.OnRemoveTaskItem += RemoveTaskInventory; 1161 client.OnRemoveTaskItem += RemoveTaskInventory;
1162 client.OnUpdateTaskInventory += UpdateTaskInventory;
1161 1163
1162 client.OnGrabObject += ProcessObjectGrab; 1164 client.OnGrabObject += ProcessObjectGrab;
1163 client.OnAvatarPickerRequest += ProcessAvatarPickerRequest; 1165 client.OnAvatarPickerRequest += ProcessAvatarPickerRequest;