aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-25 17:01:18 +0000
committerJustin Clarke Casey2008-11-25 17:01:18 +0000
commit11f7471d9c1af04cff16ddf6567a98e30295dad2 (patch)
treea4fce388fc990ce8499bc45609dd82a12d242039
parent* refactor: Establish an IEntityInventory interface for SceneObjectPartInvent... (diff)
downloadopensim-SC_OLD-11f7471d9c1af04cff16ddf6567a98e30295dad2.zip
opensim-SC_OLD-11f7471d9c1af04cff16ddf6567a98e30295dad2.tar.gz
opensim-SC_OLD-11f7471d9c1af04cff16ddf6567a98e30295dad2.tar.bz2
opensim-SC_OLD-11f7471d9c1af04cff16ddf6567a98e30295dad2.tar.xz
* Remove direct access to Inventory.Serial
-rw-r--r--OpenSim/Data/Tests/BasicRegionTest.cs4
-rw-r--r--OpenSim/Region/Environment/Interfaces/IEntityInventory.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs18
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
255 sop.GroupPosition = groupos; 255 sop.GroupPosition = groupos;
256 sop.RotationOffset = rotoff; 256 sop.RotationOffset = rotoff;
257 sop.CreatorID = creator; 257 sop.CreatorID = creator;
258 sop.Inventory.Serial = iserial; 258 sop.InventorySerial = iserial;
259 sop.Inventory.Items = dic; 259 sop.Inventory.Items = dic;
260 sop.ObjectFlags = objf; 260 sop.ObjectFlags = objf;
261 sop.Name = name; 261 sop.Name = name;
@@ -287,7 +287,7 @@ namespace OpenSim.Data.Tests
287 Assert.That(rotoff,Is.EqualTo(sop.RotationOffset)); 287 Assert.That(rotoff,Is.EqualTo(sop.RotationOffset));
288 Assert.That(uuid,Is.EqualTo(sop.UUID)); 288 Assert.That(uuid,Is.EqualTo(sop.UUID));
289 Assert.That(creator,Is.EqualTo(sop.CreatorID)); 289 Assert.That(creator,Is.EqualTo(sop.CreatorID));
290 Assert.That(iserial,Is.EqualTo(sop.Inventory.Serial)); 290 Assert.That(iserial,Is.EqualTo(sop.InventorySerial));
291 Assert.That(dic,Is.EqualTo(sop.Inventory.Items)); 291 Assert.That(dic,Is.EqualTo(sop.Inventory.Items));
292 Assert.That(objf,Is.EqualTo(sop.ObjectFlags)); 292 Assert.That(objf,Is.EqualTo(sop.ObjectFlags));
293 Assert.That(name,Is.EqualTo(sop.Name)); 293 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
48 /// <value> 48 /// <value>
49 /// Inventory serial number 49 /// Inventory serial number
50 /// </value> 50 /// </value>
51 uint Serial 51// uint Serial
52 { 52// {
53 get; 53// get;
54 set; 54// set;
55 } 55// }
56 56
57 /// <value> 57 /// <value>
58 /// Raw inventory data 58 /// 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
147 /// This part's inventory 147 /// This part's inventory
148 /// </summary> 148 /// </summary>
149 [XmlIgnore] 149 [XmlIgnore]
150 public readonly IEntityInventory Inventory; 150 public IEntityInventory Inventory
151 {
152 get { return m_inventory; }
153 }
154 protected SceneObjectPartInventory m_inventory;
151 155
152 [XmlIgnore] 156 [XmlIgnore]
153 public bool Undoing = false; 157 public bool Undoing = false;
@@ -227,7 +231,7 @@ namespace OpenSim.Region.Environment.Scenes
227 m_particleSystem = new byte[0]; 231 m_particleSystem = new byte[0];
228 Rezzed = DateTime.Now; 232 Rezzed = DateTime.Now;
229 233
230 Inventory = new SceneObjectPartInventory(this); 234 m_inventory = new SceneObjectPartInventory(this);
231 } 235 }
232 236
233 /// <summary> 237 /// <summary>
@@ -277,7 +281,7 @@ namespace OpenSim.Region.Environment.Scenes
277 TrimPermissions(); 281 TrimPermissions();
278 //m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo()); 282 //m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo());
279 283
280 Inventory = new SceneObjectPartInventory(this); 284 m_inventory = new SceneObjectPartInventory(this);
281 } 285 }
282 286
283 protected SceneObjectPart(SerializationInfo info, StreamingContext context) 287 protected SceneObjectPart(SerializationInfo info, StreamingContext context)
@@ -298,7 +302,7 @@ namespace OpenSim.Region.Environment.Scenes
298 //System.Console.WriteLine("SceneObjectPart Deserialize END"); 302 //System.Console.WriteLine("SceneObjectPart Deserialize END");
299 Rezzed = DateTime.Now; 303 Rezzed = DateTime.Now;
300 304
301 Inventory = new SceneObjectPartInventory(this); 305 m_inventory = new SceneObjectPartInventory(this);
302 } 306 }
303 307
304 #endregion Constructors 308 #endregion Constructors
@@ -351,8 +355,8 @@ namespace OpenSim.Region.Environment.Scenes
351 /// </value> 355 /// </value>
352 public uint InventorySerial 356 public uint InventorySerial
353 { 357 {
354 get { return Inventory.Serial; } 358 get { return m_inventory.Serial; }
355 set { Inventory.Serial = value; } 359 set { m_inventory.Serial = value; }
356 } 360 }
357 361
358 /// <value> 362 /// <value>
@@ -1472,7 +1476,7 @@ if (m_shape != null) {
1472 info.AddValue("m_updateFlag", m_updateFlag); 1476 info.AddValue("m_updateFlag", m_updateFlag);
1473 info.AddValue("CreatorID", _creatorID.Guid); 1477 info.AddValue("CreatorID", _creatorID.Guid);
1474 1478
1475 info.AddValue("m_inventorySerial", Inventory.Serial); 1479 info.AddValue("m_inventorySerial", m_inventory.Serial);
1476 info.AddValue("m_uuid", m_uuid.Guid); 1480 info.AddValue("m_uuid", m_uuid.Guid);
1477 info.AddValue("m_localID", m_localId); 1481 info.AddValue("m_localID", m_localId);
1478 info.AddValue("m_name", m_name); 1482 info.AddValue("m_name", m_name);