aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-09-06 01:59:21 +0100
committerJustin Clark-Casey (justincc)2011-09-06 01:59:21 +0100
commitb903d2ca963d5f68803a1cabbd033f89ab72634a (patch)
treee353ffa7e3de076022a024c394c698db906d94d5 /OpenSim/Region/CoreModules
parentGet rid of the confusing version of IAttachmentsModule.RezSingleAttachmentFro... (diff)
downloadopensim-SC_OLD-b903d2ca963d5f68803a1cabbd033f89ab72634a.zip
opensim-SC_OLD-b903d2ca963d5f68803a1cabbd033f89ab72634a.tar.gz
opensim-SC_OLD-b903d2ca963d5f68803a1cabbd033f89ab72634a.tar.bz2
opensim-SC_OLD-b903d2ca963d5f68803a1cabbd033f89ab72634a.tar.xz
In SetAttachment, if the existing attachment has no asset id then carry on rather than abort.
When a user logs in, the attachment item ids are pulled from persistence in the Avatars table. However, the asset ids are not saved. When the avatar enters a simulator the attachments are set again. If we simply perform an item check then the asset ids (which are now present) are never set, and NPC attachments later fail unless the attachment is detached and reattached. Hopefully resolves part of http://opensimulator.org/mantis/view.php?id=5653
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index 3f8c01f..0fa2e00 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -247,6 +247,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
247 Assert.That(attSo.IsAttachment); 247 Assert.That(attSo.IsAttachment);
248 Assert.That(attSo.UsesPhysics, Is.False); 248 Assert.That(attSo.UsesPhysics, Is.False);
249 Assert.That(attSo.IsTemporary, Is.False); 249 Assert.That(attSo.IsTemporary, Is.False);
250
251 // Check appearance status
252 List<AvatarAttachment> retreivedAttachments = presence.Appearance.GetAttachments();
253 Assert.That(retreivedAttachments.Count, Is.EqualTo(1));
254 Assert.That(retreivedAttachments[0].AttachPoint, Is.EqualTo((int)AttachmentPoint.Chest));
255 Assert.That(retreivedAttachments[0].ItemID, Is.EqualTo(attItemId));
256 Assert.That(retreivedAttachments[0].AssetID, Is.EqualTo(attAssetId));
257 Assert.That(presence.Appearance.GetAttachpoint(attItemId), Is.EqualTo((int)AttachmentPoint.Chest));
250 } 258 }
251 259
252 // I'm commenting this test because scene setup NEEDS InventoryService to 260 // I'm commenting this test because scene setup NEEDS InventoryService to