From 29530f30296271f2d5641091e45d5f396a7d4dec Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 19 Aug 2008 07:11:58 +0000 Subject: Attachment persistence!!! Patch #9170 (Mantis #1171) Attachments now persist across logouts. Mostly untested. --- OpenSim/Framework/AvatarAppearance.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'OpenSim/Framework/AvatarAppearance.cs') diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 3459504..81cf372 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs @@ -528,22 +528,26 @@ namespace OpenSim.Framework m_attachments[attachpoint][1] = asset; } - public void DetachAttachment(LLUUID itemID) + public int GetAttachpoint(LLUUID itemID) { - int attachpoint = 0; - foreach (KeyValuePair kvp in m_attachments) { if(kvp.Value[0] == itemID) { - attachpoint = kvp.Key; - break; + return kvp.Key; } } + return 0; + } + + public void DetachAttachment(LLUUID itemID) + { + int attachpoint = GetAttachpoint(itemID); if(attachpoint > 0) m_attachments.Remove(attachpoint); } + string GetAttachmentsString() { List strings = new List(); -- cgit v1.1