mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
Attachments now persist across logouts. Mostly untested.
This commit is contained in:
@@ -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<int, LLUUID[]> 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<string> strings = new List<string>();
|
||||
|
||||
@@ -47,11 +47,15 @@ namespace OpenSim.Framework.Communications.Cache
|
||||
internal delegate void SendInventoryDescendentsDelegate(
|
||||
IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems);
|
||||
|
||||
public delegate void OnItemReceivedDelegate(LLUUID itemID);
|
||||
|
||||
/// <summary>
|
||||
/// Stores user profile and inventory data received from backend services for a particular user.
|
||||
/// </summary>
|
||||
public class CachedUserInfo
|
||||
{
|
||||
public event OnItemReceivedDelegate OnItemReceived;
|
||||
|
||||
private static readonly ILog m_log
|
||||
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -306,6 +310,9 @@ namespace OpenSim.Framework.Communications.Cache
|
||||
{
|
||||
folder.Items[itemInfo.ID] = itemInfo;
|
||||
}
|
||||
|
||||
if (OnItemReceived != null)
|
||||
OnItemReceived(itemInfo.ID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user