diff options
author | Justin Clark-Casey (justincc) | 2011-08-24 21:40:36 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-24 21:40:36 +0100 |
commit | 801b7f18a7170b3df7f678e927122125f1c16eba (patch) | |
tree | 7619cecb2a7b4f64cc612307c98777faf61d4cbf /OpenSim/Region | |
parent | refactor: move Scene.Inventory.attachObjectAssetStore() into AttachmentsModul... (diff) | |
download | opensim-SC-801b7f18a7170b3df7f678e927122125f1c16eba.zip opensim-SC-801b7f18a7170b3df7f678e927122125f1c16eba.tar.gz opensim-SC-801b7f18a7170b3df7f678e927122125f1c16eba.tar.bz2 opensim-SC-801b7f18a7170b3df7f678e927122125f1c16eba.tar.xz |
return InventoryItemBase from AddSceneObjectAsAttachment()
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 5661254..928d43f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -230,7 +230,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
230 | 230 | ||
231 | itemID = group.GetFromItemID(); | 231 | itemID = group.GetFromItemID(); |
232 | if (itemID == UUID.Zero) | 232 | if (itemID == UUID.Zero) |
233 | AddSceneObjectAsAttachment(sp.ControllingClient, group, out itemID); | 233 | itemID = AddSceneObjectAsAttachment(sp.ControllingClient, group).ID; |
234 | 234 | ||
235 | ShowAttachInUserInventory(sp, AttachmentPt, itemID, group); | 235 | ShowAttachInUserInventory(sp, AttachmentPt, itemID, group); |
236 | 236 | ||
@@ -664,14 +664,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
664 | /// </summary> | 664 | /// </summary> |
665 | /// <param name="remoteClient"></param> | 665 | /// <param name="remoteClient"></param> |
666 | /// <param name="grp"></param> | 666 | /// <param name="grp"></param> |
667 | /// <param name="itemID"></param> | 667 | /// <returns>The user inventory item created that holds the attachment.</returns> |
668 | /// <returns></returns> | 668 | private InventoryItemBase AddSceneObjectAsAttachment(IClientAPI remoteClient, SceneObjectGroup grp) |
669 | private UUID AddSceneObjectAsAttachment(IClientAPI remoteClient, SceneObjectGroup grp, out UUID itemID) | ||
670 | { | 669 | { |
671 | // m_log.DebugFormat("[SCENE]: Called AddSceneObjectAsAttachment for object {0} {1} for {2} {3} {4}", grp.Name, grp.LocalId, remoteClient.Name, remoteClient.AgentId, AgentId); | 670 | // m_log.DebugFormat("[SCENE]: Called AddSceneObjectAsAttachment for object {0} {1} for {2} {3} {4}", grp.Name, grp.LocalId, remoteClient.Name, remoteClient.AgentId, AgentId); |
672 | 671 | ||
673 | itemID = UUID.Zero; | ||
674 | |||
675 | Vector3 inventoryStoredPosition = new Vector3 | 672 | Vector3 inventoryStoredPosition = new Vector3 |
676 | (((grp.AbsolutePosition.X > (int)Constants.RegionSize) | 673 | (((grp.AbsolutePosition.X > (int)Constants.RegionSize) |
677 | ? Constants.RegionSize - 6 | 674 | ? Constants.RegionSize - 6 |
@@ -751,8 +748,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
751 | m_dialogModule.SendAlertToUser(remoteClient, "Operation failed"); | 748 | m_dialogModule.SendAlertToUser(remoteClient, "Operation failed"); |
752 | } | 749 | } |
753 | 750 | ||
754 | itemID = item.ID; | 751 | return item; |
755 | return item.AssetID; | ||
756 | } | 752 | } |
757 | } | 753 | } |
758 | } | 754 | } |