aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/AvatarAppearance.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-19 07:11:58 +0000
committerMelanie Thielker2008-08-19 07:11:58 +0000
commit29530f30296271f2d5641091e45d5f396a7d4dec (patch)
treec0c01f8eabe0b8c3b0db20b3eb3c3c68018d450c /OpenSim/Framework/AvatarAppearance.cs
parent* This reverts a change where m_regions[RegionHandle] was replaced instead of... (diff)
downloadopensim-SC_OLD-29530f30296271f2d5641091e45d5f396a7d4dec.zip
opensim-SC_OLD-29530f30296271f2d5641091e45d5f396a7d4dec.tar.gz
opensim-SC_OLD-29530f30296271f2d5641091e45d5f396a7d4dec.tar.bz2
opensim-SC_OLD-29530f30296271f2d5641091e45d5f396a7d4dec.tar.xz
Attachment persistence!!! Patch #9170 (Mantis #1171)
Attachments now persist across logouts. Mostly untested.
Diffstat (limited to 'OpenSim/Framework/AvatarAppearance.cs')
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs14
1 files changed, 9 insertions, 5 deletions
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
528 m_attachments[attachpoint][1] = asset; 528 m_attachments[attachpoint][1] = asset;
529 } 529 }
530 530
531 public void DetachAttachment(LLUUID itemID) 531 public int GetAttachpoint(LLUUID itemID)
532 { 532 {
533 int attachpoint = 0;
534
535 foreach (KeyValuePair<int, LLUUID[]> kvp in m_attachments) 533 foreach (KeyValuePair<int, LLUUID[]> kvp in m_attachments)
536 { 534 {
537 if(kvp.Value[0] == itemID) 535 if(kvp.Value[0] == itemID)
538 { 536 {
539 attachpoint = kvp.Key; 537 return kvp.Key;
540 break;
541 } 538 }
542 } 539 }
540 return 0;
541 }
542
543 public void DetachAttachment(LLUUID itemID)
544 {
545 int attachpoint = GetAttachpoint(itemID);
543 546
544 if(attachpoint > 0) 547 if(attachpoint > 0)
545 m_attachments.Remove(attachpoint); 548 m_attachments.Remove(attachpoint);
546 } 549 }
550
547 string GetAttachmentsString() 551 string GetAttachmentsString()
548 { 552 {
549 List<string> strings = new List<string>(); 553 List<string> strings = new List<string>();