aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/Inventory
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest/Inventory')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs25
1 files changed, 10 insertions, 15 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs
index 8271d76..3f6d4d6 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs
@@ -27,6 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic;
30using System.Xml; 31using System.Xml;
31using OpenMetaverse; 32using OpenMetaverse;
32using OpenSim.Framework; 33using OpenSim.Framework;
@@ -765,25 +766,19 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
765 FormatPart(rdata, "UnderShirt", rdata.userAppearance.UnderShirtItem, rdata.userAppearance.UnderShirtAsset); 766 FormatPart(rdata, "UnderShirt", rdata.userAppearance.UnderShirtItem, rdata.userAppearance.UnderShirtAsset);
766 FormatPart(rdata, "UnderPants", rdata.userAppearance.UnderPantsItem, rdata.userAppearance.UnderPantsAsset); 767 FormatPart(rdata, "UnderPants", rdata.userAppearance.UnderPantsItem, rdata.userAppearance.UnderPantsAsset);
767 768
768 Hashtable attachments = rdata.userAppearance.GetAttachments(); 769 Rest.Log.DebugFormat("{0} FormatUserAppearance: Formatting attachments", MsgId);
769 770
770 if (attachments != null) 771 rdata.writer.WriteStartElement("Attachments");
772 List<AvatarAttachment> attachments = rdata.userAppearance.GetAttachments();
773 foreach (AvatarAttachment attach in attachments)
771 { 774 {
772 775 rdata.writer.WriteStartElement("Attachment");
773 Rest.Log.DebugFormat("{0} FormatUserAppearance: Formatting attachments", MsgId); 776 rdata.writer.WriteAttributeString("AtPoint", attach.AttachPoint.ToString());
774 777 rdata.writer.WriteAttributeString("Item", attach.ItemID.ToString());
775 rdata.writer.WriteStartElement("Attachments"); 778 rdata.writer.WriteAttributeString("Asset", attach.AssetID.ToString());
776 for (int i = 0; i < attachments.Count; i++)
777 {
778 Hashtable attachment = attachments[i] as Hashtable;
779 rdata.writer.WriteStartElement("Attachment");
780 rdata.writer.WriteAttributeString("AtPoint", i.ToString());
781 rdata.writer.WriteAttributeString("Item", (string) attachment["item"]);
782 rdata.writer.WriteAttributeString("Asset", (string) attachment["asset"]);
783 rdata.writer.WriteEndElement();
784 }
785 rdata.writer.WriteEndElement(); 779 rdata.writer.WriteEndElement();
786 } 780 }
781 rdata.writer.WriteEndElement();
787 782
788 Primitive.TextureEntry texture = rdata.userAppearance.Texture; 783 Primitive.TextureEntry texture = rdata.userAppearance.Texture;
789 784