aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Interfaces/IAvatarService.cs21
1 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs
index 863fd93..6ca0b15 100644
--- a/OpenSim/Services/Interfaces/IAvatarService.cs
+++ b/OpenSim/Services/Interfaces/IAvatarService.cs
@@ -174,11 +174,18 @@ namespace OpenSim.Services.Interfaces
174 174
175 // Attachments 175 // Attachments
176 List<AvatarAttachment> attachments = appearance.GetAttachments(); 176 List<AvatarAttachment> attachments = appearance.GetAttachments();
177 Dictionary<int, List<string>> atts = new Dictionary<int, List<string>>();
177 foreach (AvatarAttachment attach in attachments) 178 foreach (AvatarAttachment attach in attachments)
178 { 179 {
179 if (attach.ItemID != UUID.Zero) 180 if (attach.ItemID != UUID.Zero)
180 Data["_ap_" + attach.AttachPoint] = attach.ItemID.ToString(); 181 {
182 if (!atts.ContainsKey(attach.AttachPoint))
183 atts[attach.AttachPoint] = new List<string>();
184 atts[attach.AttachPoint].Add(attach.ItemID.ToString());
185 }
181 } 186 }
187 foreach (KeyValuePair<int, List<string>> kvp in atts)
188 Data["_ap_" + kvp.Key] = string.Join(",", kvp.Value.ToArray());
182 } 189 }
183 190
184 public AvatarAppearance ToAvatarAppearance() 191 public AvatarAppearance ToAvatarAppearance()
@@ -304,10 +311,16 @@ namespace OpenSim.Services.Interfaces
304 if (!Int32.TryParse(pointStr, out point)) 311 if (!Int32.TryParse(pointStr, out point))
305 continue; 312 continue;
306 313
307 UUID uuid = UUID.Zero; 314 List<string> idList = new List<string>(_kvp.Value.Split(new char[] {','}));
308 UUID.TryParse(_kvp.Value, out uuid);
309 315
310 appearance.SetAttachment(point, uuid, UUID.Zero); 316 appearance.SetAttachment(point, UUID.Zero, UUID.Zero);
317 foreach (string id in idList)
318 {
319 UUID uuid = UUID.Zero;
320 UUID.TryParse(id, out uuid);
321
322 appearance.SetAttachment(point | 0x80, uuid, UUID.Zero);
323 }
311 } 324 }
312 325
313 if (appearance.Wearables[AvatarWearable.BODY].Count == 0) 326 if (appearance.Wearables[AvatarWearable.BODY].Count == 0)