diff options
author | UbitUmarov | 2016-07-04 08:30:07 +0100 |
---|---|---|
committer | UbitUmarov | 2016-07-04 08:30:07 +0100 |
commit | 1d9e343b7ea5a8b36751fc334cd51b5573a1bb15 (patch) | |
tree | 628b676a51022801ad25c83c4ecfbd0a90d7977a /OpenSim/Region | |
parent | add OSSL osGetPhysicsEngineName(). this returns a string with name and versio... (diff) | |
parent | Merge branch 'master' of opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-1d9e343b7ea5a8b36751fc334cd51b5573a1bb15.zip opensim-SC_OLD-1d9e343b7ea5a8b36751fc334cd51b5573a1bb15.tar.gz opensim-SC_OLD-1d9e343b7ea5a8b36751fc334cd51b5573a1bb15.tar.bz2 opensim-SC_OLD-1d9e343b7ea5a8b36751fc334cd51b5573a1bb15.tar.xz |
Merge branch 'master' of opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
19 files changed, 72 insertions, 134 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 39ba708..19619c1 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -1386,7 +1386,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1386 | IClientAPI client = null; | 1386 | IClientAPI client = null; |
1387 | 1387 | ||
1388 | m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client); | 1388 | m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client); |
1389 | item = m_Scene.InventoryService.GetItem(new InventoryItemBase(itemID)); | 1389 | item = m_Scene.InventoryService.GetItem(m_HostCapsObj.AgentID, itemID); |
1390 | if (item != null) | 1390 | if (item != null) |
1391 | { | 1391 | { |
1392 | string message; | 1392 | string message; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 0cc630f..8f03a0a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -898,8 +898,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
898 | 898 | ||
899 | string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(grp, scriptedState); | 899 | string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(grp, scriptedState); |
900 | 900 | ||
901 | InventoryItemBase item = new InventoryItemBase(grp.FromItemID, sp.UUID); | 901 | InventoryItemBase item = m_scene.InventoryService.GetItem(sp.UUID, grp.FromItemID); |
902 | item = m_scene.InventoryService.GetItem(item); | ||
903 | 902 | ||
904 | if (item != null) | 903 | if (item != null) |
905 | { | 904 | { |
@@ -1223,8 +1222,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
1223 | return; | 1222 | return; |
1224 | } | 1223 | } |
1225 | 1224 | ||
1226 | InventoryItemBase item = new InventoryItemBase(itemID, sp.UUID); | 1225 | InventoryItemBase item = m_scene.InventoryService.GetItem(sp.UUID, itemID); |
1227 | item = m_scene.InventoryService.GetItem(item); | ||
1228 | if (item == null) | 1226 | if (item == null) |
1229 | return; | 1227 | return; |
1230 | 1228 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 10b2ff6..a83342c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | |||
@@ -219,7 +219,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
219 | // sp.Appearance.GetAttachpoint(attSo.FromItemID), | 219 | // sp.Appearance.GetAttachpoint(attSo.FromItemID), |
220 | // Is.EqualTo((int)AttachmentPoint.Chest)); | 220 | // Is.EqualTo((int)AttachmentPoint.Chest)); |
221 | 221 | ||
222 | InventoryItemBase attachmentItem = scene.InventoryService.GetItem(new InventoryItemBase(attSo.FromItemID)); | 222 | InventoryItemBase attachmentItem = scene.InventoryService.GetItem(sp.UUID, attSo.FromItemID); |
223 | Assert.That(attachmentItem, Is.Not.Null); | 223 | Assert.That(attachmentItem, Is.Not.Null); |
224 | Assert.That(attachmentItem.Name, Is.EqualTo(attName)); | 224 | Assert.That(attachmentItem.Name, Is.EqualTo(attName)); |
225 | 225 | ||
@@ -266,7 +266,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
266 | // sp.Appearance.GetAttachpoint(attSo.FromItemID), | 266 | // sp.Appearance.GetAttachpoint(attSo.FromItemID), |
267 | // Is.EqualTo((int)AttachmentPoint.LeftHand)); | 267 | // Is.EqualTo((int)AttachmentPoint.LeftHand)); |
268 | 268 | ||
269 | InventoryItemBase attachmentItem = scene.InventoryService.GetItem(new InventoryItemBase(attSo.FromItemID)); | 269 | InventoryItemBase attachmentItem = scene.InventoryService.GetItem(sp.UUID, attSo.FromItemID); |
270 | Assert.That(attachmentItem, Is.Not.Null); | 270 | Assert.That(attachmentItem, Is.Not.Null); |
271 | Assert.That(attachmentItem.Name, Is.EqualTo(so.Name)); | 271 | Assert.That(attachmentItem.Name, Is.EqualTo(so.Name)); |
272 | 272 | ||
@@ -299,7 +299,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
299 | // sp.Appearance.GetAttachpoint(attSo.FromItemID), | 299 | // sp.Appearance.GetAttachpoint(attSo.FromItemID), |
300 | // Is.EqualTo((int)AttachmentPoint.LeftHand)); | 300 | // Is.EqualTo((int)AttachmentPoint.LeftHand)); |
301 | 301 | ||
302 | InventoryItemBase attachmentItem = scene.InventoryService.GetItem(new InventoryItemBase(attSo.FromItemID)); | 302 | InventoryItemBase attachmentItem = scene.InventoryService.GetItem(sp.UUID, attSo.FromItemID); |
303 | Assert.That(attachmentItem, Is.Not.Null); | 303 | Assert.That(attachmentItem, Is.Not.Null); |
304 | Assert.That(attachmentItem.Name, Is.EqualTo(so2.Name)); | 304 | Assert.That(attachmentItem.Name, Is.EqualTo(so2.Name)); |
305 | 305 | ||
@@ -332,7 +332,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
332 | // sp.Appearance.GetAttachpoint(attSo.FromItemID), | 332 | // sp.Appearance.GetAttachpoint(attSo.FromItemID), |
333 | // Is.EqualTo((int)AttachmentPoint.LeftHand)); | 333 | // Is.EqualTo((int)AttachmentPoint.LeftHand)); |
334 | 334 | ||
335 | InventoryItemBase attachmentItem = scene.InventoryService.GetItem(new InventoryItemBase(attSo.FromItemID)); | 335 | InventoryItemBase attachmentItem = scene.InventoryService.GetItem(sp.UUID, attSo.FromItemID); |
336 | Assert.That(attachmentItem, Is.Not.Null); | 336 | Assert.That(attachmentItem, Is.Not.Null); |
337 | Assert.That(attachmentItem.Name, Is.EqualTo(so2.Name)); | 337 | Assert.That(attachmentItem.Name, Is.EqualTo(so2.Name)); |
338 | 338 | ||
@@ -600,7 +600,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
600 | // Assert.That(sp.Appearance.GetAttachments().Count, Is.EqualTo(0)); | 600 | // Assert.That(sp.Appearance.GetAttachments().Count, Is.EqualTo(0)); |
601 | 601 | ||
602 | // Check item status | 602 | // Check item status |
603 | Assert.That(scene.InventoryService.GetItem(new InventoryItemBase(attItem.ID)), Is.Null); | 603 | Assert.That(scene.InventoryService.GetItem(sp.UUID, attItem.ID), Is.Null); |
604 | 604 | ||
605 | // Check object in scene | 605 | // Check object in scene |
606 | SceneObjectGroup soInScene = scene.GetSceneObjectGroup("att"); | 606 | SceneObjectGroup soInScene = scene.GetSceneObjectGroup("att"); |
@@ -679,7 +679,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
679 | 679 | ||
680 | scene.AttachmentsModule.DetachSingleAttachmentToInv(sp, rezzedSo); | 680 | scene.AttachmentsModule.DetachSingleAttachmentToInv(sp, rezzedSo); |
681 | 681 | ||
682 | InventoryItemBase userItemUpdated = scene.InventoryService.GetItem(userItem); | 682 | InventoryItemBase userItemUpdated = scene.InventoryService.GetItem(userItem.Owner, userItem.ID); |
683 | AssetBase asset = scene.AssetService.Get(userItemUpdated.AssetID.ToString()); | 683 | AssetBase asset = scene.AssetService.Get(userItemUpdated.AssetID.ToString()); |
684 | 684 | ||
685 | // TODO: It would probably be better here to check script state via the saving and retrieval of state | 685 | // TODO: It would probably be better here to check script state via the saving and retrieval of state |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index c800383..08b276d 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -904,8 +904,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
904 | continue; | 904 | continue; |
905 | } | 905 | } |
906 | 906 | ||
907 | InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID); | 907 | InventoryItemBase baseItem = invService.GetItem(userID, appearance.Wearables[i][j].ItemID); |
908 | baseItem = invService.GetItem(baseItem); | ||
909 | 908 | ||
910 | if (baseItem != null) | 909 | if (baseItem != null) |
911 | { | 910 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs index eb23e83..e5bf919 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs | |||
@@ -239,8 +239,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
239 | InventoryFolderBase trashFolder = | 239 | InventoryFolderBase trashFolder = |
240 | invService.GetFolderForType(client.AgentId, FolderType.Trash); | 240 | invService.GetFolderForType(client.AgentId, FolderType.Trash); |
241 | 241 | ||
242 | InventoryItemBase item = new InventoryItemBase(transactionID, client.AgentId); | 242 | InventoryItemBase item = invService.GetItem(client.AgentId, transactionID); |
243 | item = invService.GetItem(item); | ||
244 | 243 | ||
245 | if (item != null && trashFolder != null) | 244 | if (item != null && trashFolder != null) |
246 | { | 245 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs index 095c57b..4efcd3b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs | |||
@@ -86,8 +86,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures | |||
86 | { | 86 | { |
87 | IInventoryService invService = m_scene.InventoryService; | 87 | IInventoryService invService = m_scene.InventoryService; |
88 | 88 | ||
89 | InventoryItemBase item = new InventoryItemBase(gestureId, client.AgentId); | 89 | InventoryItemBase item = invService.GetItem(client.AgentId, gestureId); |
90 | item = invService.GetItem(item); | ||
91 | if (item != null) | 90 | if (item != null) |
92 | { | 91 | { |
93 | item.Flags |= 1; | 92 | item.Flags |= 1; |
@@ -102,8 +101,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures | |||
102 | { | 101 | { |
103 | IInventoryService invService = m_scene.InventoryService; | 102 | IInventoryService invService = m_scene.InventoryService; |
104 | 103 | ||
105 | InventoryItemBase item = new InventoryItemBase(gestureId, client.AgentId); | 104 | InventoryItemBase item = invService.GetItem(client.AgentId, gestureId); |
106 | item = invService.GetItem(item); | ||
107 | if (item != null) | 105 | if (item != null) |
108 | { | 106 | { |
109 | item.Flags &= ~(uint)1; | 107 | item.Flags &= ~(uint)1; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 085328c..6c2cf0a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -270,8 +270,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
270 | // RLV uses this | 270 | // RLV uses this |
271 | if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) | 271 | if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) |
272 | { | 272 | { |
273 | InventoryFolderBase folder = new InventoryFolderBase(inventoryID, client.AgentId); | 273 | InventoryFolderBase folder = invService.GetFolder(client.AgentId, inventoryID); |
274 | folder = invService.GetFolder(folder); | ||
275 | 274 | ||
276 | if (folder != null) | 275 | if (folder != null) |
277 | { | 276 | { |
@@ -280,8 +279,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
280 | UUID destFolderID = new UUID(im.binaryBucket, 0); | 279 | UUID destFolderID = new UUID(im.binaryBucket, 0); |
281 | if (destFolderID != UUID.Zero) | 280 | if (destFolderID != UUID.Zero) |
282 | { | 281 | { |
283 | InventoryFolderBase destFolder = new InventoryFolderBase(destFolderID, client.AgentId); | 282 | InventoryFolderBase destFolder = invService.GetFolder(client.AgentId, destFolderID); |
284 | destFolder = invService.GetFolder(destFolder); | ||
285 | if (destFolder != null) | 283 | if (destFolder != null) |
286 | { | 284 | { |
287 | if (folder.ParentID != destFolder.ID) | 285 | if (folder.ParentID != destFolder.ID) |
@@ -339,8 +337,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
339 | 337 | ||
340 | UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip | 338 | UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip |
341 | 339 | ||
342 | InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); | 340 | InventoryItemBase item = invService.GetItem(client.AgentId, inventoryID); |
343 | item = invService.GetItem(item); | ||
344 | InventoryFolderBase folder = null; | 341 | InventoryFolderBase folder = null; |
345 | UUID? previousParentFolderID = null; | 342 | UUID? previousParentFolderID = null; |
346 | 343 | ||
@@ -354,8 +351,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
354 | } | 351 | } |
355 | else | 352 | else |
356 | { | 353 | { |
357 | folder = new InventoryFolderBase(inventoryID, client.AgentId); | 354 | folder = invService.GetFolder(client.AgentId, inventoryID); |
358 | folder = invService.GetFolder(folder); | ||
359 | 355 | ||
360 | if (folder != null) // It's a folder | 356 | if (folder != null) // It's a folder |
361 | { | 357 | { |
@@ -368,9 +364,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
368 | // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code). | 364 | // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code). |
369 | if (previousParentFolderID != null) | 365 | if (previousParentFolderID != null) |
370 | { | 366 | { |
371 | InventoryFolderBase previousParentFolder | 367 | InventoryFolderBase previousParentFolder = invService.GetFolder(client.AgentId, (UUID)previousParentFolderID); |
372 | = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId); | ||
373 | previousParentFolder = invService.GetFolder(previousParentFolder); | ||
374 | scene.SendInventoryUpdate(client, previousParentFolder, true, true); | 368 | scene.SendInventoryUpdate(client, previousParentFolder, true, true); |
375 | 369 | ||
376 | scene.SendInventoryUpdate(client, destinationFolder, true, true); | 370 | scene.SendInventoryUpdate(client, destinationFolder, true, true); |
@@ -392,8 +386,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
392 | 386 | ||
393 | UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip | 387 | UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip |
394 | 388 | ||
395 | InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); | 389 | InventoryItemBase item = invService.GetItem(client.AgentId, inventoryID); |
396 | item = invService.GetItem(item); | ||
397 | InventoryFolderBase folder = null; | 390 | InventoryFolderBase folder = null; |
398 | UUID? previousParentFolderID = null; | 391 | UUID? previousParentFolderID = null; |
399 | 392 | ||
@@ -410,8 +403,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
410 | } | 403 | } |
411 | else | 404 | else |
412 | { | 405 | { |
413 | folder = new InventoryFolderBase(inventoryID, client.AgentId); | 406 | folder = invService.GetFolder(client.AgentId, inventoryID); |
414 | folder = invService.GetFolder(folder); | ||
415 | 407 | ||
416 | if (folder != null & trashFolder != null) | 408 | if (folder != null & trashFolder != null) |
417 | { | 409 | { |
@@ -439,9 +431,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
439 | // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code). | 431 | // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code). |
440 | else if (previousParentFolderID != null) | 432 | else if (previousParentFolderID != null) |
441 | { | 433 | { |
442 | InventoryFolderBase previousParentFolder | 434 | InventoryFolderBase previousParentFolder = invService.GetFolder(client.AgentId, (UUID)previousParentFolderID); |
443 | = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId); | ||
444 | previousParentFolder = invService.GetFolder(previousParentFolder); | ||
445 | scene.SendInventoryUpdate(client, previousParentFolder, true, true); | 435 | scene.SendInventoryUpdate(client, previousParentFolder, true, true); |
446 | 436 | ||
447 | scene.SendInventoryUpdate(client, trashFolder, true, true); | 437 | scene.SendInventoryUpdate(client, trashFolder, true, true); |
@@ -500,10 +490,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
500 | { | 490 | { |
501 | UUID folderID = new UUID(im.binaryBucket, 1); | 491 | UUID folderID = new UUID(im.binaryBucket, 1); |
502 | 492 | ||
503 | InventoryFolderBase given = | ||
504 | new InventoryFolderBase(folderID, recipientID); | ||
505 | InventoryFolderBase folder = | 493 | InventoryFolderBase folder = |
506 | scene.InventoryService.GetFolder(given); | 494 | scene.InventoryService.GetFolder(recipientID, folderID); |
507 | 495 | ||
508 | if (folder != null) | 496 | if (folder != null) |
509 | user.ControllingClient.SendBulkUpdateInventory(folder); | 497 | user.ControllingClient.SendBulkUpdateInventory(folder); |
@@ -512,10 +500,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
512 | { | 500 | { |
513 | UUID itemID = new UUID(im.binaryBucket, 1); | 501 | UUID itemID = new UUID(im.binaryBucket, 1); |
514 | 502 | ||
515 | InventoryItemBase given = | ||
516 | new InventoryItemBase(itemID, recipientID); | ||
517 | InventoryItemBase item = | 503 | InventoryItemBase item = |
518 | scene.InventoryService.GetItem(given); | 504 | scene.InventoryService.GetItem(recipientID, itemID); |
519 | 505 | ||
520 | if (item != null) | 506 | if (item != null) |
521 | { | 507 | { |
@@ -538,10 +524,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
538 | { | 524 | { |
539 | UUID folderID = new UUID(im.imSessionID); | 525 | UUID folderID = new UUID(im.imSessionID); |
540 | 526 | ||
541 | InventoryFolderBase given = | ||
542 | new InventoryFolderBase(folderID, recipientID); | ||
543 | InventoryFolderBase folder = | 527 | InventoryFolderBase folder = |
544 | scene.InventoryService.GetFolder(given); | 528 | scene.InventoryService.GetFolder(recipientID, folderID); |
545 | 529 | ||
546 | if (folder != null) | 530 | if (folder != null) |
547 | user.ControllingClient.SendBulkUpdateInventory(folder); | 531 | user.ControllingClient.SendBulkUpdateInventory(folder); |
@@ -550,10 +534,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
550 | { | 534 | { |
551 | UUID itemID = new UUID(im.imSessionID); | 535 | UUID itemID = new UUID(im.imSessionID); |
552 | 536 | ||
553 | InventoryItemBase given = | ||
554 | new InventoryItemBase(itemID, recipientID); | ||
555 | InventoryItemBase item = | 537 | InventoryItemBase item = |
556 | scene.InventoryService.GetItem(given); | 538 | scene.InventoryService.GetItem(recipientID, itemID); |
557 | 539 | ||
558 | if (item != null) | 540 | if (item != null) |
559 | { | 541 | { |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index dfc880a..a9aaf12 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -95,8 +95,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
95 | 95 | ||
96 | foreach (AvatarAttachment att in a.GetAttachments()) | 96 | foreach (AvatarAttachment att in a.GetAttachments()) |
97 | { | 97 | { |
98 | InventoryItemBase item = new InventoryItemBase(att.ItemID, account.PrincipalID); | 98 | InventoryItemBase item = Scene.InventoryService.GetItem(account.PrincipalID, att.ItemID); |
99 | item = Scene.InventoryService.GetItem(item); | ||
100 | if (item != null) | 99 | if (item != null) |
101 | a.SetAttachment(att.AttachPoint, att.ItemID, item.AssetID); | 100 | a.SetAttachment(att.AttachPoint, att.ItemID, item.AssetID); |
102 | else | 101 | else |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 06a8f25..4119f90 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | |||
@@ -314,9 +314,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
314 | 314 | ||
315 | //if (fromTaskID.Equals(UUID.Zero)) | 315 | //if (fromTaskID.Equals(UUID.Zero)) |
316 | //{ | 316 | //{ |
317 | InventoryItemBase item = new InventoryItemBase(itemID); | 317 | InventoryItemBase item = m_Scene.InventoryService.GetItem(remoteClient.AgentId, itemID); |
318 | item.Owner = remoteClient.AgentId; | ||
319 | item = m_Scene.InventoryService.GetItem(item); | ||
320 | //if (item == null) | 318 | //if (item == null) |
321 | //{ // Fetch the item | 319 | //{ // Fetch the item |
322 | // item = new InventoryItemBase(); | 320 | // item = new InventoryItemBase(); |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 64233d5..781b9ff 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -184,8 +184,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
184 | if (!m_Scene.Permissions.CanCreateUserInventory(invType, remoteClient.AgentId)) | 184 | if (!m_Scene.Permissions.CanCreateUserInventory(invType, remoteClient.AgentId)) |
185 | return; | 185 | return; |
186 | 186 | ||
187 | InventoryFolderBase f = new InventoryFolderBase(folderID, remoteClient.AgentId); | 187 | InventoryFolderBase folder = m_Scene.InventoryService.GetFolder(remoteClient.AgentId, folderID); |
188 | InventoryFolderBase folder = m_Scene.InventoryService.GetFolder(f); | ||
189 | 188 | ||
190 | if (folder == null && Enum.IsDefined(typeof(FolderType), (sbyte)invType)) | 189 | if (folder == null && Enum.IsDefined(typeof(FolderType), (sbyte)invType)) |
191 | { | 190 | { |
@@ -260,8 +259,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
260 | /// <returns></returns> | 259 | /// <returns></returns> |
261 | public virtual UUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, UUID itemID, byte[] data) | 260 | public virtual UUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, UUID itemID, byte[] data) |
262 | { | 261 | { |
263 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); | 262 | InventoryItemBase item = m_Scene.InventoryService.GetItem(remoteClient.AgentId, itemID); |
264 | item = m_Scene.InventoryService.GetItem(item); | ||
265 | 263 | ||
266 | if (item.Owner != remoteClient.AgentId) | 264 | if (item.Owner != remoteClient.AgentId) |
267 | return UUID.Zero; | 265 | return UUID.Zero; |
@@ -719,8 +717,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
719 | 717 | ||
720 | if (DeRezAction.SaveToExistingUserInventoryItem == action) | 718 | if (DeRezAction.SaveToExistingUserInventoryItem == action) |
721 | { | 719 | { |
722 | item = new InventoryItemBase(so.RootPart.FromUserInventoryItemID, userID); | 720 | item = m_Scene.InventoryService.GetItem(userID, so.RootPart.FromUserInventoryItemID); |
723 | item = m_Scene.InventoryService.GetItem(item); | ||
724 | 721 | ||
725 | //item = userInfo.RootFolder.FindItem( | 722 | //item = userInfo.RootFolder.FindItem( |
726 | // objectGroup.RootPart.FromUserInventoryItemID); | 723 | // objectGroup.RootPart.FromUserInventoryItemID); |
@@ -792,9 +789,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
792 | { | 789 | { |
793 | if (so.FromFolderID != UUID.Zero && so.RootPart.OwnerID == remoteClient.AgentId) | 790 | if (so.FromFolderID != UUID.Zero && so.RootPart.OwnerID == remoteClient.AgentId) |
794 | { | 791 | { |
795 | InventoryFolderBase f = new InventoryFolderBase(so.FromFolderID, userID); | 792 | folder = m_Scene.InventoryService.GetFolder(userID, so.FromFolderID); |
796 | if (f != null) | ||
797 | folder = m_Scene.InventoryService.GetFolder(f); | ||
798 | 793 | ||
799 | if(folder.Type == 14 || folder.Type == 16) | 794 | if(folder.Type == 14 || folder.Type == 16) |
800 | { | 795 | { |
@@ -830,8 +825,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
830 | bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) | 825 | bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) |
831 | { | 826 | { |
832 | // m_log.DebugFormat("[INVENTORY ACCESS MODULE]: RezObject for {0}, item {1}", remoteClient.Name, itemID); | 827 | // m_log.DebugFormat("[INVENTORY ACCESS MODULE]: RezObject for {0}, item {1}", remoteClient.Name, itemID); |
833 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); | 828 | InventoryItemBase item = m_Scene.InventoryService.GetItem(remoteClient.AgentId, itemID); |
834 | item = m_Scene.InventoryService.GetItem(item); | ||
835 | 829 | ||
836 | if (item == null) | 830 | if (item == null) |
837 | { | 831 | { |
@@ -1289,8 +1283,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
1289 | protected virtual InventoryItemBase GetItem(UUID agentID, UUID itemID) | 1283 | protected virtual InventoryItemBase GetItem(UUID agentID, UUID itemID) |
1290 | { | 1284 | { |
1291 | IInventoryService invService = m_Scene.RequestModuleInterface<IInventoryService>(); | 1285 | IInventoryService invService = m_Scene.RequestModuleInterface<IInventoryService>(); |
1292 | InventoryItemBase item = new InventoryItemBase(itemID, agentID); | 1286 | InventoryItemBase item = invService.GetItem(agentID, itemID); |
1293 | item = invService.GetItem(item); | ||
1294 | 1287 | ||
1295 | if (item != null && item.CreatorData != null && item.CreatorData != string.Empty) | 1288 | if (item != null && item.CreatorData != null && item.CreatorData != string.Empty) |
1296 | UserManagementModule.AddUser(item.CreatorIdAsUuid, item.CreatorData); | 1289 | UserManagementModule.AddUser(item.CreatorIdAsUuid, item.CreatorData); |
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs b/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs index e1e1838..21e00b2 100644 --- a/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs +++ b/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs | |||
@@ -103,13 +103,8 @@ namespace OpenSim.Region.CoreModules.Framework.Library | |||
103 | { | 103 | { |
104 | InventoryItemBase[] itemColl = new InventoryItemBase[itemIDs.Length]; | 104 | InventoryItemBase[] itemColl = new InventoryItemBase[itemIDs.Length]; |
105 | int i = 0; | 105 | int i = 0; |
106 | InventoryItemBase item = new InventoryItemBase(); | ||
107 | item.Owner = principalID; | ||
108 | foreach (UUID fid in itemIDs) | 106 | foreach (UUID fid in itemIDs) |
109 | { | 107 | itemColl[i++] = GetItem(principalID, fid); |
110 | item.ID = fid; | ||
111 | itemColl[i++] = GetItem(item); | ||
112 | } | ||
113 | 108 | ||
114 | return itemColl; | 109 | return itemColl; |
115 | } | 110 | } |
@@ -239,14 +234,14 @@ namespace OpenSim.Region.CoreModules.Framework.Library | |||
239 | /// </summary> | 234 | /// </summary> |
240 | /// <param name="item"></param> | 235 | /// <param name="item"></param> |
241 | /// <returns></returns> | 236 | /// <returns></returns> |
242 | public InventoryItemBase GetItem(InventoryItemBase item) { return null; } | 237 | public InventoryItemBase GetItem(UUID principalID, UUID itemID) { return null; } |
243 | 238 | ||
244 | /// <summary> | 239 | /// <summary> |
245 | /// Get a folder, given by its UUID | 240 | /// Get a folder, given by its UUID |
246 | /// </summary> | 241 | /// </summary> |
247 | /// <param name="folder"></param> | 242 | /// <param name="folder"></param> |
248 | /// <returns></returns> | 243 | /// <returns></returns> |
249 | public InventoryFolderBase GetFolder(InventoryFolderBase folder) { return null; } | 244 | public InventoryFolderBase GetFolder(UUID principalID, UUID folderID) { return null; } |
250 | 245 | ||
251 | /// <summary> | 246 | /// <summary> |
252 | /// Does the given user have an inventory structure? | 247 | /// Does the given user have an inventory structure? |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index 48f228a..863560b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |||
@@ -598,21 +598,19 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
598 | return connector.DeleteItems(ownerID, itemIDs); | 598 | return connector.DeleteItems(ownerID, itemIDs); |
599 | } | 599 | } |
600 | 600 | ||
601 | public InventoryItemBase GetItem(InventoryItemBase item) | 601 | public InventoryItemBase GetItem(UUID principalID, UUID itemID) |
602 | { | 602 | { |
603 | if (item == null) | ||
604 | return null; | ||
605 | //m_log.Debug("[HG INVENTORY CONNECTOR]: GetItem " + item.ID); | 603 | //m_log.Debug("[HG INVENTORY CONNECTOR]: GetItem " + item.ID); |
606 | 604 | ||
607 | string invURL = GetInventoryServiceURL(item.Owner); | 605 | string invURL = GetInventoryServiceURL(principalID); |
608 | 606 | ||
609 | if (invURL == null) // not there, forward to local inventory connector to resolve | 607 | if (invURL == null) // not there, forward to local inventory connector to resolve |
610 | lock (m_Lock) | 608 | lock (m_Lock) |
611 | return m_LocalGridInventoryService.GetItem(item); | 609 | return m_LocalGridInventoryService.GetItem(principalID, itemID); |
612 | 610 | ||
613 | IInventoryService connector = GetConnector(invURL); | 611 | IInventoryService connector = GetConnector(invURL); |
614 | 612 | ||
615 | return connector.GetItem(item); | 613 | return connector.GetItem(principalID, itemID); |
616 | } | 614 | } |
617 | 615 | ||
618 | public InventoryItemBase[] GetMultipleItems(UUID userID, UUID[] itemIDs) | 616 | public InventoryItemBase[] GetMultipleItems(UUID userID, UUID[] itemIDs) |
@@ -632,22 +630,19 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
632 | return connector.GetMultipleItems(userID, itemIDs); | 630 | return connector.GetMultipleItems(userID, itemIDs); |
633 | } | 631 | } |
634 | 632 | ||
635 | public InventoryFolderBase GetFolder(InventoryFolderBase folder) | 633 | public InventoryFolderBase GetFolder(UUID principalID, UUID folderID) |
636 | { | 634 | { |
637 | if (folder == null) | ||
638 | return null; | ||
639 | |||
640 | //m_log.Debug("[HG INVENTORY CONNECTOR]: GetFolder " + folder.ID); | 635 | //m_log.Debug("[HG INVENTORY CONNECTOR]: GetFolder " + folder.ID); |
641 | 636 | ||
642 | string invURL = GetInventoryServiceURL(folder.Owner); | 637 | string invURL = GetInventoryServiceURL(principalID); |
643 | 638 | ||
644 | if (invURL == null) // not there, forward to local inventory connector to resolve | 639 | if (invURL == null) // not there, forward to local inventory connector to resolve |
645 | lock (m_Lock) | 640 | lock (m_Lock) |
646 | return m_LocalGridInventoryService.GetFolder(folder); | 641 | return m_LocalGridInventoryService.GetFolder(principalID, folderID); |
647 | 642 | ||
648 | IInventoryService connector = GetConnector(invURL); | 643 | IInventoryService connector = GetConnector(invURL); |
649 | 644 | ||
650 | return connector.GetFolder(folder); | 645 | return connector.GetFolder(principalID, folderID); |
651 | } | 646 | } |
652 | 647 | ||
653 | public bool HasInventoryForUser(UUID userID) | 648 | public bool HasInventoryForUser(UUID userID) |
@@ -710,4 +705,4 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
710 | return connector; | 705 | return connector; |
711 | } | 706 | } |
712 | } | 707 | } |
713 | } \ No newline at end of file | 708 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index 20d4e02..0d36725 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -292,13 +292,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
292 | return m_InventoryService.DeleteItems(ownerID, itemIDs); | 292 | return m_InventoryService.DeleteItems(ownerID, itemIDs); |
293 | } | 293 | } |
294 | 294 | ||
295 | public InventoryItemBase GetItem(InventoryItemBase item) | 295 | public InventoryItemBase GetItem(UUID principalID, UUID itemID) |
296 | { | 296 | { |
297 | // m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID); | 297 | // m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID); |
298 | 298 | ||
299 | // UUID requestedItemId = item.ID; | 299 | // UUID requestedItemId = item.ID; |
300 | 300 | ||
301 | item = m_InventoryService.GetItem(item); | 301 | InventoryItemBase item = m_InventoryService.GetItem(principalID, itemID); |
302 | 302 | ||
303 | // if (null == item) | 303 | // if (null == item) |
304 | // m_log.ErrorFormat( | 304 | // m_log.ErrorFormat( |
@@ -312,9 +312,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
312 | return m_InventoryService.GetMultipleItems(userID, itemIDs); | 312 | return m_InventoryService.GetMultipleItems(userID, itemIDs); |
313 | } | 313 | } |
314 | 314 | ||
315 | public InventoryFolderBase GetFolder(InventoryFolderBase folder) | 315 | public InventoryFolderBase GetFolder(UUID principalID, UUID folderID) |
316 | { | 316 | { |
317 | return m_InventoryService.GetFolder(folder); | 317 | return m_InventoryService.GetFolder(principalID, folderID); |
318 | } | 318 | } |
319 | 319 | ||
320 | /// <summary> | 320 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index 978b9d9..62b44b1 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs | |||
@@ -292,15 +292,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
292 | return m_RemoteConnector.DeleteItems(ownerID, itemIDs); | 292 | return m_RemoteConnector.DeleteItems(ownerID, itemIDs); |
293 | } | 293 | } |
294 | 294 | ||
295 | public InventoryItemBase GetItem(InventoryItemBase item) | 295 | public InventoryItemBase GetItem(UUID userID, UUID itemID) |
296 | { | 296 | { |
297 | //m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetItem {0}", item.ID); | 297 | //m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetItem {0}", item.ID); |
298 | if (item == null) | ||
299 | return null; | ||
300 | 298 | ||
301 | if (m_RemoteConnector == null) | 299 | if (m_RemoteConnector == null) |
302 | m_log.DebugFormat("[XINVENTORY CONNECTOR]: connector stub is null!!!"); | 300 | m_log.DebugFormat("[XINVENTORY CONNECTOR]: connector stub is null!!!"); |
303 | return m_RemoteConnector.GetItem(item); | 301 | return m_RemoteConnector.GetItem(userID, itemID); |
304 | } | 302 | } |
305 | 303 | ||
306 | public InventoryItemBase[] GetMultipleItems(UUID userID, UUID[] itemIDs) | 304 | public InventoryItemBase[] GetMultipleItems(UUID userID, UUID[] itemIDs) |
@@ -311,13 +309,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
311 | return m_RemoteConnector.GetMultipleItems(userID, itemIDs); | 309 | return m_RemoteConnector.GetMultipleItems(userID, itemIDs); |
312 | } | 310 | } |
313 | 311 | ||
314 | public InventoryFolderBase GetFolder(InventoryFolderBase folder) | 312 | public InventoryFolderBase GetFolder(UUID userID, UUID folderID) |
315 | { | 313 | { |
316 | //m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetFolder {0}", folder.ID); | 314 | //m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetFolder {0}", folder.ID); |
317 | if (folder == null) | ||
318 | return null; | ||
319 | 315 | ||
320 | return m_RemoteConnector.GetFolder(folder); | 316 | return m_RemoteConnector.GetFolder(userID, folderID); |
321 | } | 317 | } |
322 | 318 | ||
323 | public bool HasInventoryForUser(UUID userID) | 319 | public bool HasInventoryForUser(UUID userID) |
@@ -337,4 +333,4 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
337 | 333 | ||
338 | #endregion | 334 | #endregion |
339 | } | 335 | } |
340 | } \ No newline at end of file | 336 | } |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 303f8a8..06900f0 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -1100,8 +1100,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1100 | if (objectID == UUID.Zero) // User inventory | 1100 | if (objectID == UUID.Zero) // User inventory |
1101 | { | 1101 | { |
1102 | IInventoryService invService = m_scene.InventoryService; | 1102 | IInventoryService invService = m_scene.InventoryService; |
1103 | InventoryItemBase assetRequestItem = new InventoryItemBase(notecard, user); | 1103 | InventoryItemBase assetRequestItem = invService.GetItem(user, notecard); |
1104 | assetRequestItem = invService.GetItem(assetRequestItem); | ||
1105 | if (assetRequestItem == null && LibraryRootFolder != null) // Library item | 1104 | if (assetRequestItem == null && LibraryRootFolder != null) // Library item |
1106 | { | 1105 | { |
1107 | assetRequestItem = LibraryRootFolder.FindItem(notecard); | 1106 | assetRequestItem = LibraryRootFolder.FindItem(notecard); |
@@ -1629,8 +1628,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1629 | if (objectID == UUID.Zero) // User inventory | 1628 | if (objectID == UUID.Zero) // User inventory |
1630 | { | 1629 | { |
1631 | IInventoryService invService = m_scene.InventoryService; | 1630 | IInventoryService invService = m_scene.InventoryService; |
1632 | InventoryItemBase assetRequestItem = new InventoryItemBase(script, user); | 1631 | InventoryItemBase assetRequestItem = invService.GetItem(user, script); |
1633 | assetRequestItem = invService.GetItem(assetRequestItem); | ||
1634 | if (assetRequestItem == null && LibraryRootFolder != null) // Library item | 1632 | if (assetRequestItem == null && LibraryRootFolder != null) // Library item |
1635 | { | 1633 | { |
1636 | assetRequestItem = LibraryRootFolder.FindItem(script); | 1634 | assetRequestItem = LibraryRootFolder.FindItem(script); |
@@ -1726,8 +1724,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1726 | if (objectID == UUID.Zero) // User inventory | 1724 | if (objectID == UUID.Zero) // User inventory |
1727 | { | 1725 | { |
1728 | IInventoryService invService = m_scene.InventoryService; | 1726 | IInventoryService invService = m_scene.InventoryService; |
1729 | InventoryItemBase assetRequestItem = new InventoryItemBase(notecard, user); | 1727 | InventoryItemBase assetRequestItem = invService.GetItem(user, notecard); |
1730 | assetRequestItem = invService.GetItem(assetRequestItem); | ||
1731 | if (assetRequestItem == null && LibraryRootFolder != null) // Library item | 1728 | if (assetRequestItem == null && LibraryRootFolder != null) // Library item |
1732 | { | 1729 | { |
1733 | assetRequestItem = LibraryRootFolder.FindItem(notecard); | 1730 | assetRequestItem = LibraryRootFolder.FindItem(notecard); |
diff --git a/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs b/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs index d9d2e64..4362e28 100644 --- a/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs +++ b/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs | |||
@@ -143,8 +143,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
143 | // m_log.DebugFormat( | 143 | // m_log.DebugFormat( |
144 | // "[ASYNC INVENTORY SENDER]: Handling request from {0} for {1} on queue", fh.Client.Name, fh.ItemID); | 144 | // "[ASYNC INVENTORY SENDER]: Handling request from {0} for {1} on queue", fh.Client.Name, fh.ItemID); |
145 | 145 | ||
146 | InventoryItemBase item = new InventoryItemBase(fh.ItemID, fh.Client.AgentId); | 146 | InventoryItemBase item = m_scene.InventoryService.GetItem(fh.Client.AgentId, fh.ItemID); |
147 | item = m_scene.InventoryService.GetItem(item); | ||
148 | 147 | ||
149 | if (item != null) | 148 | if (item != null) |
150 | fh.Client.SendInventoryItemDetails(item.Owner, item); | 149 | fh.Client.SendInventoryItemDetails(item.Owner, item); |
@@ -153,4 +152,4 @@ namespace OpenSim.Region.Framework.Scenes | |||
153 | } | 152 | } |
154 | } | 153 | } |
155 | } | 154 | } |
156 | } \ No newline at end of file | 155 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 30bc75b..f2df364 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -223,8 +223,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
223 | 223 | ||
224 | if (core.TryGet<IClientInventory>(out inv)) | 224 | if (core.TryGet<IClientInventory>(out inv)) |
225 | { | 225 | { |
226 | InventoryFolderBase parent = new InventoryFolderBase(f.ParentID, f.Owner); | 226 | InventoryFolderBase parent = InventoryService.GetFolder(f.Owner, f.ParentID); |
227 | parent = InventoryService.GetFolder(parent); | ||
228 | inv.SendRemoveInventoryItems(new UUID[] { item.ID }); | 227 | inv.SendRemoveInventoryItems(new UUID[] { item.ID }); |
229 | inv.SendBulkUpdateInventory(new InventoryFolderBase[0], new InventoryItemBase[] { item }); | 228 | inv.SendBulkUpdateInventory(new InventoryFolderBase[0], new InventoryItemBase[] { item }); |
230 | string message = "The item was placed in folder " + f.Name; | 229 | string message = "The item was placed in folder " + f.Name; |
@@ -407,8 +406,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
407 | // inventory. Rut-Roh. Whatever. Make this secure. Yeah. | 406 | // inventory. Rut-Roh. Whatever. Make this secure. Yeah. |
408 | // | 407 | // |
409 | // Passing something to another avatar or a an object will already | 408 | // Passing something to another avatar or a an object will already |
410 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); | 409 | InventoryItemBase item = InventoryService.GetItem(remoteClient.AgentId, itemID); |
411 | item = InventoryService.GetItem(item); | ||
412 | 410 | ||
413 | if (item != null) | 411 | if (item != null) |
414 | { | 412 | { |
@@ -585,8 +583,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
585 | return null; | 583 | return null; |
586 | } | 584 | } |
587 | 585 | ||
588 | InventoryItemBase item = new InventoryItemBase(itemId, senderId); | 586 | InventoryItemBase item = InventoryService.GetItem(senderId, itemId); |
589 | item = InventoryService.GetItem(item); | ||
590 | 587 | ||
591 | if (item == null) | 588 | if (item == null) |
592 | { | 589 | { |
@@ -807,7 +804,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
807 | UUID recipientId, UUID senderId, UUID folderId, UUID recipientParentFolderId) | 804 | UUID recipientId, UUID senderId, UUID folderId, UUID recipientParentFolderId) |
808 | { | 805 | { |
809 | //// Retrieve the folder from the sender | 806 | //// Retrieve the folder from the sender |
810 | InventoryFolderBase folder = InventoryService.GetFolder(new InventoryFolderBase(folderId, senderId)); | 807 | InventoryFolderBase folder = InventoryService.GetFolder(senderId, folderId); |
811 | if (null == folder) | 808 | if (null == folder) |
812 | { | 809 | { |
813 | m_log.ErrorFormat( | 810 | m_log.ErrorFormat( |
@@ -868,8 +865,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
868 | 865 | ||
869 | if (item == null) | 866 | if (item == null) |
870 | { | 867 | { |
871 | item = new InventoryItemBase(oldItemID, remoteClient.AgentId); | 868 | item = InventoryService.GetItem(remoteClient.AgentId, oldItemID); |
872 | item = InventoryService.GetItem(item); | ||
873 | 869 | ||
874 | if (item == null) | 870 | if (item == null) |
875 | { | 871 | { |
@@ -953,7 +949,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
953 | foreach (InventoryItemBase b in items) | 949 | foreach (InventoryItemBase b in items) |
954 | { | 950 | { |
955 | CopyInventoryItem(remoteClient, 0, remoteClient.AgentId, b.ID, b.Folder, null); | 951 | CopyInventoryItem(remoteClient, 0, remoteClient.AgentId, b.ID, b.Folder, null); |
956 | InventoryItemBase n = InventoryService.GetItem(b); | 952 | InventoryItemBase n = InventoryService.GetItem(b.Owner, b.ID); |
957 | n.Folder = destfolder; | 953 | n.Folder = destfolder; |
958 | moveitems.Add(n); | 954 | moveitems.Add(n); |
959 | remoteClient.SendInventoryItemCreateUpdate(n, 0); | 955 | remoteClient.SendInventoryItemCreateUpdate(n, 0); |
@@ -1605,8 +1601,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1605 | InventoryCollection contents = InventoryService.GetFolderContent(client.AgentId, folder.ID); | 1601 | InventoryCollection contents = InventoryService.GetFolderContent(client.AgentId, folder.ID); |
1606 | 1602 | ||
1607 | // Fetch the folder itself to get its current version | 1603 | // Fetch the folder itself to get its current version |
1608 | InventoryFolderBase containingFolder = new InventoryFolderBase(folder.ID, client.AgentId); | 1604 | InventoryFolderBase containingFolder = InventoryService.GetFolder(client.AgentId, folder.ID); |
1609 | containingFolder = InventoryService.GetFolder(containingFolder); | ||
1610 | 1605 | ||
1611 | // m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}", | 1606 | // m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}", |
1612 | // contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName); | 1607 | // contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName); |
@@ -1620,7 +1615,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1620 | { | 1615 | { |
1621 | if (item.AssetType == (int)AssetType.Link) | 1616 | if (item.AssetType == (int)AssetType.Link) |
1622 | { | 1617 | { |
1623 | InventoryItemBase linkedItem = InventoryService.GetItem(new InventoryItemBase(item.AssetID)); | 1618 | InventoryItemBase linkedItem = InventoryService.GetItem(client.AgentId, item.AssetID); |
1624 | 1619 | ||
1625 | // Take care of genuinely broken links where the target doesn't exist | 1620 | // Take care of genuinely broken links where the target doesn't exist |
1626 | // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, | 1621 | // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, |
@@ -1680,8 +1675,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1680 | UUID copyID = UUID.Random(); | 1675 | UUID copyID = UUID.Random(); |
1681 | if (itemID != UUID.Zero) | 1676 | if (itemID != UUID.Zero) |
1682 | { | 1677 | { |
1683 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); | 1678 | InventoryItemBase item = InventoryService.GetItem(remoteClient.AgentId, itemID); |
1684 | item = InventoryService.GetItem(item); | ||
1685 | 1679 | ||
1686 | // Try library | 1680 | // Try library |
1687 | if (null == item && LibraryService != null && LibraryService.LibraryRootFolder != null) | 1681 | if (null == item && LibraryService != null && LibraryService.LibraryRootFolder != null) |
@@ -1836,8 +1830,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1836 | public SceneObjectPart RezScriptFromAgentInventory(UUID agentID, UUID fromItemID, uint localID) | 1830 | public SceneObjectPart RezScriptFromAgentInventory(UUID agentID, UUID fromItemID, uint localID) |
1837 | { | 1831 | { |
1838 | UUID copyID = UUID.Random(); | 1832 | UUID copyID = UUID.Random(); |
1839 | InventoryItemBase item = new InventoryItemBase(fromItemID, agentID); | 1833 | InventoryItemBase item = InventoryService.GetItem(agentID, fromItemID); |
1840 | item = InventoryService.GetItem(item); | ||
1841 | 1834 | ||
1842 | // Try library | 1835 | // Try library |
1843 | // XXX clumsy, possibly should be one call | 1836 | // XXX clumsy, possibly should be one call |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 34b9c5f..c49edd1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -627,8 +627,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
627 | // m_log.DebugFormat( | 627 | // m_log.DebugFormat( |
628 | // "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); | 628 | // "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); |
629 | 629 | ||
630 | InventoryFolderBase folder = new InventoryFolderBase(folderID, remoteClient.AgentId); | 630 | InventoryFolderBase folder = InventoryService.GetFolder(remoteClient.AgentId, folderID); |
631 | folder = InventoryService.GetFolder(folder); | ||
632 | if (folder != null) | 631 | if (folder != null) |
633 | { | 632 | { |
634 | folder.Name = name; | 633 | folder.Name = name; |
@@ -645,8 +644,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
645 | 644 | ||
646 | public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID) | 645 | public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID) |
647 | { | 646 | { |
648 | InventoryFolderBase folder = new InventoryFolderBase(folderID, remoteClient.AgentId); | 647 | InventoryFolderBase folder = InventoryService.GetFolder(remoteClient.AgentId, folderID); |
649 | folder = InventoryService.GetFolder(folder); | ||
650 | if (folder != null) | 648 | if (folder != null) |
651 | { | 649 | { |
652 | folder.ParentID = parentID; | 650 | folder.ParentID = parentID; |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index cb6ceb5..ddeac66 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -505,8 +505,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
505 | //variable will be set to null and attachment will | 505 | //variable will be set to null and attachment will |
506 | //not be included with the group notice. | 506 | //not be included with the group notice. |
507 | Scene scene = (Scene)remoteClient.Scene; | 507 | Scene scene = (Scene)remoteClient.Scene; |
508 | item = new InventoryItemBase(itemID, ownerID); | 508 | item = scene.InventoryService.GetItem(ownerID, itemID); |
509 | item = scene.InventoryService.GetItem(item); | ||
510 | 509 | ||
511 | if (item != null) | 510 | if (item != null) |
512 | { | 511 | { |