Merge branch 'avination' into careminster

Conflicts:
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
This commit is contained in:
Melanie
2013-03-06 00:15:54 +00:00
10 changed files with 68 additions and 42 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()
@@ -320,10 +327,16 @@ namespace OpenSim.Services.Interfaces
if (!Int32.TryParse(pointStr, out point))
continue;
UUID uuid = UUID.Zero;
UUID.TryParse(_kvp.Value, out uuid);
List<string> idList = new List<string>(_kvp.Value.Split(new char[] {','}));
appearance.SetAttachment(point, uuid, UUID.Zero);
appearance.SetAttachment(point, UUID.Zero, UUID.Zero);
foreach (string id in idList)
{
UUID uuid = UUID.Zero;
UUID.TryParse(id, out uuid);
appearance.SetAttachment(point | 0x80, uuid, UUID.Zero);
}
}
if (appearance.Wearables[AvatarWearable.BODY].Count == 0)