diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 2151ded..219de84 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -10,6 +10,7 @@ using libsecondlife.Packets; | |||
10 | using OpenSim.Framework.Interfaces; | 10 | using OpenSim.Framework.Interfaces; |
11 | using OpenSim.Framework.Types; | 11 | using OpenSim.Framework.Types; |
12 | using OpenSim.Physics.Manager; | 12 | using OpenSim.Physics.Manager; |
13 | using OpenSim.Framework.Data; | ||
13 | 14 | ||
14 | namespace OpenSim.Region.Environment.Scenes | 15 | namespace OpenSim.Region.Environment.Scenes |
15 | { | 16 | { |
@@ -518,7 +519,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
518 | proper.ObjectData[0].FolderID = LLUUID.Zero; | 519 | proper.ObjectData[0].FolderID = LLUUID.Zero; |
519 | proper.ObjectData[0].FromTaskID = LLUUID.Zero; | 520 | proper.ObjectData[0].FromTaskID = LLUUID.Zero; |
520 | proper.ObjectData[0].GroupID = LLUUID.Zero; | 521 | proper.ObjectData[0].GroupID = LLUUID.Zero; |
521 | proper.ObjectData[0].InventorySerial = 0; | 522 | proper.ObjectData[0].InventorySerial = (short) this.m_rootPart.InventorySerial; |
522 | proper.ObjectData[0].LastOwnerID = this.m_rootPart.LastOwnerID; | 523 | proper.ObjectData[0].LastOwnerID = this.m_rootPart.LastOwnerID; |
523 | proper.ObjectData[0].ObjectID = this.UUID; | 524 | proper.ObjectData[0].ObjectID = this.UUID; |
524 | proper.ObjectData[0].OwnerID = this.m_rootPart.OwnerID; | 525 | proper.ObjectData[0].OwnerID = this.m_rootPart.OwnerID; |
@@ -601,27 +602,45 @@ namespace OpenSim.Region.Environment.Scenes | |||
601 | /// </summary> | 602 | /// </summary> |
602 | /// <param name="remoteClient"></param> | 603 | /// <param name="remoteClient"></param> |
603 | /// <param name="localID"></param> | 604 | /// <param name="localID"></param> |
604 | public void GetPartInventoryFileName(IClientAPI remoteClient, uint localID) | 605 | public bool GetPartInventoryFileName(IClientAPI remoteClient, uint localID) |
605 | { | 606 | { |
606 | SceneObjectPart part = this.GetChildPrim(localID); | 607 | SceneObjectPart part = this.GetChildPrim(localID); |
607 | if (part != null) | 608 | if (part != null) |
608 | { | 609 | { |
609 | part.GetInventoryFileName(remoteClient, localID); | 610 | return part.GetInventoryFileName(remoteClient, localID); |
610 | } | 611 | } |
612 | return false; | ||
611 | } | 613 | } |
612 | 614 | ||
613 | /// <summary> | 615 | public string RequestInventoryFile(uint localID, XferManagaer xferManager) |
614 | /// | 616 | { |
615 | /// </summary> | 617 | SceneObjectPart part = this.GetChildPrim(localID); |
616 | /// <param name="remoteClient"></param> | 618 | if (part != null) |
617 | /// <param name="partID"></param> | 619 | { |
618 | public void RequestInventoryFile(IClientAPI remoteClient, uint localID, ulong xferID) | 620 | return part.RequestInventoryFile(xferManager); |
621 | } | ||
622 | return ""; | ||
623 | } | ||
624 | |||
625 | public bool AddInventoryItem(IClientAPI remoteClient, uint localID, InventoryItemBase item) | ||
619 | { | 626 | { |
620 | SceneObjectPart part = this.GetChildPrim(localID); | 627 | SceneObjectPart part = this.GetChildPrim(localID); |
621 | if (part != null) | 628 | if (part != null) |
622 | { | 629 | { |
623 | part.RequestInventoryFile(remoteClient, xferID); | 630 | SceneObjectPart.TaskInventoryItem taskItem = new SceneObjectPart.TaskInventoryItem(); |
631 | taskItem.item_id = item.inventoryID; | ||
632 | taskItem.asset_id = item.assetID; | ||
633 | taskItem.name = item.inventoryName; | ||
634 | taskItem.desc = item.inventoryDescription; | ||
635 | taskItem.owner_id = item.avatarID; | ||
636 | taskItem.creator_id = item.creatorsID; | ||
637 | taskItem.type = taskItem.AssetTypes[item.assetType]; | ||
638 | taskItem.inv_type = taskItem.AssetTypes[item.invType]; | ||
639 | part.AddInventoryItem(taskItem); | ||
640 | return true; | ||
624 | } | 641 | } |
642 | return false; | ||
643 | |||
625 | } | 644 | } |
626 | 645 | ||
627 | /// <summary> | 646 | /// <summary> |