Multiattach, part 1

This commit is contained in:
Melanie
2013-03-05 12:02:22 +01:00
parent 82ac1763fb
commit 797bfbfcfa
8 changed files with 34 additions and 38 deletions

View File

@@ -180,11 +180,18 @@ namespace OpenSim.Services.Interfaces
// Attachments
List<AvatarAttachment> attachments = appearance.GetAttachments();
Dictionary<int, List<string>> atts = new Dictionary<int, List<string>>();
foreach (AvatarAttachment attach in attachments)
{
if (attach.ItemID != UUID.Zero)
Data["_ap_" + attach.AttachPoint] = attach.ItemID.ToString();
{
if (!atts.ContainsKey(attach.AttachPoint))
atts[attach.AttachPoint] = new List<string>();
atts[attach.AttachPoint].Add(attach.ItemID.ToString());
}
}
foreach (KeyValuePair<int, List<string>> kvp in atts)
Data["_ap_" + kvp.Key] = string.Join(",", kvp.Value.ToArray());
}
public AvatarAppearance ToAvatarAppearance()