mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 19:36:07 +08:00
Merge branch 'master' into mantis5110
Conflicts: OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
This commit is contained in:
@@ -212,41 +212,10 @@ namespace OpenSim.Framework
|
||||
args["mac"] = OSD.FromString(Mac);
|
||||
args["id0"] = OSD.FromString(Id0);
|
||||
|
||||
// Eventually this code should be deprecated, use full appearance
|
||||
// packing in packed_appearance
|
||||
if (Appearance != null)
|
||||
{
|
||||
args["appearance_serial"] = OSD.FromInteger(Appearance.Serial);
|
||||
|
||||
//System.Console.WriteLine("XXX Before packing Wearables");
|
||||
if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0))
|
||||
{
|
||||
OSDArray wears = new OSDArray(Appearance.Wearables.Length * 2);
|
||||
foreach (AvatarWearable awear in Appearance.Wearables)
|
||||
{
|
||||
wears.Add(OSD.FromUUID(awear.ItemID));
|
||||
wears.Add(OSD.FromUUID(awear.AssetID));
|
||||
//System.Console.WriteLine("XXX ItemID=" + awear.ItemID + " assetID=" + awear.AssetID);
|
||||
}
|
||||
args["wearables"] = wears;
|
||||
}
|
||||
|
||||
//System.Console.WriteLine("XXX Before packing Attachments");
|
||||
List<AvatarAttachment> attachments = Appearance.GetAttachments();
|
||||
if ((attachments != null) && (attachments.Count > 0))
|
||||
{
|
||||
OSDArray attachs = new OSDArray(attachments.Count);
|
||||
foreach (AvatarAttachment attach in attachments)
|
||||
{
|
||||
attachs.Add(attach.Pack());
|
||||
//System.Console.WriteLine("XXX att.pt=" + kvp.Key + "; itemID=" + kvp.Value[0] + "; assetID=" + kvp.Value[1]);
|
||||
}
|
||||
args["attachments"] = attachs;
|
||||
}
|
||||
}
|
||||
|
||||
if (Appearance != null)
|
||||
{
|
||||
OSDMap appmap = Appearance.Pack();
|
||||
args["packed_appearance"] = appmap;
|
||||
}
|
||||
@@ -346,28 +315,6 @@ namespace OpenSim.Framework
|
||||
if (args["appearance_serial"] != null)
|
||||
Appearance.Serial = args["appearance_serial"].AsInteger();
|
||||
|
||||
if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array)
|
||||
{
|
||||
OSDArray wears = (OSDArray)(args["wearables"]);
|
||||
for (int i = 0; i < wears.Count / 2; i++)
|
||||
{
|
||||
AvatarWearable awear = new AvatarWearable(wears[i*2].AsUUID(),wears[(i*2)+1].AsUUID());
|
||||
Appearance.SetWearable(i,awear);
|
||||
}
|
||||
}
|
||||
|
||||
if ((args["attachments"] != null) && (args["attachments"]).Type == OSDType.Array)
|
||||
{
|
||||
OSDArray attachs = (OSDArray)(args["attachments"]);
|
||||
foreach (OSD o in attachs)
|
||||
{
|
||||
if (o.Type == OSDType.Map)
|
||||
{
|
||||
Appearance.AppendAttachment(new AvatarAttachment((OSDMap)o));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map))
|
||||
{
|
||||
Appearance.Unpack((OSDMap)args["packed_appearance"]);
|
||||
|
||||
@@ -35,104 +35,6 @@ using log4net;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
// A special dictionary for avatar appearance
|
||||
public struct LayerItem
|
||||
{
|
||||
public UUID ItemID;
|
||||
public UUID AssetID;
|
||||
|
||||
public LayerItem(UUID itemID, UUID assetID)
|
||||
{
|
||||
ItemID = itemID;
|
||||
AssetID = assetID;
|
||||
}
|
||||
}
|
||||
|
||||
public class Layer
|
||||
{
|
||||
protected int m_layerType;
|
||||
protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>();
|
||||
protected List<UUID> m_ids = new List<UUID>();
|
||||
|
||||
public Layer(int type)
|
||||
{
|
||||
m_layerType = type;
|
||||
}
|
||||
|
||||
public int LayerType
|
||||
{
|
||||
get { return m_layerType; }
|
||||
}
|
||||
|
||||
public int Count
|
||||
{
|
||||
get { return m_ids.Count; }
|
||||
}
|
||||
|
||||
public void Add(UUID itemID, UUID assetID)
|
||||
{
|
||||
if (m_items.ContainsKey(itemID))
|
||||
return;
|
||||
if (m_ids.Count >= 5)
|
||||
return;
|
||||
|
||||
m_ids.Add(itemID);
|
||||
m_items[itemID] = assetID;
|
||||
}
|
||||
|
||||
public void Wear(UUID itemID, UUID assetID)
|
||||
{
|
||||
Clear();
|
||||
Add(itemID, assetID);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
m_ids.Clear();
|
||||
m_items.Clear();
|
||||
}
|
||||
|
||||
public void RemoveItem(UUID itemID)
|
||||
{
|
||||
if (m_items.ContainsKey(itemID))
|
||||
{
|
||||
m_ids.Remove(itemID);
|
||||
m_items.Remove(itemID);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveAsset(UUID assetID)
|
||||
{
|
||||
UUID itemID = UUID.Zero;
|
||||
|
||||
foreach (KeyValuePair<UUID, UUID> kvp in m_items)
|
||||
{
|
||||
if (kvp.Value == assetID)
|
||||
{
|
||||
itemID = kvp.Key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (itemID != UUID.Zero)
|
||||
{
|
||||
m_ids.Remove(itemID);
|
||||
m_items.Remove(itemID);
|
||||
}
|
||||
}
|
||||
|
||||
public LayerItem this [int idx]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (idx >= m_ids.Count || idx < 0)
|
||||
return new LayerItem(UUID.Zero, UUID.Zero);
|
||||
|
||||
return new LayerItem(m_ids[idx], m_items[m_ids[idx]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Contains the Avatar's Appearance and methods to manipulate the appearance.
|
||||
/// </summary>
|
||||
@@ -184,136 +86,6 @@ namespace OpenSim.Framework
|
||||
set { m_wearables = value; }
|
||||
}
|
||||
|
||||
public virtual UUID BodyItem {
|
||||
get { return m_wearables[AvatarWearable.BODY].ItemID; }
|
||||
set { m_wearables[AvatarWearable.BODY].ItemID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID BodyAsset {
|
||||
get { return m_wearables[AvatarWearable.BODY].AssetID; }
|
||||
set { m_wearables[AvatarWearable.BODY].AssetID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID SkinItem {
|
||||
get { return m_wearables[AvatarWearable.SKIN].ItemID; }
|
||||
set { m_wearables[AvatarWearable.SKIN].ItemID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID SkinAsset {
|
||||
get { return m_wearables[AvatarWearable.SKIN].AssetID; }
|
||||
set { m_wearables[AvatarWearable.SKIN].AssetID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID HairItem {
|
||||
get { return m_wearables[AvatarWearable.HAIR].ItemID; }
|
||||
set { m_wearables[AvatarWearable.HAIR].ItemID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID HairAsset {
|
||||
get { return m_wearables[AvatarWearable.HAIR].AssetID; }
|
||||
set { m_wearables[AvatarWearable.HAIR].AssetID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID EyesItem {
|
||||
get { return m_wearables[AvatarWearable.EYES].ItemID; }
|
||||
set { m_wearables[AvatarWearable.EYES].ItemID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID EyesAsset {
|
||||
get { return m_wearables[AvatarWearable.EYES].AssetID; }
|
||||
set { m_wearables[AvatarWearable.EYES].AssetID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID ShirtItem {
|
||||
get { return m_wearables[AvatarWearable.SHIRT].ItemID; }
|
||||
set { m_wearables[AvatarWearable.SHIRT].ItemID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID ShirtAsset {
|
||||
get { return m_wearables[AvatarWearable.SHIRT].AssetID; }
|
||||
set { m_wearables[AvatarWearable.SHIRT].AssetID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID PantsItem {
|
||||
get { return m_wearables[AvatarWearable.PANTS].ItemID; }
|
||||
set { m_wearables[AvatarWearable.PANTS].ItemID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID PantsAsset {
|
||||
get { return m_wearables[AvatarWearable.PANTS].AssetID; }
|
||||
set { m_wearables[AvatarWearable.PANTS].AssetID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID ShoesItem {
|
||||
get { return m_wearables[AvatarWearable.SHOES].ItemID; }
|
||||
set { m_wearables[AvatarWearable.SHOES].ItemID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID ShoesAsset {
|
||||
get { return m_wearables[AvatarWearable.SHOES].AssetID; }
|
||||
set { m_wearables[AvatarWearable.SHOES].AssetID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID SocksItem {
|
||||
get { return m_wearables[AvatarWearable.SOCKS].ItemID; }
|
||||
set { m_wearables[AvatarWearable.SOCKS].ItemID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID SocksAsset {
|
||||
get { return m_wearables[AvatarWearable.SOCKS].AssetID; }
|
||||
set { m_wearables[AvatarWearable.SOCKS].AssetID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID JacketItem {
|
||||
get { return m_wearables[AvatarWearable.JACKET].ItemID; }
|
||||
set { m_wearables[AvatarWearable.JACKET].ItemID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID JacketAsset {
|
||||
get { return m_wearables[AvatarWearable.JACKET].AssetID; }
|
||||
set { m_wearables[AvatarWearable.JACKET].AssetID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID GlovesItem {
|
||||
get { return m_wearables[AvatarWearable.GLOVES].ItemID; }
|
||||
set { m_wearables[AvatarWearable.GLOVES].ItemID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID GlovesAsset {
|
||||
get { return m_wearables[AvatarWearable.GLOVES].AssetID; }
|
||||
set { m_wearables[AvatarWearable.GLOVES].AssetID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID UnderShirtItem {
|
||||
get { return m_wearables[AvatarWearable.UNDERSHIRT].ItemID; }
|
||||
set { m_wearables[AvatarWearable.UNDERSHIRT].ItemID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID UnderShirtAsset {
|
||||
get { return m_wearables[AvatarWearable.UNDERSHIRT].AssetID; }
|
||||
set { m_wearables[AvatarWearable.UNDERSHIRT].AssetID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID UnderPantsItem {
|
||||
get { return m_wearables[AvatarWearable.UNDERPANTS].ItemID; }
|
||||
set { m_wearables[AvatarWearable.UNDERPANTS].ItemID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID UnderPantsAsset {
|
||||
get { return m_wearables[AvatarWearable.UNDERPANTS].AssetID; }
|
||||
set { m_wearables[AvatarWearable.UNDERPANTS].AssetID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID SkirtItem {
|
||||
get { return m_wearables[AvatarWearable.SKIRT].ItemID; }
|
||||
set { m_wearables[AvatarWearable.SKIRT].ItemID = value; }
|
||||
}
|
||||
|
||||
public virtual UUID SkirtAsset {
|
||||
get { return m_wearables[AvatarWearable.SKIRT].AssetID; }
|
||||
set { m_wearables[AvatarWearable.SKIRT].AssetID = value; }
|
||||
}
|
||||
|
||||
public virtual float AvatarHeight
|
||||
{
|
||||
get { return m_avatarHeight; }
|
||||
@@ -339,6 +111,10 @@ namespace OpenSim.Framework
|
||||
SetDefaultParams();
|
||||
SetHeight();
|
||||
|
||||
m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES];
|
||||
for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ )
|
||||
m_wearables[i] = new AvatarWearable();
|
||||
|
||||
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
|
||||
}
|
||||
|
||||
@@ -400,10 +176,11 @@ namespace OpenSim.Framework
|
||||
m_serial = appearance.Serial;
|
||||
m_owner = appearance.Owner;
|
||||
|
||||
m_wearables = null;
|
||||
m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES];
|
||||
for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ )
|
||||
m_wearables[i] = new AvatarWearable();
|
||||
if (appearance.Wearables != null)
|
||||
{
|
||||
m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; //should be 13 of these
|
||||
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
|
||||
SetWearable(i,appearance.Wearables[i]);
|
||||
}
|
||||
@@ -547,7 +324,9 @@ namespace OpenSim.Framework
|
||||
// DEBUG ON
|
||||
// m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID);
|
||||
// DEBUG OFF
|
||||
m_wearables[wearableId] = new AvatarWearable(wearable.ItemID,wearable.AssetID);
|
||||
m_wearables[wearableId].Clear();
|
||||
for (int i = 0 ; i < wearable.Count ; i++)
|
||||
m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID);
|
||||
}
|
||||
|
||||
|
||||
@@ -563,7 +342,10 @@ namespace OpenSim.Framework
|
||||
s += String.Format("Texture: {0} --> {1}\n",i,m_texture.FaceTextures[i].TextureID);
|
||||
|
||||
foreach (AvatarWearable awear in m_wearables)
|
||||
s += String.Format("Wearable: item={0}, asset={1}\n",awear.ItemID,awear.AssetID);
|
||||
{
|
||||
for ( int i = 0 ; i < awear.Count ; i++ )
|
||||
s += String.Format("Wearable: item={0}, asset={1}\n",awear[i].ItemID,awear[i].AssetID);
|
||||
}
|
||||
|
||||
s += "Visual Params: ";
|
||||
for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++)
|
||||
@@ -733,7 +515,7 @@ namespace OpenSim.Framework
|
||||
{
|
||||
OSDArray wears = (OSDArray)(data["wearables"]);
|
||||
for (int i = 0; i < wears.Count; i++)
|
||||
m_wearables[i] = new AvatarWearable((OSDMap)wears[i]);
|
||||
m_wearables[i] = new AvatarWearable((OSDArray)wears[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -26,11 +26,24 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public struct WearableItem
|
||||
{
|
||||
public UUID ItemID;
|
||||
public UUID AssetID;
|
||||
|
||||
public WearableItem(UUID itemID, UUID assetID)
|
||||
{
|
||||
ItemID = itemID;
|
||||
AssetID = assetID;
|
||||
}
|
||||
}
|
||||
|
||||
public class AvatarWearable
|
||||
{
|
||||
// these are guessed at by the list here -
|
||||
@@ -49,8 +62,10 @@ namespace OpenSim.Framework
|
||||
public static readonly int UNDERSHIRT = 10;
|
||||
public static readonly int UNDERPANTS = 11;
|
||||
public static readonly int SKIRT = 12;
|
||||
public static readonly int ALPHA = 13;
|
||||
public static readonly int TATTOO = 14;
|
||||
|
||||
public static readonly int MAX_WEARABLES = 13;
|
||||
public static readonly int MAX_WEARABLES = 15;
|
||||
|
||||
public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
|
||||
public static readonly UUID DEFAULT_BODY_ASSET = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
|
||||
@@ -67,68 +82,158 @@ namespace OpenSim.Framework
|
||||
public static readonly UUID DEFAULT_PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111");
|
||||
public static readonly UUID DEFAULT_PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120");
|
||||
|
||||
public UUID AssetID;
|
||||
public UUID ItemID;
|
||||
public static readonly UUID DEFAULT_ALPHA_ITEM = new UUID("bfb9923c-4838-4d2d-bf07-608c5b1165c8");
|
||||
public static readonly UUID DEFAULT_ALPHA_ASSET = new UUID("1578a2b1-5179-4b53-b618-fe00ca5a5594");
|
||||
|
||||
public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1");
|
||||
public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007");
|
||||
|
||||
|
||||
protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>();
|
||||
protected List<UUID> m_ids = new List<UUID>();
|
||||
|
||||
public AvatarWearable()
|
||||
{
|
||||
}
|
||||
|
||||
public AvatarWearable(UUID itemId, UUID assetId)
|
||||
public AvatarWearable(UUID itemID, UUID assetID)
|
||||
{
|
||||
AssetID = assetId;
|
||||
ItemID = itemId;
|
||||
Wear(itemID, assetID);
|
||||
}
|
||||
|
||||
public AvatarWearable(OSDMap args)
|
||||
public AvatarWearable(OSDArray args)
|
||||
{
|
||||
Unpack(args);
|
||||
}
|
||||
|
||||
public OSDMap Pack()
|
||||
public OSD Pack()
|
||||
{
|
||||
OSDMap weardata = new OSDMap();
|
||||
weardata["item"] = OSD.FromUUID(ItemID);
|
||||
weardata["asset"] = OSD.FromUUID(AssetID);
|
||||
OSDArray wearlist = new OSDArray();
|
||||
|
||||
return weardata;
|
||||
foreach (UUID id in m_ids)
|
||||
{
|
||||
OSDMap weardata = new OSDMap();
|
||||
weardata["item"] = OSD.FromUUID(id);
|
||||
weardata["asset"] = OSD.FromUUID(m_items[id]);
|
||||
wearlist.Add(weardata);
|
||||
}
|
||||
|
||||
return wearlist;
|
||||
}
|
||||
|
||||
public void Unpack(OSDMap args)
|
||||
public void Unpack(OSDArray args)
|
||||
{
|
||||
ItemID = (args["item"] != null) ? args["item"].AsUUID() : UUID.Zero;
|
||||
AssetID = (args["asset"] != null) ? args["asset"].AsUUID() : UUID.Zero;
|
||||
Clear();
|
||||
|
||||
foreach (OSDMap weardata in args)
|
||||
{
|
||||
Add(weardata["item"].AsUUID(), weardata["asset"].AsUUID());
|
||||
}
|
||||
}
|
||||
|
||||
public int Count
|
||||
{
|
||||
get { return m_ids.Count; }
|
||||
}
|
||||
|
||||
public void Add(UUID itemID, UUID assetID)
|
||||
{
|
||||
if (itemID == UUID.Zero)
|
||||
return;
|
||||
if (m_items.ContainsKey(itemID))
|
||||
{
|
||||
m_items[itemID] = assetID;
|
||||
return;
|
||||
}
|
||||
if (m_ids.Count >= 5)
|
||||
return;
|
||||
|
||||
m_ids.Add(itemID);
|
||||
m_items[itemID] = assetID;
|
||||
}
|
||||
|
||||
public void Wear(UUID itemID, UUID assetID)
|
||||
{
|
||||
Clear();
|
||||
Add(itemID, assetID);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
m_ids.Clear();
|
||||
m_items.Clear();
|
||||
}
|
||||
|
||||
public void RemoveItem(UUID itemID)
|
||||
{
|
||||
if (m_items.ContainsKey(itemID))
|
||||
{
|
||||
m_ids.Remove(itemID);
|
||||
m_items.Remove(itemID);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveAsset(UUID assetID)
|
||||
{
|
||||
UUID itemID = UUID.Zero;
|
||||
|
||||
foreach (KeyValuePair<UUID, UUID> kvp in m_items)
|
||||
{
|
||||
if (kvp.Value == assetID)
|
||||
{
|
||||
itemID = kvp.Key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (itemID != UUID.Zero)
|
||||
{
|
||||
m_ids.Remove(itemID);
|
||||
m_items.Remove(itemID);
|
||||
}
|
||||
}
|
||||
|
||||
public WearableItem this [int idx]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (idx >= m_ids.Count || idx < 0)
|
||||
return new WearableItem(UUID.Zero, UUID.Zero);
|
||||
|
||||
return new WearableItem(m_ids[idx], m_items[m_ids[idx]]);
|
||||
}
|
||||
}
|
||||
|
||||
public static AvatarWearable[] DefaultWearables
|
||||
{
|
||||
get
|
||||
{
|
||||
AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 13 of these
|
||||
AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these
|
||||
for (int i = 0; i < MAX_WEARABLES; i++)
|
||||
{
|
||||
defaultWearables[i] = new AvatarWearable();
|
||||
}
|
||||
|
||||
// Body
|
||||
defaultWearables[0].ItemID = DEFAULT_BODY_ITEM;
|
||||
defaultWearables[0].AssetID = DEFAULT_BODY_ASSET;
|
||||
defaultWearables[BODY].Add(DEFAULT_BODY_ITEM, DEFAULT_BODY_ASSET);
|
||||
|
||||
// Hair
|
||||
defaultWearables[2].ItemID = DEFAULT_HAIR_ITEM;
|
||||
defaultWearables[2].AssetID = DEFAULT_HAIR_ASSET;
|
||||
defaultWearables[HAIR].Add(DEFAULT_HAIR_ITEM, DEFAULT_HAIR_ASSET);
|
||||
|
||||
// Skin
|
||||
defaultWearables[1].ItemID = DEFAULT_SKIN_ITEM;
|
||||
defaultWearables[1].AssetID = DEFAULT_SKIN_ASSET;
|
||||
defaultWearables[SKIN].Add(DEFAULT_SKIN_ITEM, DEFAULT_SKIN_ASSET);
|
||||
|
||||
// Shirt
|
||||
defaultWearables[4].ItemID = DEFAULT_SHIRT_ITEM;
|
||||
defaultWearables[4].AssetID = DEFAULT_SHIRT_ASSET;
|
||||
defaultWearables[SHIRT].Add(DEFAULT_SHIRT_ITEM, DEFAULT_SHIRT_ASSET);
|
||||
|
||||
// Pants
|
||||
defaultWearables[5].ItemID = DEFAULT_PANTS_ITEM;
|
||||
defaultWearables[5].AssetID = DEFAULT_PANTS_ASSET;
|
||||
defaultWearables[PANTS].Add(DEFAULT_PANTS_ITEM, DEFAULT_PANTS_ASSET);
|
||||
|
||||
// Alpha
|
||||
defaultWearables[ALPHA].Add(DEFAULT_ALPHA_ITEM, DEFAULT_ALPHA_ASSET);
|
||||
|
||||
// Tattoo
|
||||
defaultWearables[TATTOO].Add(DEFAULT_TATTOO_ITEM, DEFAULT_TATTOO_ASSET);
|
||||
|
||||
return defaultWearables;
|
||||
}
|
||||
|
||||
@@ -414,12 +414,10 @@ namespace OpenSim.Framework
|
||||
// We might not pass this in all cases...
|
||||
if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0))
|
||||
{
|
||||
OSDArray wears = new OSDArray(Appearance.Wearables.Length * 2);
|
||||
OSDArray wears = new OSDArray(Appearance.Wearables.Length);
|
||||
foreach (AvatarWearable awear in Appearance.Wearables)
|
||||
{
|
||||
wears.Add(OSD.FromUUID(awear.ItemID));
|
||||
wears.Add(OSD.FromUUID(awear.AssetID));
|
||||
}
|
||||
wears.Add(awear.Pack());
|
||||
|
||||
args["wearables"] = wears;
|
||||
}
|
||||
|
||||
@@ -592,7 +590,7 @@ namespace OpenSim.Framework
|
||||
OSDArray wears = (OSDArray)(args["wearables"]);
|
||||
for (int i = 0; i < wears.Count / 2; i++)
|
||||
{
|
||||
AvatarWearable awear = new AvatarWearable(wears[i*2].AsUUID(),wears[(i*2)+1].AsUUID());
|
||||
AvatarWearable awear = new AvatarWearable((OSDArray)wears[i]);
|
||||
Appearance.SetWearable(i,awear);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,6 @@ namespace OpenSim
|
||||
/// of the code that is too old.
|
||||
///
|
||||
/// </value>
|
||||
public readonly static int MajorInterfaceVersion = 6;
|
||||
public readonly static int MajorInterfaceVersion = 7;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user