mirror of
https://github.com/opensim/opensim.git
synced 2026-05-14 18:55:39 +08:00
take code for old avination service that was never donated out of main path
This commit is contained in:
@@ -411,37 +411,36 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
if (DebugLevel > 0)
|
||||
m_log.Debug($"[ATTACHMENTS MODULE]: Rezzing any attachments for {sp.Name} from simulator-side");
|
||||
|
||||
XmlDocument doc = new();
|
||||
Dictionary<UUID, string> itemData = new();
|
||||
IAttachmentsService attServ = m_scene.RequestModuleInterface<IAttachmentsService>();
|
||||
if (attServ is not null)
|
||||
{
|
||||
// old avination service that was never donated
|
||||
m_log.Debug("[ATTACHMENT]: Loading attachment data from attachment service");
|
||||
string stateData = attServ.Get(sp.UUID.ToString());
|
||||
if (!string.IsNullOrEmpty(stateData))
|
||||
{
|
||||
try
|
||||
{
|
||||
XmlDocument doc = new();
|
||||
doc.LoadXml(stateData);
|
||||
XmlNodeList nodes = doc.GetElementsByTagName("Attachment");
|
||||
if (nodes.Count > 0)
|
||||
{
|
||||
foreach (XmlNode n in nodes)
|
||||
{
|
||||
XmlElement elem = (XmlElement)n;
|
||||
string itemID = elem.GetAttribute("ItemID");
|
||||
string xml = elem.InnerXml;
|
||||
|
||||
itemData[new UUID(itemID)] = xml;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary<UUID, string> itemData = new();
|
||||
|
||||
XmlNodeList nodes = doc.GetElementsByTagName("Attachment");
|
||||
if (nodes.Count > 0)
|
||||
{
|
||||
foreach (XmlNode n in nodes)
|
||||
{
|
||||
XmlElement elem = (XmlElement)n;
|
||||
string itemID = elem.GetAttribute("ItemID");
|
||||
string xml = elem.InnerXml;
|
||||
|
||||
itemData[new UUID(itemID)] = xml;
|
||||
}
|
||||
}
|
||||
|
||||
List<AvatarAttachment> attachments = sp.Appearance.GetAttachments();
|
||||
|
||||
if(sp.IsNPC)
|
||||
|
||||
Reference in New Issue
Block a user