From 4516bee2aaf97f33b3f9d1694c62b7293574bb33 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 15 Feb 2025 20:40:41 +0000 Subject: [PATCH] take code for old avination service that was never donated out of main path --- .../Avatar/Attachments/AttachmentsModule.cs | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index d7ca87710b..36bd26207c 100755 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -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 itemData = new(); IAttachmentsService attServ = m_scene.RequestModuleInterface(); 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 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 attachments = sp.Appearance.GetAttachments(); if(sp.IsNPC)