From baf5649b706f845eb73882debdb821f366801b18 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 2 Nov 2015 02:08:13 +0000 Subject: [PATCH] fix avatarAppearance wearables copy --- OpenSim/Framework/AvatarAppearance.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 5258760bd0..cabba8bcb6 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs @@ -211,14 +211,19 @@ namespace OpenSim.Framework m_serial = appearance.Serial; - ClearWearables(); - if (copyWearables && (appearance.Wearables != null)) { m_wearables = new AvatarWearable[appearance.Wearables.Length]; for (int i = 0; i < appearance.Wearables.Length; i++) - SetWearable(i,appearance.Wearables[i]); + { + m_wearables[i] = new AvatarWearable(); + AvatarWearable wearable = appearance.Wearables[i]; + for (int j = 0; j < wearable.Count; j++) + m_wearables[i].Add(wearable[j].ItemID, wearable[j].AssetID); + } } + else + ClearWearables(); m_texture = null; if (appearance.Texture != null)