diff options
author | Justin Clark-Casey (justincc) | 2011-08-23 22:05:22 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-23 22:05:22 +0100 |
commit | 97b207240ee79abfec08d2dfaa9385211eb305c8 (patch) | |
tree | 29d5e9b2be525ae6395f07faca267486a0ddebf4 /OpenSim/Region/CoreModules/Avatar | |
parent | remove mono compiler warnings (diff) | |
download | opensim-SC-97b207240ee79abfec08d2dfaa9385211eb305c8.zip opensim-SC-97b207240ee79abfec08d2dfaa9385211eb305c8.tar.gz opensim-SC-97b207240ee79abfec08d2dfaa9385211eb305c8.tar.bz2 opensim-SC-97b207240ee79abfec08d2dfaa9385211eb305c8.tar.xz |
rename AttachmentsModule.ShowDetachInUserInventory() to DetachSingleAttachmentToInv() for consistency and to reflect it's actual behaviour
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 90092ce..a854c11 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
80 | client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachmentsFromInventory; | 80 | client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachmentsFromInventory; |
81 | client.OnObjectAttach += AttachObject; | 81 | client.OnObjectAttach += AttachObject; |
82 | client.OnObjectDetach += DetachObject; | 82 | client.OnObjectDetach += DetachObject; |
83 | client.OnDetachAttachmentIntoInv += ShowDetachInUserInventory; | 83 | client.OnDetachAttachmentIntoInv += DetachSingleAttachmentToInv; |
84 | } | 84 | } |
85 | 85 | ||
86 | public void UnsubscribeFromClientEvents(IClientAPI client) | 86 | public void UnsubscribeFromClientEvents(IClientAPI client) |
@@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
89 | client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachmentsFromInventory; | 89 | client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachmentsFromInventory; |
90 | client.OnObjectAttach -= AttachObject; | 90 | client.OnObjectAttach -= AttachObject; |
91 | client.OnObjectDetach -= DetachObject; | 91 | client.OnObjectDetach -= DetachObject; |
92 | client.OnDetachAttachmentIntoInv -= ShowDetachInUserInventory; | 92 | client.OnDetachAttachmentIntoInv -= DetachSingleAttachmentToInv; |
93 | } | 93 | } |
94 | 94 | ||
95 | /// <summary> | 95 | /// <summary> |
@@ -269,7 +269,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
269 | if (updateInventoryStatus) | 269 | if (updateInventoryStatus) |
270 | { | 270 | { |
271 | if (att == null) | 271 | if (att == null) |
272 | ShowDetachInUserInventory(itemID, sp.ControllingClient); | 272 | DetachSingleAttachmentToInv(itemID, sp.ControllingClient); |
273 | else | 273 | else |
274 | ShowAttachInUserInventory(att, sp, itemID, AttachmentPt); | 274 | ShowAttachInUserInventory(att, sp, itemID, AttachmentPt); |
275 | } | 275 | } |
@@ -417,12 +417,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
417 | SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID); | 417 | SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID); |
418 | if (group != null) | 418 | if (group != null) |
419 | { | 419 | { |
420 | //group.DetachToGround(); | 420 | DetachSingleAttachmentToInv(group.GetFromItemID(), remoteClient); |
421 | ShowDetachInUserInventory(group.GetFromItemID(), remoteClient); | ||
422 | } | 421 | } |
423 | } | 422 | } |
424 | 423 | ||
425 | public void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient) | 424 | public void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient) |
426 | { | 425 | { |
427 | ScenePresence presence; | 426 | ScenePresence presence; |
428 | if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence)) | 427 | if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence)) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 6f242e5..6695a9d 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | |||
@@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
130 | 130 | ||
131 | m_attMod.RezSingleAttachmentFromInventory( | 131 | m_attMod.RezSingleAttachmentFromInventory( |
132 | presence.ControllingClient, attItemId, (uint)AttachmentPoint.Chest); | 132 | presence.ControllingClient, attItemId, (uint)AttachmentPoint.Chest); |
133 | m_attMod.ShowDetachInUserInventory(attItemId, presence.ControllingClient); | 133 | m_attMod.DetachSingleAttachmentToInv(attItemId, presence.ControllingClient); |
134 | 134 | ||
135 | // Check status on scene presence | 135 | // Check status on scene presence |
136 | Assert.That(presence.HasAttachments(), Is.False); | 136 | Assert.That(presence.HasAttachments(), Is.False); |