aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs14
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs7
2 files changed, 16 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>();
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index c337907..a7d6349 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -47,11 +47,15 @@ namespace OpenSim.Framework.Communications.Cache
47 internal delegate void SendInventoryDescendentsDelegate( 47 internal delegate void SendInventoryDescendentsDelegate(
48 IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems); 48 IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems);
49 49
50 public delegate void OnItemReceivedDelegate(LLUUID itemID);
51
50 /// <summary> 52 /// <summary>
51 /// Stores user profile and inventory data received from backend services for a particular user. 53 /// Stores user profile and inventory data received from backend services for a particular user.
52 /// </summary> 54 /// </summary>
53 public class CachedUserInfo 55 public class CachedUserInfo
54 { 56 {
57 public event OnItemReceivedDelegate OnItemReceived;
58
55 private static readonly ILog m_log 59 private static readonly ILog m_log
56 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 60 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
57 61
@@ -306,6 +310,9 @@ namespace OpenSim.Framework.Communications.Cache
306 { 310 {
307 folder.Items[itemInfo.ID] = itemInfo; 311 folder.Items[itemInfo.ID] = itemInfo;
308 } 312 }
313
314 if (OnItemReceived != null)
315 OnItemReceived(itemInfo.ID);
309 } 316 }
310 317
311 /// <summary> 318 /// <summary>