diff options
author | Justin Clark-Casey (justincc) | 2010-03-05 23:29:24 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-03-05 23:29:24 +0000 |
commit | b72c2dc6e88fa2ea6bb97e0b32d0cdbb2ea78c4a (patch) | |
tree | c10be55d7244e593f44deaf608b0d8d921995848 /OpenSim/Region/CoreModules | |
parent | revert accidental Standalone.ini change (diff) | |
download | opensim-SC-b72c2dc6e88fa2ea6bb97e0b32d0cdbb2ea78c4a.zip opensim-SC-b72c2dc6e88fa2ea6bb97e0b32d0cdbb2ea78c4a.tar.gz opensim-SC-b72c2dc6e88fa2ea6bb97e0b32d0cdbb2ea78c4a.tar.bz2 opensim-SC-b72c2dc6e88fa2ea6bb97e0b32d0cdbb2ea78c4a.tar.xz |
refactor: move user inventory side of RezSingleAttachment to module
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 103a813..0ea1f63 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -137,5 +137,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
137 | 137 | ||
138 | return true; | 138 | return true; |
139 | } | 139 | } |
140 | |||
141 | /// <summary> | ||
142 | /// Update the user inventory to reflect an attachment | ||
143 | /// </summary> | ||
144 | /// <param name="att"></param> | ||
145 | /// <param name="remoteClient"></param> | ||
146 | /// <param name="itemID"></param> | ||
147 | /// <param name="AttachmentPt"></param> | ||
148 | /// <returns></returns> | ||
149 | public UUID SetAttachmentInventoryStatus( | ||
150 | SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) | ||
151 | { | ||
152 | m_log.DebugFormat( | ||
153 | "[USER INVENTORY]: Updating inventory of {0} to show attachment of {1} (item ID {2})", | ||
154 | remoteClient.Name, att.Name, itemID); | ||
155 | |||
156 | if (!att.IsDeleted) | ||
157 | AttachmentPt = att.RootPart.AttachmentPoint; | ||
158 | |||
159 | ScenePresence presence; | ||
160 | if (m_scene.TryGetAvatar(remoteClient.AgentId, out presence)) | ||
161 | { | ||
162 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); | ||
163 | item = m_scene.InventoryService.GetItem(item); | ||
164 | |||
165 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); | ||
166 | } | ||
167 | |||
168 | return att.UUID; | ||
169 | } | ||
140 | } | 170 | } |
141 | } \ No newline at end of file | 171 | } \ No newline at end of file |