* Remove direct access to Inventory.Serial

0.6.1-post-fixes
Justin Clarke Casey 2008-11-25 17:01:18 +00:00
parent 6caebb6c93
commit 11f7471d9c
3 changed files with 18 additions and 14 deletions

View File

@ -255,7 +255,7 @@ namespace OpenSim.Data.Tests
sop.GroupPosition = groupos; sop.GroupPosition = groupos;
sop.RotationOffset = rotoff; sop.RotationOffset = rotoff;
sop.CreatorID = creator; sop.CreatorID = creator;
sop.Inventory.Serial = iserial; sop.InventorySerial = iserial;
sop.Inventory.Items = dic; sop.Inventory.Items = dic;
sop.ObjectFlags = objf; sop.ObjectFlags = objf;
sop.Name = name; sop.Name = name;
@ -287,7 +287,7 @@ namespace OpenSim.Data.Tests
Assert.That(rotoff,Is.EqualTo(sop.RotationOffset)); Assert.That(rotoff,Is.EqualTo(sop.RotationOffset));
Assert.That(uuid,Is.EqualTo(sop.UUID)); Assert.That(uuid,Is.EqualTo(sop.UUID));
Assert.That(creator,Is.EqualTo(sop.CreatorID)); Assert.That(creator,Is.EqualTo(sop.CreatorID));
Assert.That(iserial,Is.EqualTo(sop.Inventory.Serial)); Assert.That(iserial,Is.EqualTo(sop.InventorySerial));
Assert.That(dic,Is.EqualTo(sop.Inventory.Items)); Assert.That(dic,Is.EqualTo(sop.Inventory.Items));
Assert.That(objf,Is.EqualTo(sop.ObjectFlags)); Assert.That(objf,Is.EqualTo(sop.ObjectFlags));
Assert.That(name,Is.EqualTo(sop.Name)); Assert.That(name,Is.EqualTo(sop.Name));

View File

@ -48,11 +48,11 @@ namespace OpenSim.Region.Environment.Scenes
/// <value> /// <value>
/// Inventory serial number /// Inventory serial number
/// </value> /// </value>
uint Serial // uint Serial
{ // {
get; // get;
set; // set;
} // }
/// <value> /// <value>
/// Raw inventory data /// Raw inventory data

View File

@ -147,7 +147,11 @@ namespace OpenSim.Region.Environment.Scenes
/// This part's inventory /// This part's inventory
/// </summary> /// </summary>
[XmlIgnore] [XmlIgnore]
public readonly IEntityInventory Inventory; public IEntityInventory Inventory
{
get { return m_inventory; }
}
protected SceneObjectPartInventory m_inventory;
[XmlIgnore] [XmlIgnore]
public bool Undoing = false; public bool Undoing = false;
@ -227,7 +231,7 @@ namespace OpenSim.Region.Environment.Scenes
m_particleSystem = new byte[0]; m_particleSystem = new byte[0];
Rezzed = DateTime.Now; Rezzed = DateTime.Now;
Inventory = new SceneObjectPartInventory(this); m_inventory = new SceneObjectPartInventory(this);
} }
/// <summary> /// <summary>
@ -277,7 +281,7 @@ namespace OpenSim.Region.Environment.Scenes
TrimPermissions(); TrimPermissions();
//m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo()); //m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo());
Inventory = new SceneObjectPartInventory(this); m_inventory = new SceneObjectPartInventory(this);
} }
protected SceneObjectPart(SerializationInfo info, StreamingContext context) protected SceneObjectPart(SerializationInfo info, StreamingContext context)
@ -298,7 +302,7 @@ namespace OpenSim.Region.Environment.Scenes
//System.Console.WriteLine("SceneObjectPart Deserialize END"); //System.Console.WriteLine("SceneObjectPart Deserialize END");
Rezzed = DateTime.Now; Rezzed = DateTime.Now;
Inventory = new SceneObjectPartInventory(this); m_inventory = new SceneObjectPartInventory(this);
} }
#endregion Constructors #endregion Constructors
@ -351,8 +355,8 @@ namespace OpenSim.Region.Environment.Scenes
/// </value> /// </value>
public uint InventorySerial public uint InventorySerial
{ {
get { return Inventory.Serial; } get { return m_inventory.Serial; }
set { Inventory.Serial = value; } set { m_inventory.Serial = value; }
} }
/// <value> /// <value>
@ -1472,7 +1476,7 @@ if (m_shape != null) {
info.AddValue("m_updateFlag", m_updateFlag); info.AddValue("m_updateFlag", m_updateFlag);
info.AddValue("CreatorID", _creatorID.Guid); info.AddValue("CreatorID", _creatorID.Guid);
info.AddValue("m_inventorySerial", Inventory.Serial); info.AddValue("m_inventorySerial", m_inventory.Serial);
info.AddValue("m_uuid", m_uuid.Guid); info.AddValue("m_uuid", m_uuid.Guid);
info.AddValue("m_localID", m_localId); info.AddValue("m_localID", m_localId);
info.AddValue("m_name", m_name); info.AddValue("m_name", m_name);