From 11f7471d9c1af04cff16ddf6567a98e30295dad2 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 25 Nov 2008 17:01:18 +0000 Subject: * Remove direct access to Inventory.Serial --- OpenSim/Data/Tests/BasicRegionTest.cs | 4 ++-- .../Region/Environment/Interfaces/IEntityInventory.cs | 10 +++++----- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 18 +++++++++++------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs index e68ec2e..0a10cea 100644 --- a/OpenSim/Data/Tests/BasicRegionTest.cs +++ b/OpenSim/Data/Tests/BasicRegionTest.cs @@ -255,7 +255,7 @@ namespace OpenSim.Data.Tests sop.GroupPosition = groupos; sop.RotationOffset = rotoff; sop.CreatorID = creator; - sop.Inventory.Serial = iserial; + sop.InventorySerial = iserial; sop.Inventory.Items = dic; sop.ObjectFlags = objf; sop.Name = name; @@ -287,7 +287,7 @@ namespace OpenSim.Data.Tests Assert.That(rotoff,Is.EqualTo(sop.RotationOffset)); Assert.That(uuid,Is.EqualTo(sop.UUID)); 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(objf,Is.EqualTo(sop.ObjectFlags)); Assert.That(name,Is.EqualTo(sop.Name)); diff --git a/OpenSim/Region/Environment/Interfaces/IEntityInventory.cs b/OpenSim/Region/Environment/Interfaces/IEntityInventory.cs index 80a6a62..db809a0 100644 --- a/OpenSim/Region/Environment/Interfaces/IEntityInventory.cs +++ b/OpenSim/Region/Environment/Interfaces/IEntityInventory.cs @@ -48,11 +48,11 @@ namespace OpenSim.Region.Environment.Scenes /// /// Inventory serial number /// - uint Serial - { - get; - set; - } +// uint Serial +// { +// get; +// set; +// } /// /// Raw inventory data diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index bfb8b98..26a38a3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -147,7 +147,11 @@ namespace OpenSim.Region.Environment.Scenes /// This part's inventory /// [XmlIgnore] - public readonly IEntityInventory Inventory; + public IEntityInventory Inventory + { + get { return m_inventory; } + } + protected SceneObjectPartInventory m_inventory; [XmlIgnore] public bool Undoing = false; @@ -227,7 +231,7 @@ namespace OpenSim.Region.Environment.Scenes m_particleSystem = new byte[0]; Rezzed = DateTime.Now; - Inventory = new SceneObjectPartInventory(this); + m_inventory = new SceneObjectPartInventory(this); } /// @@ -277,7 +281,7 @@ namespace OpenSim.Region.Environment.Scenes TrimPermissions(); //m_undo = new UndoStack(ParentGroup.GetSceneMaxUndo()); - Inventory = new SceneObjectPartInventory(this); + m_inventory = new SceneObjectPartInventory(this); } protected SceneObjectPart(SerializationInfo info, StreamingContext context) @@ -298,7 +302,7 @@ namespace OpenSim.Region.Environment.Scenes //System.Console.WriteLine("SceneObjectPart Deserialize END"); Rezzed = DateTime.Now; - Inventory = new SceneObjectPartInventory(this); + m_inventory = new SceneObjectPartInventory(this); } #endregion Constructors @@ -351,8 +355,8 @@ namespace OpenSim.Region.Environment.Scenes /// public uint InventorySerial { - get { return Inventory.Serial; } - set { Inventory.Serial = value; } + get { return m_inventory.Serial; } + set { m_inventory.Serial = value; } } /// @@ -1472,7 +1476,7 @@ if (m_shape != null) { info.AddValue("m_updateFlag", m_updateFlag); 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_localID", m_localId); info.AddValue("m_name", m_name); -- cgit v1.1