diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 6945acb..ba6f6ea 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -655,6 +655,33 @@ namespace OpenSim.Region.Environment.Scenes | |||
655 | 655 | ||
656 | } | 656 | } |
657 | 657 | ||
658 | public bool AddInventoryItem(IClientAPI remoteClient, uint localID, InventoryItemBase item, LLUUID copyItemID) | ||
659 | { | ||
660 | if (copyItemID != LLUUID.Zero) | ||
661 | { | ||
662 | SceneObjectPart part = this.GetChildPart(localID); | ||
663 | if (part != null) | ||
664 | { | ||
665 | SceneObjectPart.TaskInventoryItem taskItem = new SceneObjectPart.TaskInventoryItem(); | ||
666 | taskItem.item_id = copyItemID; | ||
667 | taskItem.asset_id = item.assetID; | ||
668 | taskItem.name = item.inventoryName; | ||
669 | taskItem.desc = item.inventoryDescription; | ||
670 | taskItem.owner_id = new LLUUID(item.avatarID.ToString()); | ||
671 | taskItem.creator_id = new LLUUID(item.creatorsID.ToString()); | ||
672 | taskItem.type = SceneObjectPart.TaskInventoryItem.Types[item.assetType]; | ||
673 | taskItem.inv_type = SceneObjectPart.TaskInventoryItem.Types[item.invType]; | ||
674 | part.AddInventoryItem(taskItem); | ||
675 | return true; | ||
676 | } | ||
677 | } | ||
678 | else | ||
679 | { | ||
680 | return AddInventoryItem(remoteClient, localID, item); | ||
681 | } | ||
682 | return false; | ||
683 | } | ||
684 | |||
658 | public int RemoveInventoryItem(IClientAPI remoteClient, uint localID, LLUUID itemID) | 685 | public int RemoveInventoryItem(IClientAPI remoteClient, uint localID, LLUUID itemID) |
659 | { | 686 | { |
660 | SceneObjectPart part = this.GetChildPart(localID); | 687 | SceneObjectPart part = this.GetChildPart(localID); |