aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/AvatarAppearance.cs
diff options
context:
space:
mode:
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>();