aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs16
-rw-r--r--OpenSim/Data/MSSQL/MSSQLRegionData.cs8
-rw-r--r--OpenSim/Data/MySQL/MySQLLegacyRegionData.cs6
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs12
-rw-r--r--OpenSim/Framework/Serialization/ArchiveConstants.cs5
-rw-r--r--OpenSim/Framework/Serialization/TarArchiveWriter.cs3
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs34
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs11
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandChannel.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs252
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs233
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionCombinerLargeLandChannel.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs32
-rw-r--r--OpenSim/Region/DataSnapshot/LandSnapshot.cs18
-rw-r--r--OpenSim/Region/DataSnapshot/ObjectSnapshot.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/ILandObject.cs72
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs12
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/LOParcel.cs10
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs45
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs10
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs2
24 files changed, 429 insertions, 384 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index ef45f73..f4e1db4 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -658,9 +658,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
658 658
659 foreach (ILandObject parcel in parcels) 659 foreach (ILandObject parcel in parcels)
660 { 660 {
661 parcel.landData.Flags |= (uint) ParcelFlags.AllowVoiceChat; 661 parcel.LandData.Flags |= (uint) ParcelFlags.AllowVoiceChat;
662 parcel.landData.Flags |= (uint) ParcelFlags.UseEstateVoiceChan; 662 parcel.LandData.Flags |= (uint) ParcelFlags.UseEstateVoiceChan;
663 ((Scene)newscene).LandChannel.UpdateLandObject(parcel.landData.LocalID, parcel.landData); 663 ((Scene)newscene).LandChannel.UpdateLandObject(parcel.LandData.LocalID, parcel.LandData);
664 } 664 }
665 } 665 }
666 666
@@ -910,15 +910,15 @@ namespace OpenSim.ApplicationPlugins.RemoteController
910 { 910 {
911 if (enableVoice) 911 if (enableVoice)
912 { 912 {
913 parcel.landData.Flags |= (uint)ParcelFlags.AllowVoiceChat; 913 parcel.LandData.Flags |= (uint)ParcelFlags.AllowVoiceChat;
914 parcel.landData.Flags |= (uint)ParcelFlags.UseEstateVoiceChan; 914 parcel.LandData.Flags |= (uint)ParcelFlags.UseEstateVoiceChan;
915 } 915 }
916 else 916 else
917 { 917 {
918 parcel.landData.Flags &= ~(uint)ParcelFlags.AllowVoiceChat; 918 parcel.LandData.Flags &= ~(uint)ParcelFlags.AllowVoiceChat;
919 parcel.landData.Flags &= ~(uint)ParcelFlags.UseEstateVoiceChan; 919 parcel.LandData.Flags &= ~(uint)ParcelFlags.UseEstateVoiceChan;
920 } 920 }
921 scene.LandChannel.UpdateLandObject(parcel.landData.LocalID, parcel.landData); 921 scene.LandChannel.UpdateLandObject(parcel.LandData.LocalID, parcel.LandData);
922 } 922 }
923 } 923 }
924 924
diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
index e26a830..6318c09 100644
--- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
@@ -624,7 +624,7 @@ ELSE
624 //As the delete landaccess is already in the mysql code 624 //As the delete landaccess is already in the mysql code
625 625
626 //Delete old values 626 //Delete old values
627 RemoveLandObject(parcel.landData.GlobalID); 627 RemoveLandObject(parcel.LandData.GlobalID);
628 628
629 //Insert new values 629 //Insert new values
630 string sql = @"INSERT INTO [land] 630 string sql = @"INSERT INTO [land]
@@ -634,7 +634,7 @@ VALUES
634 634
635 using (AutoClosingSqlCommand cmd = _Database.Query(sql)) 635 using (AutoClosingSqlCommand cmd = _Database.Query(sql))
636 { 636 {
637 cmd.Parameters.AddRange(CreateLandParameters(parcel.landData, parcel.regionUUID)); 637 cmd.Parameters.AddRange(CreateLandParameters(parcel.LandData, parcel.RegionUUID));
638 638
639 cmd.ExecuteNonQuery(); 639 cmd.ExecuteNonQuery();
640 } 640 }
@@ -643,9 +643,9 @@ VALUES
643 643
644 using (AutoClosingSqlCommand cmd = _Database.Query(sql)) 644 using (AutoClosingSqlCommand cmd = _Database.Query(sql))
645 { 645 {
646 foreach (ParcelManager.ParcelAccessEntry parcelAccessEntry in parcel.landData.ParcelAccessList) 646 foreach (ParcelManager.ParcelAccessEntry parcelAccessEntry in parcel.LandData.ParcelAccessList)
647 { 647 {
648 cmd.Parameters.AddRange(CreateLandAccessParameters(parcelAccessEntry, parcel.regionUUID)); 648 cmd.Parameters.AddRange(CreateLandAccessParameters(parcelAccessEntry, parcel.RegionUUID));
649 649
650 cmd.ExecuteNonQuery(); 650 cmd.ExecuteNonQuery();
651 cmd.Parameters.Clear(); 651 cmd.Parameters.Clear();
diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
index c2dd788..f25bfd7 100644
--- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
@@ -685,7 +685,7 @@ namespace OpenSim.Data.MySQL
685 "?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " + 685 "?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " +
686 "?AuthbuyerID, ?OtherCleanTime, ?Dwell)"; 686 "?AuthbuyerID, ?OtherCleanTime, ?Dwell)";
687 687
688 FillLandCommand(cmd, parcel.landData, parcel.regionUUID); 688 FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID);
689 689
690 ExecuteNonQuery(cmd); 690 ExecuteNonQuery(cmd);
691 691
@@ -700,9 +700,9 @@ namespace OpenSim.Data.MySQL
700 "?Flags)"; 700 "?Flags)";
701 701
702 foreach (ParcelManager.ParcelAccessEntry entry in 702 foreach (ParcelManager.ParcelAccessEntry entry in
703 parcel.landData.ParcelAccessList) 703 parcel.LandData.ParcelAccessList)
704 { 704 {
705 FillLandAccessCommand(cmd, entry, parcel.landData.GlobalID); 705 FillLandAccessCommand(cmd, entry, parcel.LandData.GlobalID);
706 ExecuteNonQuery(cmd); 706 ExecuteNonQuery(cmd);
707 cmd.Parameters.Clear(); 707 cmd.Parameters.Clear();
708 } 708 }
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index d22a3ec..b246a4a 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -638,29 +638,29 @@ namespace OpenSim.Data.SQLite
638 DataTable land = ds.Tables["land"]; 638 DataTable land = ds.Tables["land"];
639 DataTable landaccesslist = ds.Tables["landaccesslist"]; 639 DataTable landaccesslist = ds.Tables["landaccesslist"];
640 640
641 DataRow landRow = land.Rows.Find(parcel.landData.GlobalID.ToString()); 641 DataRow landRow = land.Rows.Find(parcel.LandData.GlobalID.ToString());
642 if (landRow == null) 642 if (landRow == null)
643 { 643 {
644 landRow = land.NewRow(); 644 landRow = land.NewRow();
645 fillLandRow(landRow, parcel.landData, parcel.regionUUID); 645 fillLandRow(landRow, parcel.LandData, parcel.RegionUUID);
646 land.Rows.Add(landRow); 646 land.Rows.Add(landRow);
647 } 647 }
648 else 648 else
649 { 649 {
650 fillLandRow(landRow, parcel.landData, parcel.regionUUID); 650 fillLandRow(landRow, parcel.LandData, parcel.RegionUUID);
651 } 651 }
652 652
653 // I know this caused someone issues before, but OpenSim is unusable if we leave this stuff around 653 // I know this caused someone issues before, but OpenSim is unusable if we leave this stuff around
654 using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:LandUUID", m_conn)) 654 using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:LandUUID", m_conn))
655 { 655 {
656 cmd.Parameters.Add(new SqliteParameter(":LandUUID", parcel.landData.GlobalID.ToString())); 656 cmd.Parameters.Add(new SqliteParameter(":LandUUID", parcel.LandData.GlobalID.ToString()));
657 cmd.ExecuteNonQuery(); 657 cmd.ExecuteNonQuery();
658 } 658 }
659 659
660 foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.ParcelAccessList) 660 foreach (ParcelManager.ParcelAccessEntry entry in parcel.LandData.ParcelAccessList)
661 { 661 {
662 DataRow newAccessRow = landaccesslist.NewRow(); 662 DataRow newAccessRow = landaccesslist.NewRow();
663 fillLandAccessRow(newAccessRow, entry, parcel.landData.GlobalID); 663 fillLandAccessRow(newAccessRow, entry, parcel.LandData.GlobalID);
664 landaccesslist.Rows.Add(newAccessRow); 664 landaccesslist.Rows.Add(newAccessRow);
665 } 665 }
666 } 666 }
diff --git a/OpenSim/Framework/Serialization/ArchiveConstants.cs b/OpenSim/Framework/Serialization/ArchiveConstants.cs
index f6dedec..1cd80db 100644
--- a/OpenSim/Framework/Serialization/ArchiveConstants.cs
+++ b/OpenSim/Framework/Serialization/ArchiveConstants.cs
@@ -66,6 +66,11 @@ namespace OpenSim.Framework.Serialization
66 public const string SETTINGS_PATH = "settings/"; 66 public const string SETTINGS_PATH = "settings/";
67 67
68 /// <value> 68 /// <value>
69 /// Path for region settings.
70 /// </value>
71 public const string LANDDATA_PATH = "landdata/";
72
73 /// <value>
69 /// Path for user profiles 74 /// Path for user profiles
70 /// </value> 75 /// </value>
71 public const string USERS_PATH = "userprofiles/"; 76 public const string USERS_PATH = "userprofiles/";
diff --git a/OpenSim/Framework/Serialization/TarArchiveWriter.cs b/OpenSim/Framework/Serialization/TarArchiveWriter.cs
index 7040870..20d0f7e 100644
--- a/OpenSim/Framework/Serialization/TarArchiveWriter.cs
+++ b/OpenSim/Framework/Serialization/TarArchiveWriter.cs
@@ -40,6 +40,7 @@ namespace OpenSim.Framework.Serialization
40 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 40 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 41
42 protected static ASCIIEncoding m_asciiEncoding = new ASCIIEncoding(); 42 protected static ASCIIEncoding m_asciiEncoding = new ASCIIEncoding();
43 protected static UTF8Encoding m_utf8Encoding = new UTF8Encoding();
43 44
44 /// <summary> 45 /// <summary>
45 /// Binary writer for the underlying stream 46 /// Binary writer for the underlying stream
@@ -71,7 +72,7 @@ namespace OpenSim.Framework.Serialization
71 /// <param name="data"></param> 72 /// <param name="data"></param>
72 public void WriteFile(string filePath, string data) 73 public void WriteFile(string filePath, string data)
73 { 74 {
74 WriteFile(filePath, m_asciiEncoding.GetBytes(data)); 75 WriteFile(filePath, m_utf8Encoding.GetBytes(data));
75 } 76 }
76 77
77 /// <summary> 78 /// <summary>
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
index 87f137e..9387bce 100644
--- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
@@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
146 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) 146 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
147 { 147 {
148 ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); 148 ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
149 if ((obj.landData.Flags & (uint)ParcelFlags.AllowDamage) != 0) 149 if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0)
150 { 150 {
151 avatar.Invulnerable = false; 151 avatar.Invulnerable = false;
152 } 152 }
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 65f83fd..54acbc4 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -53,6 +53,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
53 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 53 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
54 54
55 private static ASCIIEncoding m_asciiEncoding = new ASCIIEncoding(); 55 private static ASCIIEncoding m_asciiEncoding = new ASCIIEncoding();
56 private static UTF8Encoding m_utf8Encoding = new UTF8Encoding();
56 57
57 private Scene m_scene; 58 private Scene m_scene;
58 private Stream m_loadStream; 59 private Stream m_loadStream;
@@ -100,6 +101,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
100 int successfulAssetRestores = 0; 101 int successfulAssetRestores = 0;
101 int failedAssetRestores = 0; 102 int failedAssetRestores = 0;
102 List<string> serialisedSceneObjects = new List<string>(); 103 List<string> serialisedSceneObjects = new List<string>();
104 List<string> serialisedParcels = new List<string>();
103 string filePath = "NONE"; 105 string filePath = "NONE";
104 106
105 try 107 try
@@ -119,7 +121,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
119 121
120 if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH)) 122 if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH))
121 { 123 {
122 serialisedSceneObjects.Add(m_asciiEncoding.GetString(data)); 124 serialisedSceneObjects.Add(m_utf8Encoding.GetString(data));
123 } 125 }
124 else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) 126 else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
125 { 127 {
@@ -136,6 +138,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver
136 { 138 {
137 LoadRegionSettings(filePath, data); 139 LoadRegionSettings(filePath, data);
138 } 140 }
141 else if (!m_merge && filePath.StartsWith(ArchiveConstants.LANDDATA_PATH))
142 {
143 serialisedParcels.Add(m_utf8Encoding.GetString(data));
144 }
139 else if (filePath == ArchiveConstants.CONTROL_FILE_PATH) 145 else if (filePath == ArchiveConstants.CONTROL_FILE_PATH)
140 { 146 {
141 LoadControlFile(filePath, data); 147 LoadControlFile(filePath, data);
@@ -169,6 +175,26 @@ namespace OpenSim.Region.CoreModules.World.Archiver
169 m_scene.DeleteAllSceneObjects(); 175 m_scene.DeleteAllSceneObjects();
170 } 176 }
171 177
178 // Try to retain the original creator/owner/lastowner if their uuid is present on this grid
179 // otherwise, use the master avatar uuid instead
180 UUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID;
181
182 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
183 masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner;
184
185 // Reload serialized parcels
186 m_log.InfoFormat("[ARCHIVER]: Loading {0} parcels. Please wait.", serialisedParcels.Count);
187 List<LandData> landData = new List<LandData>();
188 foreach (string serialisedParcel in serialisedParcels)
189 {
190 LandData parcel = LandDataSerializer.Deserialize(serialisedParcel);
191 if (!ResolveUserUuid(parcel.OwnerID))
192 parcel.OwnerID = masterAvatarId;
193 landData.Add(parcel);
194 }
195 m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData);
196 m_log.InfoFormat("[ARCHIVER]: Restored {0} parcels.", landData.Count);
197
172 // Reload serialized prims 198 // Reload serialized prims
173 m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count); 199 m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count);
174 200
@@ -198,12 +224,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
198 // to the same scene (when this is possible). 224 // to the same scene (when this is possible).
199 sceneObject.ResetIDs(); 225 sceneObject.ResetIDs();
200 226
201 // Try to retain the original creator/owner/lastowner if their uuid is present on this grid
202 // otherwise, use the master avatar uuid instead
203 UUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID;
204
205 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
206 masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner;
207 227
208 foreach (SceneObjectPart part in sceneObject.Children.Values) 228 foreach (SceneObjectPart part in sceneObject.Children.Values)
209 { 229 {
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
index a62c5b3..f039be8 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
@@ -102,6 +102,17 @@ namespace OpenSim.Region.CoreModules.World.Archiver
102 102
103 m_log.InfoFormat("[ARCHIVER]: Added region settings to archive."); 103 m_log.InfoFormat("[ARCHIVER]: Added region settings to archive.");
104 104
105 // Write out land data (aka parcel) settings
106 List<ILandObject>landObjects = m_scene.LandChannel.AllParcels();
107 foreach (ILandObject lo in landObjects)
108 {
109 LandData landData = lo.LandData;
110 string landDataPath = String.Format("{0}{1}.xml", ArchiveConstants.LANDDATA_PATH,
111 landData.GlobalID.ToString());
112 m_archiveWriter.WriteFile(landDataPath, LandDataSerializer.Serialize(landData));
113 }
114 m_log.InfoFormat("[ARCHIVER]: Added parcel settings to archive.");
115
105 // Write out terrain 116 // Write out terrain
106 string terrainPath 117 string terrainPath
107 = String.Format("{0}{1}.r32", ArchiveConstants.TERRAINS_PATH, m_scene.RegionInfo.RegionName); 118 = String.Format("{0}{1}.r32", ArchiveConstants.TERRAINS_PATH, m_scene.RegionInfo.RegionName);
diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
index 8767332..4ed23bb 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
@@ -82,7 +82,7 @@ namespace OpenSim.Region.CoreModules.World.Land
82 } 82 }
83 83
84 ILandObject obj = new LandObject(UUID.Zero, false, m_scene); 84 ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
85 obj.landData.Name = "NO LAND"; 85 obj.LandData.Name = "NO LAND";
86 return obj; 86 return obj;
87 } 87 }
88 88
@@ -103,7 +103,7 @@ namespace OpenSim.Region.CoreModules.World.Land
103 } 103 }
104 104
105 ILandObject obj = new LandObject(UUID.Zero, false, m_scene); 105 ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
106 obj.landData.Name = "NO LAND"; 106 obj.LandData.Name = "NO LAND";
107 return obj; 107 return obj;
108 } 108 }
109 109
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index fdff61e..d2b5cb1 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -47,9 +47,9 @@ namespace OpenSim.Region.CoreModules.World.Land
47{ 47{
48 // used for caching 48 // used for caching
49 internal class ExtendedLandData { 49 internal class ExtendedLandData {
50 public LandData landData; 50 public LandData LandData;
51 public ulong regionHandle; 51 public ulong RegionHandle;
52 public uint x, y; 52 public uint X, Y;
53 } 53 }
54 54
55 public class LandManagementModule : INonSharedRegionModule 55 public class LandManagementModule : INonSharedRegionModule
@@ -191,7 +191,7 @@ namespace OpenSim.Region.CoreModules.World.Land
191 { 191 {
192 if (m_landList.ContainsKey(local_id)) 192 if (m_landList.ContainsKey(local_id))
193 { 193 {
194 m_landList[local_id].landData = newData; 194 m_landList[local_id].LandData = newData;
195 m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, m_landList[local_id]); 195 m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, m_landList[local_id]);
196 } 196 }
197 } 197 }
@@ -218,12 +218,12 @@ namespace OpenSim.Region.CoreModules.World.Land
218 218
219 ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); 219 ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene);
220 220
221 fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); 221 fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
222 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) 222 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
223 fullSimParcel.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; 223 fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
224 else 224 else
225 fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; 225 fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
226 fullSimParcel.landData.ClaimDate = Util.UnixTimeSinceEpoch(); 226 fullSimParcel.LandData.ClaimDate = Util.UnixTimeSinceEpoch();
227 AddLandObject(fullSimParcel); 227 AddLandObject(fullSimParcel);
228 } 228 }
229 229
@@ -289,11 +289,11 @@ namespace OpenSim.Region.CoreModules.World.Land
289 { 289 {
290 if (avatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT) 290 if (avatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT)
291 { 291 {
292 if (parcelAvatarIsEntering.isBannedFromLand(avatar.UUID)) 292 if (parcelAvatarIsEntering.IsBannedFromLand(avatar.UUID))
293 { 293 {
294 SendYouAreBannedNotice(avatar); 294 SendYouAreBannedNotice(avatar);
295 } 295 }
296 else if (parcelAvatarIsEntering.isRestrictedFromLand(avatar.UUID)) 296 else if (parcelAvatarIsEntering.IsRestrictedFromLand(avatar.UUID))
297 { 297 {
298 avatar.ControllingClient.SendAlertMessage( 298 avatar.ControllingClient.SendAlertMessage(
299 "You are not allowed on this parcel because the land owner has restricted access. For now, you can enter, but please respect the land owner's decisions (or he can ban you!)."); 299 "You are not allowed on this parcel because the land owner has restricted access. For now, you can enter, but please respect the land owner's decisions (or he can ban you!).");
@@ -321,14 +321,14 @@ namespace OpenSim.Region.CoreModules.World.Land
321 List<ILandObject> checkLandParcels = ParcelsNearPoint(presence.AbsolutePosition); 321 List<ILandObject> checkLandParcels = ParcelsNearPoint(presence.AbsolutePosition);
322 foreach (ILandObject checkBan in checkLandParcels) 322 foreach (ILandObject checkBan in checkLandParcels)
323 { 323 {
324 if (checkBan.isBannedFromLand(avatar.AgentId)) 324 if (checkBan.IsBannedFromLand(avatar.AgentId))
325 { 325 {
326 checkBan.sendLandProperties((int)ParcelPropertiesStatus.CollisionBanned, false, (int)ParcelResult.Single, avatar); 326 checkBan.SendLandProperties((int)ParcelPropertiesStatus.CollisionBanned, false, (int)ParcelResult.Single, avatar);
327 return; //Only send one 327 return; //Only send one
328 } 328 }
329 if (checkBan.isRestrictedFromLand(avatar.AgentId)) 329 if (checkBan.IsRestrictedFromLand(avatar.AgentId))
330 { 330 {
331 checkBan.sendLandProperties((int)ParcelPropertiesStatus.CollisionNotOnAccessList, false, (int)ParcelResult.Single, avatar); 331 checkBan.SendLandProperties((int)ParcelPropertiesStatus.CollisionNotOnAccessList, false, (int)ParcelResult.Single, avatar);
332 return; //Only send one 332 return; //Only send one
333 } 333 }
334 } 334 }
@@ -348,19 +348,19 @@ namespace OpenSim.Region.CoreModules.World.Land
348 { 348 {
349 if (!avatar.IsChildAgent) 349 if (!avatar.IsChildAgent)
350 { 350 {
351 over.sendLandUpdateToClient(avatar.ControllingClient); 351 over.SendLandUpdateToClient(avatar.ControllingClient);
352 m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.LocalID, 352 m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID,
353 m_scene.RegionInfo.RegionID); 353 m_scene.RegionInfo.RegionID);
354 } 354 }
355 } 355 }
356 356
357 if (avatar.currentParcelUUID != over.landData.GlobalID) 357 if (avatar.currentParcelUUID != over.LandData.GlobalID)
358 { 358 {
359 if (!avatar.IsChildAgent) 359 if (!avatar.IsChildAgent)
360 { 360 {
361 over.sendLandUpdateToClient(avatar.ControllingClient); 361 over.SendLandUpdateToClient(avatar.ControllingClient);
362 avatar.currentParcelUUID = over.landData.GlobalID; 362 avatar.currentParcelUUID = over.LandData.GlobalID;
363 m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.LocalID, 363 m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID,
364 m_scene.RegionInfo.RegionID); 364 m_scene.RegionInfo.RegionID);
365 } 365 }
366 } 366 }
@@ -386,16 +386,16 @@ namespace OpenSim.Region.CoreModules.World.Land
386 if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && 386 if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
387 clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) 387 clientAvatar.sentMessageAboutRestrictedParcelFlyingDown)
388 { 388 {
389 EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.landData.LocalID, 389 EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID,
390 m_scene.RegionInfo.RegionID); 390 m_scene.RegionInfo.RegionID);
391 //They are going under the safety line! 391 //They are going under the safety line!
392 if (!parcel.isBannedFromLand(clientAvatar.UUID)) 392 if (!parcel.IsBannedFromLand(clientAvatar.UUID))
393 { 393 {
394 clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false; 394 clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false;
395 } 395 }
396 } 396 }
397 else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && 397 else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
398 parcel.isBannedFromLand(clientAvatar.UUID)) 398 parcel.IsBannedFromLand(clientAvatar.UUID))
399 { 399 {
400 SendYouAreBannedNotice(clientAvatar); 400 SendYouAreBannedNotice(clientAvatar);
401 } 401 }
@@ -409,7 +409,7 @@ namespace OpenSim.Region.CoreModules.World.Land
409 ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); 409 ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
410 if (over != null) 410 if (over != null)
411 { 411 {
412 if (!over.isBannedFromLand(avatar.UUID) || avatar.AbsolutePosition.Z >= LandChannel.BAN_LINE_SAFETY_HIEGHT) 412 if (!over.IsBannedFromLand(avatar.UUID) || avatar.AbsolutePosition.Z >= LandChannel.BAN_LINE_SAFETY_HIEGHT)
413 { 413 {
414 avatar.lastKnownAllowedPosition = 414 avatar.lastKnownAllowedPosition =
415 new Vector3(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z); 415 new Vector3(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z);
@@ -429,7 +429,7 @@ namespace OpenSim.Region.CoreModules.World.Land
429 429
430 if (land != null) 430 if (land != null)
431 { 431 {
432 m_landList[landLocalID].sendAccessList(agentID, sessionID, flags, sequenceID, remote_client); 432 m_landList[landLocalID].SendAccessList(agentID, sessionID, flags, sequenceID, remote_client);
433 } 433 }
434 } 434 }
435 435
@@ -445,9 +445,9 @@ namespace OpenSim.Region.CoreModules.World.Land
445 445
446 if (land != null) 446 if (land != null)
447 { 447 {
448 if (agentID == land.landData.OwnerID) 448 if (agentID == land.LandData.OwnerID)
449 { 449 {
450 land.updateAccessList(flags, entries, remote_client); 450 land.UpdateAccessList(flags, entries, remote_client);
451 } 451 }
452 } 452 }
453 else 453 else
@@ -476,9 +476,9 @@ namespace OpenSim.Region.CoreModules.World.Land
476 lock (m_landList) 476 lock (m_landList)
477 { 477 {
478 int newLandLocalID = ++m_lastLandLocalID; 478 int newLandLocalID = ++m_lastLandLocalID;
479 new_land.landData.LocalID = newLandLocalID; 479 new_land.LandData.LocalID = newLandLocalID;
480 480
481 bool[,] landBitmap = new_land.getLandBitmap(); 481 bool[,] landBitmap = new_land.GetLandBitmap();
482 for (int x = 0; x < landArrayMax; x++) 482 for (int x = 0; x < landArrayMax; x++)
483 { 483 {
484 for (int y = 0; y < landArrayMax; y++) 484 for (int y = 0; y < landArrayMax; y++)
@@ -493,7 +493,7 @@ namespace OpenSim.Region.CoreModules.World.Land
493 m_landList.Add(newLandLocalID, new_land); 493 m_landList.Add(newLandLocalID, new_land);
494 } 494 }
495 495
496 new_land.forceUpdateLandInfo(); 496 new_land.ForceUpdateLandInfo();
497 m_scene.EventManager.TriggerLandObjectAdded(new_land); 497 m_scene.EventManager.TriggerLandObjectAdded(new_land);
498 return new_land; 498 return new_land;
499 } 499 }
@@ -520,14 +520,14 @@ namespace OpenSim.Region.CoreModules.World.Land
520 } 520 }
521 } 521 }
522 522
523 m_scene.EventManager.TriggerLandObjectRemoved(m_landList[local_id].landData.GlobalID); 523 m_scene.EventManager.TriggerLandObjectRemoved(m_landList[local_id].LandData.GlobalID);
524 m_landList.Remove(local_id); 524 m_landList.Remove(local_id);
525 } 525 }
526 } 526 }
527 527
528 private void performFinalLandJoin(ILandObject master, ILandObject slave) 528 private void performFinalLandJoin(ILandObject master, ILandObject slave)
529 { 529 {
530 bool[,] landBitmapSlave = slave.getLandBitmap(); 530 bool[,] landBitmapSlave = slave.GetLandBitmap();
531 lock (m_landList) 531 lock (m_landList)
532 { 532 {
533 for (int x = 0; x < 64; x++) 533 for (int x = 0; x < 64; x++)
@@ -536,14 +536,14 @@ namespace OpenSim.Region.CoreModules.World.Land
536 { 536 {
537 if (landBitmapSlave[x, y]) 537 if (landBitmapSlave[x, y])
538 { 538 {
539 m_landIDList[x, y] = master.landData.LocalID; 539 m_landIDList[x, y] = master.LandData.LocalID;
540 } 540 }
541 } 541 }
542 } 542 }
543 } 543 }
544 544
545 removeLandObject(slave.landData.LocalID); 545 removeLandObject(slave.LandData.LocalID);
546 UpdateLandObject(master.landData.LocalID, master.landData); 546 UpdateLandObject(master.LandData.LocalID, master.LandData);
547 } 547 }
548 548
549 public ILandObject GetLandObject(int parcelLocalID) 549 public ILandObject GetLandObject(int parcelLocalID)
@@ -630,7 +630,7 @@ namespace OpenSim.Region.CoreModules.World.Land
630 { 630 {
631 foreach (LandObject p in m_landList.Values) 631 foreach (LandObject p in m_landList.Values)
632 { 632 {
633 p.resetLandPrimCounts(); 633 p.ResetLandPrimCounts();
634 } 634 }
635 } 635 }
636 } 636 }
@@ -651,7 +651,7 @@ namespace OpenSim.Region.CoreModules.World.Land
651 ILandObject landUnderPrim = GetLandObject(position.X, position.Y); 651 ILandObject landUnderPrim = GetLandObject(position.X, position.Y);
652 if (landUnderPrim != null) 652 if (landUnderPrim != null)
653 { 653 {
654 landUnderPrim.addPrimToCount(obj); 654 landUnderPrim.AddPrimToCount(obj);
655 } 655 }
656 } 656 }
657 657
@@ -662,7 +662,7 @@ namespace OpenSim.Region.CoreModules.World.Land
662 { 662 {
663 foreach (LandObject p in m_landList.Values) 663 foreach (LandObject p in m_landList.Values)
664 { 664 {
665 p.removePrimFromCount(obj); 665 p.RemovePrimFromCount(obj);
666 } 666 }
667 } 667 }
668 } 668 }
@@ -675,15 +675,15 @@ namespace OpenSim.Region.CoreModules.World.Land
675 { 675 {
676 foreach (LandObject p in m_landList.Values) 676 foreach (LandObject p in m_landList.Values)
677 { 677 {
678 if (!landOwnersAndParcels.ContainsKey(p.landData.OwnerID)) 678 if (!landOwnersAndParcels.ContainsKey(p.LandData.OwnerID))
679 { 679 {
680 List<LandObject> tempList = new List<LandObject>(); 680 List<LandObject> tempList = new List<LandObject>();
681 tempList.Add(p); 681 tempList.Add(p);
682 landOwnersAndParcels.Add(p.landData.OwnerID, tempList); 682 landOwnersAndParcels.Add(p.LandData.OwnerID, tempList);
683 } 683 }
684 else 684 else
685 { 685 {
686 landOwnersAndParcels[p.landData.OwnerID].Add(p); 686 landOwnersAndParcels[p.LandData.OwnerID].Add(p);
687 } 687 }
688 } 688 }
689 } 689 }
@@ -694,15 +694,15 @@ namespace OpenSim.Region.CoreModules.World.Land
694 int simPrims = 0; 694 int simPrims = 0;
695 foreach (LandObject p in landOwnersAndParcels[owner]) 695 foreach (LandObject p in landOwnersAndParcels[owner])
696 { 696 {
697 simArea += p.landData.Area; 697 simArea += p.LandData.Area;
698 simPrims += p.landData.OwnerPrims + p.landData.OtherPrims + p.landData.GroupPrims + 698 simPrims += p.LandData.OwnerPrims + p.LandData.OtherPrims + p.LandData.GroupPrims +
699 p.landData.SelectedPrims; 699 p.LandData.SelectedPrims;
700 } 700 }
701 701
702 foreach (LandObject p in landOwnersAndParcels[owner]) 702 foreach (LandObject p in landOwnersAndParcels[owner])
703 { 703 {
704 p.landData.SimwideArea = simArea; 704 p.LandData.SimwideArea = simArea;
705 p.landData.SimwidePrims = simPrims; 705 p.LandData.SimwidePrims = simPrims;
706 } 706 }
707 } 707 }
708 } 708 }
@@ -779,26 +779,26 @@ namespace OpenSim.Region.CoreModules.World.Land
779 779
780 //Lets create a new land object with bitmap activated at that point (keeping the old land objects info) 780 //Lets create a new land object with bitmap activated at that point (keeping the old land objects info)
781 ILandObject newLand = startLandObject.Copy(); 781 ILandObject newLand = startLandObject.Copy();
782 newLand.landData.Name = newLand.landData.Name; 782 newLand.LandData.Name = newLand.LandData.Name;
783 newLand.landData.GlobalID = UUID.Random(); 783 newLand.LandData.GlobalID = UUID.Random();
784 784
785 newLand.setLandBitmap(newLand.getSquareLandBitmap(start_x, start_y, end_x, end_y)); 785 newLand.SetLandBitmap(newLand.GetSquareLandBitmap(start_x, start_y, end_x, end_y));
786 786
787 //Now, lets set the subdivision area of the original to false 787 //Now, lets set the subdivision area of the original to false
788 int startLandObjectIndex = startLandObject.landData.LocalID; 788 int startLandObjectIndex = startLandObject.LandData.LocalID;
789 lock (m_landList) 789 lock (m_landList)
790 { 790 {
791 m_landList[startLandObjectIndex].setLandBitmap( 791 m_landList[startLandObjectIndex].SetLandBitmap(
792 newLand.modifyLandBitmapSquare(startLandObject.getLandBitmap(), start_x, start_y, end_x, end_y, false)); 792 newLand.ModifyLandBitmapSquare(startLandObject.GetLandBitmap(), start_x, start_y, end_x, end_y, false));
793 m_landList[startLandObjectIndex].forceUpdateLandInfo(); 793 m_landList[startLandObjectIndex].ForceUpdateLandInfo();
794 } 794 }
795 795
796 EventManagerOnParcelPrimCountTainted(); 796 EventManagerOnParcelPrimCountTainted();
797 797
798 //Now add the new land object 798 //Now add the new land object
799 ILandObject result = AddLandObject(newLand); 799 ILandObject result = AddLandObject(newLand);
800 UpdateLandObject(startLandObject.landData.LocalID, startLandObject.landData); 800 UpdateLandObject(startLandObject.LandData.LocalID, startLandObject.LandData);
801 result.sendLandUpdateToAvatarsOverMe(); 801 result.SendLandUpdateToAvatarsOverMe();
802 } 802 }
803 803
804 /// <summary> 804 /// <summary>
@@ -846,7 +846,7 @@ namespace OpenSim.Region.CoreModules.World.Land
846 } 846 }
847 foreach (ILandObject p in selectedLandObjects) 847 foreach (ILandObject p in selectedLandObjects)
848 { 848 {
849 if (p.landData.OwnerID != masterLandObject.landData.OwnerID) 849 if (p.LandData.OwnerID != masterLandObject.LandData.OwnerID)
850 { 850 {
851 return; 851 return;
852 } 852 }
@@ -856,14 +856,14 @@ namespace OpenSim.Region.CoreModules.World.Land
856 { 856 {
857 foreach (ILandObject slaveLandObject in selectedLandObjects) 857 foreach (ILandObject slaveLandObject in selectedLandObjects)
858 { 858 {
859 m_landList[masterLandObject.landData.LocalID].setLandBitmap( 859 m_landList[masterLandObject.LandData.LocalID].SetLandBitmap(
860 slaveLandObject.mergeLandBitmaps(masterLandObject.getLandBitmap(), slaveLandObject.getLandBitmap())); 860 slaveLandObject.MergeLandBitmaps(masterLandObject.GetLandBitmap(), slaveLandObject.GetLandBitmap()));
861 performFinalLandJoin(masterLandObject, slaveLandObject); 861 performFinalLandJoin(masterLandObject, slaveLandObject);
862 } 862 }
863 } 863 }
864 EventManagerOnParcelPrimCountTainted(); 864 EventManagerOnParcelPrimCountTainted();
865 865
866 masterLandObject.sendLandUpdateToAvatarsOverMe(); 866 masterLandObject.SendLandUpdateToAvatarsOverMe();
867 } 867 }
868 868
869 #endregion 869 #endregion
@@ -894,19 +894,19 @@ namespace OpenSim.Region.CoreModules.World.Land
894 894
895 if (currentParcelBlock != null) 895 if (currentParcelBlock != null)
896 { 896 {
897 if (currentParcelBlock.landData.OwnerID == remote_client.AgentId) 897 if (currentParcelBlock.LandData.OwnerID == remote_client.AgentId)
898 { 898 {
899 //Owner Flag 899 //Owner Flag
900 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER); 900 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER);
901 } 901 }
902 else if (currentParcelBlock.landData.SalePrice > 0 && 902 else if (currentParcelBlock.LandData.SalePrice > 0 &&
903 (currentParcelBlock.landData.AuthBuyerID == UUID.Zero || 903 (currentParcelBlock.LandData.AuthBuyerID == UUID.Zero ||
904 currentParcelBlock.landData.AuthBuyerID == remote_client.AgentId)) 904 currentParcelBlock.LandData.AuthBuyerID == remote_client.AgentId))
905 { 905 {
906 //Sale Flag 906 //Sale Flag
907 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_IS_FOR_SALE); 907 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_IS_FOR_SALE);
908 } 908 }
909 else if (currentParcelBlock.landData.OwnerID == UUID.Zero) 909 else if (currentParcelBlock.LandData.OwnerID == UUID.Zero)
910 { 910 {
911 //Public Flag 911 //Public Flag
912 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC); 912 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC);
@@ -980,7 +980,7 @@ namespace OpenSim.Region.CoreModules.World.Land
980 { 980 {
981 if (!temp.Contains(currentParcel)) 981 if (!temp.Contains(currentParcel))
982 { 982 {
983 currentParcel.forceUpdateLandInfo(); 983 currentParcel.ForceUpdateLandInfo();
984 temp.Add(currentParcel); 984 temp.Add(currentParcel);
985 } 985 }
986 } 986 }
@@ -996,7 +996,7 @@ namespace OpenSim.Region.CoreModules.World.Land
996 996
997 for (int i = 0; i < temp.Count; i++) 997 for (int i = 0; i < temp.Count; i++)
998 { 998 {
999 temp[i].sendLandProperties(sequence_id, snap_selection, requestResult, remote_client); 999 temp[i].SendLandProperties(sequence_id, snap_selection, requestResult, remote_client);
1000 } 1000 }
1001 1001
1002 SendParcelOverlay(remote_client); 1002 SendParcelOverlay(remote_client);
@@ -1010,7 +1010,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1010 m_landList.TryGetValue(localID, out land); 1010 m_landList.TryGetValue(localID, out land);
1011 } 1011 }
1012 1012
1013 if (land != null) land.updateLandProperties(args, remote_client); 1013 if (land != null) land.UpdateLandProperties(args, remote_client);
1014 } 1014 }
1015 1015
1016 public void ClientOnParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client) 1016 public void ClientOnParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client)
@@ -1026,7 +1026,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1026 public void ClientOnParcelSelectObjects(int local_id, int request_type, 1026 public void ClientOnParcelSelectObjects(int local_id, int request_type,
1027 List<UUID> returnIDs, IClientAPI remote_client) 1027 List<UUID> returnIDs, IClientAPI remote_client)
1028 { 1028 {
1029 m_landList[local_id].sendForceObjectSelect(local_id, request_type, returnIDs, remote_client); 1029 m_landList[local_id].SendForceObjectSelect(local_id, request_type, returnIDs, remote_client);
1030 } 1030 }
1031 1031
1032 public void ClientOnParcelObjectOwnerRequest(int local_id, IClientAPI remote_client) 1032 public void ClientOnParcelObjectOwnerRequest(int local_id, IClientAPI remote_client)
@@ -1039,7 +1039,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1039 1039
1040 if (land != null) 1040 if (land != null)
1041 { 1041 {
1042 m_landList[local_id].sendLandObjectOwners(remote_client); 1042 m_landList[local_id].SendLandObjectOwners(remote_client);
1043 } 1043 }
1044 else 1044 else
1045 { 1045 {
@@ -1059,10 +1059,10 @@ namespace OpenSim.Region.CoreModules.World.Land
1059 { 1059 {
1060 if (m_scene.Permissions.IsGod(remote_client.AgentId)) 1060 if (m_scene.Permissions.IsGod(remote_client.AgentId))
1061 { 1061 {
1062 land.landData.OwnerID = ownerID; 1062 land.LandData.OwnerID = ownerID;
1063 1063
1064 m_scene.Broadcast(SendParcelOverlay); 1064 m_scene.Broadcast(SendParcelOverlay);
1065 land.sendLandUpdateToClient(remote_client); 1065 land.SendLandUpdateToClient(remote_client);
1066 } 1066 }
1067 } 1067 }
1068 } 1068 }
@@ -1080,11 +1080,11 @@ namespace OpenSim.Region.CoreModules.World.Land
1080 if (m_scene.Permissions.CanAbandonParcel(remote_client.AgentId, land)) 1080 if (m_scene.Permissions.CanAbandonParcel(remote_client.AgentId, land))
1081 { 1081 {
1082 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) 1082 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
1083 land.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; 1083 land.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
1084 else 1084 else
1085 land.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; 1085 land.LandData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
1086 m_scene.Broadcast(SendParcelOverlay); 1086 m_scene.Broadcast(SendParcelOverlay);
1087 land.sendLandUpdateToClient(remote_client); 1087 land.SendLandUpdateToClient(remote_client);
1088 } 1088 }
1089 } 1089 }
1090 } 1090 }
@@ -1102,13 +1102,13 @@ namespace OpenSim.Region.CoreModules.World.Land
1102 if (m_scene.Permissions.CanReclaimParcel(remote_client.AgentId, land)) 1102 if (m_scene.Permissions.CanReclaimParcel(remote_client.AgentId, land))
1103 { 1103 {
1104 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) 1104 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
1105 land.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; 1105 land.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
1106 else 1106 else
1107 land.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; 1107 land.LandData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
1108 land.landData.ClaimDate = Util.UnixTimeSinceEpoch(); 1108 land.LandData.ClaimDate = Util.UnixTimeSinceEpoch();
1109 land.landData.IsGroupOwned = false; 1109 land.LandData.IsGroupOwned = false;
1110 m_scene.Broadcast(SendParcelOverlay); 1110 m_scene.Broadcast(SendParcelOverlay);
1111 land.sendLandUpdateToClient(remote_client); 1111 land.SendLandUpdateToClient(remote_client);
1112 } 1112 }
1113 } 1113 }
1114 } 1114 }
@@ -1130,7 +1130,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1130 1130
1131 if (land != null) 1131 if (land != null)
1132 { 1132 {
1133 land.updateLandSold(e.agentId, e.groupId, e.groupOwned, (uint)e.transactionID, e.parcelPrice, e.parcelArea); 1133 land.UpdateLandSold(e.agentId, e.groupId, e.groupOwned, (uint)e.transactionID, e.parcelPrice, e.parcelArea);
1134 } 1134 }
1135 } 1135 }
1136 } 1136 }
@@ -1151,11 +1151,11 @@ namespace OpenSim.Region.CoreModules.World.Land
1151 1151
1152 if (lob != null) 1152 if (lob != null)
1153 { 1153 {
1154 UUID AuthorizedID = lob.landData.AuthBuyerID; 1154 UUID AuthorizedID = lob.LandData.AuthBuyerID;
1155 int saleprice = lob.landData.SalePrice; 1155 int saleprice = lob.LandData.SalePrice;
1156 UUID pOwnerID = lob.landData.OwnerID; 1156 UUID pOwnerID = lob.LandData.OwnerID;
1157 1157
1158 bool landforsale = ((lob.landData.Flags & 1158 bool landforsale = ((lob.LandData.Flags &
1159 (uint)(ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects)) != 0); 1159 (uint)(ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects)) != 0);
1160 if ((AuthorizedID == UUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale) 1160 if ((AuthorizedID == UUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale)
1161 { 1161 {
@@ -1184,7 +1184,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1184 1184
1185 if (land != null) 1185 if (land != null)
1186 { 1186 {
1187 land.deedToGroup(groupID); 1187 land.DeedToGroup(groupID);
1188 } 1188 }
1189 1189
1190 } 1190 }
@@ -1203,8 +1203,8 @@ namespace OpenSim.Region.CoreModules.World.Land
1203 public void IncomingLandObjectFromStorage(LandData data) 1203 public void IncomingLandObjectFromStorage(LandData data)
1204 { 1204 {
1205 ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene); 1205 ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
1206 new_land.landData = data.Copy(); 1206 new_land.LandData = data.Copy();
1207 new_land.setLandBitmapFromByteArray(); 1207 new_land.SetLandBitmapFromByteArray();
1208 AddLandObject(new_land); 1208 AddLandObject(new_land);
1209 } 1209 }
1210 1210
@@ -1218,7 +1218,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1218 1218
1219 if (selectedParcel == null) return; 1219 if (selectedParcel == null) return;
1220 1220
1221 selectedParcel.returnLandObjects(returnType, agentIDs, taskIDs, remoteClient); 1221 selectedParcel.ReturnLandObjects(returnType, agentIDs, taskIDs, remoteClient);
1222 } 1222 }
1223 1223
1224 public void EventManagerOnNoLandDataFromStorage() 1224 public void EventManagerOnNoLandDataFromStorage()
@@ -1234,7 +1234,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1234 { 1234 {
1235 foreach (LandObject obj in m_landList.Values) 1235 foreach (LandObject obj in m_landList.Values)
1236 { 1236 {
1237 obj.setParcelObjectMaxOverride(overrideDel); 1237 obj.SetParcelObjectMaxOverride(overrideDel);
1238 } 1238 }
1239 } 1239 }
1240 } 1240 }
@@ -1337,7 +1337,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1337 return; 1337 return;
1338 } 1338 }
1339 1339
1340 remoteClient.SendParcelDwellReply(localID, selectedParcel.landData.GlobalID, selectedParcel.landData.Dwell); 1340 remoteClient.SendParcelDwellReply(localID, selectedParcel.LandData.GlobalID, selectedParcel.LandData.Dwell);
1341 } 1341 }
1342 1342
1343 private void ClientOnParcelInfoRequest(IClientAPI remoteClient, UUID parcelID) 1343 private void ClientOnParcelInfoRequest(IClientAPI remoteClient, UUID parcelID)
@@ -1345,39 +1345,43 @@ namespace OpenSim.Region.CoreModules.World.Land
1345 if (parcelID == UUID.Zero) 1345 if (parcelID == UUID.Zero)
1346 return; 1346 return;
1347 1347
1348 ExtendedLandData data = (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), delegate(string id) { 1348 ExtendedLandData data =
1349 UUID parcel = UUID.Zero; 1349 (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(),
1350 UUID.TryParse(id, out parcel); 1350 delegate(string id)
1351 // assume we've got the parcelID we just computed in RemoteParcelRequest 1351 {
1352 ExtendedLandData extLandData = new ExtendedLandData(); 1352 UUID parcel = UUID.Zero;
1353 Util.ParseFakeParcelID(parcel, out extLandData.regionHandle, out extLandData.x, out extLandData.y); 1353 UUID.TryParse(id, out parcel);
1354 m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", 1354 // assume we've got the parcelID we just computed in RemoteParcelRequest
1355 extLandData.regionHandle, extLandData.x, extLandData.y); 1355 ExtendedLandData extLandData = new ExtendedLandData();
1356 1356 Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle,
1357 // for this region or for somewhere else? 1357 out extLandData.X, out extLandData.Y);
1358 if (extLandData.regionHandle == m_scene.RegionInfo.RegionHandle) 1358 m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}",
1359 { 1359 extLandData.RegionHandle, extLandData.X, extLandData.Y);
1360 extLandData.landData = this.GetLandObject(extLandData.x, extLandData.y).landData; 1360
1361 } 1361 // for this region or for somewhere else?
1362 else 1362 if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle)
1363 { 1363 {
1364 ILandService landService = m_scene.RequestModuleInterface<ILandService>(); 1364 extLandData.LandData = this.GetLandObject(extLandData.X, extLandData.Y).LandData;
1365 extLandData.landData = landService.GetLandData(extLandData.regionHandle, 1365 }
1366 extLandData.x, 1366 else
1367 extLandData.y); 1367 {
1368 if (extLandData.landData == null) 1368 ILandService landService = m_scene.RequestModuleInterface<ILandService>();
1369 { 1369 extLandData.LandData = landService.GetLandData(extLandData.RegionHandle,
1370 // we didn't find the region/land => don't cache 1370 extLandData.X,
1371 return null; 1371 extLandData.Y);
1372 } 1372 if (extLandData.LandData == null)
1373 } 1373 {
1374 return extLandData; 1374 // we didn't find the region/land => don't cache
1375 }); 1375 return null;
1376 }
1377 }
1378 return extLandData;
1379 });
1376 1380
1377 if (data != null) // if we found some data, send it 1381 if (data != null) // if we found some data, send it
1378 { 1382 {
1379 GridRegion info; 1383 GridRegion info;
1380 if (data.regionHandle == m_scene.RegionInfo.RegionHandle) 1384 if (data.RegionHandle == m_scene.RegionInfo.RegionHandle)
1381 { 1385 {
1382 info = new GridRegion(m_scene.RegionInfo); 1386 info = new GridRegion(m_scene.RegionInfo);
1383 } 1387 }
@@ -1385,18 +1389,18 @@ namespace OpenSim.Region.CoreModules.World.Land
1385 { 1389 {
1386 // most likely still cached from building the extLandData entry 1390 // most likely still cached from building the extLandData entry
1387 uint x = 0, y = 0; 1391 uint x = 0, y = 0;
1388 Utils.LongToUInts(data.regionHandle, out x, out y); 1392 Utils.LongToUInts(data.RegionHandle, out x, out y);
1389 info = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); 1393 info = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
1390 } 1394 }
1391 // we need to transfer the fake parcelID, not the one in landData, so the viewer can match it to the landmark. 1395 // we need to transfer the fake parcelID, not the one in landData, so the viewer can match it to the landmark.
1392 m_log.DebugFormat("[LAND] got parcelinfo for parcel {0} in region {1}; sending...", 1396 m_log.DebugFormat("[LAND] got parcelinfo for parcel {0} in region {1}; sending...",
1393 data.landData.Name, data.regionHandle); 1397 data.LandData.Name, data.RegionHandle);
1394 // HACK for now 1398 // HACK for now
1395 RegionInfo r = new RegionInfo(); 1399 RegionInfo r = new RegionInfo();
1396 r.RegionName = info.RegionName; 1400 r.RegionName = info.RegionName;
1397 r.RegionLocX = (uint)info.RegionLocX; 1401 r.RegionLocX = (uint)info.RegionLocX;
1398 r.RegionLocY = (uint)info.RegionLocY; 1402 r.RegionLocY = (uint)info.RegionLocY;
1399 remoteClient.SendParcelInfo(r, data.landData, parcelID, data.x, data.y); 1403 remoteClient.SendParcelInfo(r, data.LandData, parcelID, data.X, data.Y);
1400 } 1404 }
1401 else 1405 else
1402 m_log.Debug("[LAND] got no parcelinfo; not sending"); 1406 m_log.Debug("[LAND] got no parcelinfo; not sending");
@@ -1415,9 +1419,9 @@ namespace OpenSim.Region.CoreModules.World.Land
1415 if (!m_scene.Permissions.CanEditParcel(remoteClient.AgentId, land)) 1419 if (!m_scene.Permissions.CanEditParcel(remoteClient.AgentId, land))
1416 return; 1420 return;
1417 1421
1418 land.landData.OtherCleanTime = otherCleanTime; 1422 land.LandData.OtherCleanTime = otherCleanTime;
1419 1423
1420 UpdateLandObject(localID, land.landData); 1424 UpdateLandObject(localID, land.LandData);
1421 } 1425 }
1422 } 1426 }
1423} 1427}
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 3be5f45..b9b7da5 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.World.Land
53 protected Scene m_scene; 53 protected Scene m_scene;
54 protected List<SceneObjectGroup> primsOverMe = new List<SceneObjectGroup>(); 54 protected List<SceneObjectGroup> primsOverMe = new List<SceneObjectGroup>();
55 55
56 public bool[,] landBitmap 56 public bool[,] LandBitmap
57 { 57 {
58 get { return m_landBitmap; } 58 get { return m_landBitmap; }
59 set { m_landBitmap = value; } 59 set { m_landBitmap = value; }
@@ -63,14 +63,14 @@ namespace OpenSim.Region.CoreModules.World.Land
63 63
64 #region ILandObject Members 64 #region ILandObject Members
65 65
66 public LandData landData 66 public LandData LandData
67 { 67 {
68 get { return m_landData; } 68 get { return m_landData; }
69 69
70 set { m_landData = value; } 70 set { m_landData = value; }
71 } 71 }
72 72
73 public UUID regionUUID 73 public UUID RegionUUID
74 { 74 {
75 get { return m_scene.RegionInfo.RegionID; } 75 get { return m_scene.RegionInfo.RegionID; }
76 } 76 }
@@ -80,8 +80,8 @@ namespace OpenSim.Region.CoreModules.World.Land
80 public LandObject(UUID owner_id, bool is_group_owned, Scene scene) 80 public LandObject(UUID owner_id, bool is_group_owned, Scene scene)
81 { 81 {
82 m_scene = scene; 82 m_scene = scene;
83 landData.OwnerID = owner_id; 83 LandData.OwnerID = owner_id;
84 landData.IsGroupOwned = is_group_owned; 84 LandData.IsGroupOwned = is_group_owned;
85 } 85 }
86 86
87 #endregion 87 #endregion
@@ -96,11 +96,11 @@ namespace OpenSim.Region.CoreModules.World.Land
96 /// <param name="x"></param> 96 /// <param name="x"></param>
97 /// <param name="y"></param> 97 /// <param name="y"></param>
98 /// <returns>Returns true if the piece of land contains the specified point</returns> 98 /// <returns>Returns true if the piece of land contains the specified point</returns>
99 public bool containsPoint(int x, int y) 99 public bool ContainsPoint(int x, int y)
100 { 100 {
101 if (x >= 0 && y >= 0 && x <= Constants.RegionSize && x <= Constants.RegionSize) 101 if (x >= 0 && y >= 0 && x <= Constants.RegionSize && x <= Constants.RegionSize)
102 { 102 {
103 return (landBitmap[x / 4, y / 4] == true); 103 return (LandBitmap[x / 4, y / 4] == true);
104 } 104 }
105 else 105 else
106 { 106 {
@@ -110,11 +110,11 @@ namespace OpenSim.Region.CoreModules.World.Land
110 110
111 public ILandObject Copy() 111 public ILandObject Copy()
112 { 112 {
113 ILandObject newLand = new LandObject(landData.OwnerID, landData.IsGroupOwned, m_scene); 113 ILandObject newLand = new LandObject(LandData.OwnerID, LandData.IsGroupOwned, m_scene);
114 114
115 //Place all new variables here! 115 //Place all new variables here!
116 newLand.landBitmap = (bool[,]) (landBitmap.Clone()); 116 newLand.LandBitmap = (bool[,]) (LandBitmap.Clone());
117 newLand.landData = landData.Copy(); 117 newLand.LandData = LandData.Copy();
118 118
119 return newLand; 119 return newLand;
120 } 120 }
@@ -122,16 +122,16 @@ namespace OpenSim.Region.CoreModules.World.Land
122 static overrideParcelMaxPrimCountDelegate overrideParcelMaxPrimCount; 122 static overrideParcelMaxPrimCountDelegate overrideParcelMaxPrimCount;
123 static overrideSimulatorMaxPrimCountDelegate overrideSimulatorMaxPrimCount; 123 static overrideSimulatorMaxPrimCountDelegate overrideSimulatorMaxPrimCount;
124 124
125 public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) 125 public void SetParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel)
126 { 126 {
127 overrideParcelMaxPrimCount = overrideDel; 127 overrideParcelMaxPrimCount = overrideDel;
128 } 128 }
129 public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) 129 public void SetSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel)
130 { 130 {
131 overrideSimulatorMaxPrimCount = overrideDel; 131 overrideSimulatorMaxPrimCount = overrideDel;
132 } 132 }
133 133
134 public int getParcelMaxPrimCount(ILandObject thisObject) 134 public int GetParcelMaxPrimCount(ILandObject thisObject)
135 { 135 {
136 if (overrideParcelMaxPrimCount != null) 136 if (overrideParcelMaxPrimCount != null)
137 { 137 {
@@ -141,11 +141,11 @@ namespace OpenSim.Region.CoreModules.World.Land
141 { 141 {
142 //Normal Calculations 142 //Normal Calculations
143 return Convert.ToInt32( 143 return Convert.ToInt32(
144 Math.Round((Convert.ToDecimal(landData.Area) / Convert.ToDecimal(65536)) * m_scene.objectCapacity * 144 Math.Round((Convert.ToDecimal(LandData.Area) / Convert.ToDecimal(65536)) * m_scene.objectCapacity *
145 Convert.ToDecimal(m_scene.RegionInfo.RegionSettings.ObjectBonus))); ; 145 Convert.ToDecimal(m_scene.RegionInfo.RegionSettings.ObjectBonus))); ;
146 } 146 }
147 } 147 }
148 public int getSimulatorMaxPrimCount(ILandObject thisObject) 148 public int GetSimulatorMaxPrimCount(ILandObject thisObject)
149 { 149 {
150 if (overrideSimulatorMaxPrimCount != null) 150 if (overrideSimulatorMaxPrimCount != null)
151 { 151 {
@@ -161,7 +161,7 @@ namespace OpenSim.Region.CoreModules.World.Land
161 161
162 #region Packet Request Handling 162 #region Packet Request Handling
163 163
164 public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) 164 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client)
165 { 165 {
166 IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>(); 166 IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>();
167 uint regionFlags = 336723974 & ~((uint)(RegionFlags.AllowLandmark | RegionFlags.AllowSetHome)); 167 uint regionFlags = 336723974 & ~((uint)(RegionFlags.AllowLandmark | RegionFlags.AllowSetHome));
@@ -175,18 +175,18 @@ namespace OpenSim.Region.CoreModules.World.Land
175// if (landData.OwnerID == remote_client.AgentId) 175// if (landData.OwnerID == remote_client.AgentId)
176// regionFlags |= (uint)RegionFlags.AllowSetHome; 176// regionFlags |= (uint)RegionFlags.AllowSetHome;
177 remote_client.SendLandProperties(sequence_id, 177 remote_client.SendLandProperties(sequence_id,
178 snap_selection, request_result, landData, 178 snap_selection, request_result, LandData,
179 (float)m_scene.RegionInfo.RegionSettings.ObjectBonus, 179 (float)m_scene.RegionInfo.RegionSettings.ObjectBonus,
180 getParcelMaxPrimCount(this), 180 GetParcelMaxPrimCount(this),
181 getSimulatorMaxPrimCount(this), regionFlags); 181 GetSimulatorMaxPrimCount(this), regionFlags);
182 } 182 }
183 183
184 public void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client) 184 public void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client)
185 { 185 {
186 if (m_scene.Permissions.CanEditParcel(remote_client.AgentId,this)) 186 if (m_scene.Permissions.CanEditParcel(remote_client.AgentId,this))
187 { 187 {
188 //Needs later group support 188 //Needs later group support
189 LandData newData = landData.Copy(); 189 LandData newData = LandData.Copy();
190 190
191 if (args.AuthBuyerID != newData.AuthBuyerID || args.SalePrice != newData.SalePrice) 191 if (args.AuthBuyerID != newData.AuthBuyerID || args.SalePrice != newData.SalePrice)
192 { 192 {
@@ -212,15 +212,15 @@ namespace OpenSim.Region.CoreModules.World.Land
212 newData.UserLocation = args.UserLocation; 212 newData.UserLocation = args.UserLocation;
213 newData.UserLookAt = args.UserLookAt; 213 newData.UserLookAt = args.UserLookAt;
214 214
215 m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); 215 m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
216 216
217 sendLandUpdateToAvatarsOverMe(); 217 SendLandUpdateToAvatarsOverMe();
218 } 218 }
219 } 219 }
220 220
221 public void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) 221 public void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area)
222 { 222 {
223 LandData newData = landData.Copy(); 223 LandData newData = LandData.Copy();
224 newData.OwnerID = avatarID; 224 newData.OwnerID = avatarID;
225 newData.GroupID = groupID; 225 newData.GroupID = groupID;
226 newData.IsGroupOwned = groupOwned; 226 newData.IsGroupOwned = groupOwned;
@@ -230,45 +230,45 @@ namespace OpenSim.Region.CoreModules.World.Land
230 newData.SalePrice = 0; 230 newData.SalePrice = 0;
231 newData.AuthBuyerID = UUID.Zero; 231 newData.AuthBuyerID = UUID.Zero;
232 newData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects); 232 newData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects);
233 m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); 233 m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
234 234
235 sendLandUpdateToAvatarsOverMe(); 235 SendLandUpdateToAvatarsOverMe();
236 } 236 }
237 237
238 public void deedToGroup(UUID groupID) 238 public void DeedToGroup(UUID groupID)
239 { 239 {
240 LandData newData = landData.Copy(); 240 LandData newData = LandData.Copy();
241 newData.OwnerID = groupID; 241 newData.OwnerID = groupID;
242 newData.GroupID = groupID; 242 newData.GroupID = groupID;
243 newData.IsGroupOwned = true; 243 newData.IsGroupOwned = true;
244 244
245 m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); 245 m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
246 246
247 sendLandUpdateToAvatarsOverMe(); 247 SendLandUpdateToAvatarsOverMe();
248 } 248 }
249 249
250 public bool isEitherBannedOrRestricted(UUID avatar) 250 public bool IsEitherBannedOrRestricted(UUID avatar)
251 { 251 {
252 if (isBannedFromLand(avatar)) 252 if (IsBannedFromLand(avatar))
253 { 253 {
254 return true; 254 return true;
255 } 255 }
256 else if (isRestrictedFromLand(avatar)) 256 else if (IsRestrictedFromLand(avatar))
257 { 257 {
258 return true; 258 return true;
259 } 259 }
260 return false; 260 return false;
261 } 261 }
262 262
263 public bool isBannedFromLand(UUID avatar) 263 public bool IsBannedFromLand(UUID avatar)
264 { 264 {
265 if ((landData.Flags & (uint) ParcelFlags.UseBanList) > 0) 265 if ((LandData.Flags & (uint) ParcelFlags.UseBanList) > 0)
266 { 266 {
267 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 267 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
268 entry.AgentID = avatar; 268 entry.AgentID = avatar;
269 entry.Flags = AccessList.Ban; 269 entry.Flags = AccessList.Ban;
270 entry.Time = new DateTime(); 270 entry.Time = new DateTime();
271 if (landData.ParcelAccessList.Contains(entry)) 271 if (LandData.ParcelAccessList.Contains(entry))
272 { 272 {
273 //They are banned, so lets send them a notice about this parcel 273 //They are banned, so lets send them a notice about this parcel
274 return true; 274 return true;
@@ -277,15 +277,15 @@ namespace OpenSim.Region.CoreModules.World.Land
277 return false; 277 return false;
278 } 278 }
279 279
280 public bool isRestrictedFromLand(UUID avatar) 280 public bool IsRestrictedFromLand(UUID avatar)
281 { 281 {
282 if ((landData.Flags & (uint) ParcelFlags.UseAccessList) > 0) 282 if ((LandData.Flags & (uint) ParcelFlags.UseAccessList) > 0)
283 { 283 {
284 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 284 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
285 entry.AgentID = avatar; 285 entry.AgentID = avatar;
286 entry.Flags = AccessList.Access; 286 entry.Flags = AccessList.Access;
287 entry.Time = new DateTime(); 287 entry.Time = new DateTime();
288 if (!landData.ParcelAccessList.Contains(entry)) 288 if (!LandData.ParcelAccessList.Contains(entry))
289 { 289 {
290 //They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel 290 //They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel
291 return true; 291 return true;
@@ -294,12 +294,12 @@ namespace OpenSim.Region.CoreModules.World.Land
294 return false; 294 return false;
295 } 295 }
296 296
297 public void sendLandUpdateToClient(IClientAPI remote_client) 297 public void SendLandUpdateToClient(IClientAPI remote_client)
298 { 298 {
299 sendLandProperties(0, false, 0, remote_client); 299 SendLandProperties(0, false, 0, remote_client);
300 } 300 }
301 301
302 public void sendLandUpdateToAvatarsOverMe() 302 public void SendLandUpdateToAvatarsOverMe()
303 { 303 {
304 List<ScenePresence> avatars = m_scene.GetAvatars(); 304 List<ScenePresence> avatars = m_scene.GetAvatars();
305 ILandObject over = null; 305 ILandObject over = null;
@@ -319,14 +319,15 @@ namespace OpenSim.Region.CoreModules.World.Land
319 319
320 if (over != null) 320 if (over != null)
321 { 321 {
322 if (over.landData.LocalID == landData.LocalID) 322 if (over.LandData.LocalID == LandData.LocalID)
323 { 323 {
324 if (((over.landData.Flags & (uint)ParcelFlags.AllowDamage) != 0) && m_scene.RegionInfo.RegionSettings.AllowDamage) 324 if (((over.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0) &&
325 m_scene.RegionInfo.RegionSettings.AllowDamage)
325 avatars[i].Invulnerable = false; 326 avatars[i].Invulnerable = false;
326 else 327 else
327 avatars[i].Invulnerable = true; 328 avatars[i].Invulnerable = true;
328 329
329 sendLandUpdateToClient(avatars[i].ControllingClient); 330 SendLandUpdateToClient(avatars[i].ControllingClient);
330 } 331 }
331 } 332 }
332 } 333 }
@@ -336,10 +337,10 @@ namespace OpenSim.Region.CoreModules.World.Land
336 337
337 #region AccessList Functions 338 #region AccessList Functions
338 339
339 public List<UUID> createAccessListArrayByFlag(AccessList flag) 340 public List<UUID> CreateAccessListArrayByFlag(AccessList flag)
340 { 341 {
341 List<UUID> list = new List<UUID>(); 342 List<UUID> list = new List<UUID>();
342 foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList) 343 foreach (ParcelManager.ParcelAccessEntry entry in LandData.ParcelAccessList)
343 { 344 {
344 if (entry.Flags == flag) 345 if (entry.Flags == flag)
345 { 346 {
@@ -354,26 +355,26 @@ namespace OpenSim.Region.CoreModules.World.Land
354 return list; 355 return list;
355 } 356 }
356 357
357 public void sendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, 358 public void SendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID,
358 IClientAPI remote_client) 359 IClientAPI remote_client)
359 { 360 {
360 361
361 if (flags == (uint) AccessList.Access || flags == (uint) AccessList.Both) 362 if (flags == (uint) AccessList.Access || flags == (uint) AccessList.Both)
362 { 363 {
363 List<UUID> avatars = createAccessListArrayByFlag(AccessList.Access); 364 List<UUID> avatars = CreateAccessListArrayByFlag(AccessList.Access);
364 remote_client.SendLandAccessListData(avatars,(uint) AccessList.Access,landData.LocalID); 365 remote_client.SendLandAccessListData(avatars,(uint) AccessList.Access,LandData.LocalID);
365 } 366 }
366 367
367 if (flags == (uint) AccessList.Ban || flags == (uint) AccessList.Both) 368 if (flags == (uint) AccessList.Ban || flags == (uint) AccessList.Both)
368 { 369 {
369 List<UUID> avatars = createAccessListArrayByFlag(AccessList.Ban); 370 List<UUID> avatars = CreateAccessListArrayByFlag(AccessList.Ban);
370 remote_client.SendLandAccessListData(avatars, (uint)AccessList.Ban, landData.LocalID); 371 remote_client.SendLandAccessListData(avatars, (uint)AccessList.Ban, LandData.LocalID);
371 } 372 }
372 } 373 }
373 374
374 public void updateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client) 375 public void UpdateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client)
375 { 376 {
376 LandData newData = landData.Copy(); 377 LandData newData = LandData.Copy();
377 378
378 if (entries.Count == 1 && entries[0].AgentID == UUID.Zero) 379 if (entries.Count == 1 && entries[0].AgentID == UUID.Zero)
379 { 380 {
@@ -406,36 +407,36 @@ namespace OpenSim.Region.CoreModules.World.Land
406 } 407 }
407 } 408 }
408 409
409 m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); 410 m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
410 } 411 }
411 412
412 #endregion 413 #endregion
413 414
414 #region Update Functions 415 #region Update Functions
415 416
416 public void updateLandBitmapByteArray() 417 public void UpdateLandBitmapByteArray()
417 { 418 {
418 landData.Bitmap = convertLandBitmapToBytes(); 419 LandData.Bitmap = ConvertLandBitmapToBytes();
419 } 420 }
420 421
421 /// <summary> 422 /// <summary>
422 /// Update all settings in land such as area, bitmap byte array, etc 423 /// Update all settings in land such as area, bitmap byte array, etc
423 /// </summary> 424 /// </summary>
424 public void forceUpdateLandInfo() 425 public void ForceUpdateLandInfo()
425 { 426 {
426 updateAABBAndAreaValues(); 427 UpdateAABBAndAreaValues();
427 updateLandBitmapByteArray(); 428 UpdateLandBitmapByteArray();
428 } 429 }
429 430
430 public void setLandBitmapFromByteArray() 431 public void SetLandBitmapFromByteArray()
431 { 432 {
432 landBitmap = convertBytesToLandBitmap(); 433 LandBitmap = ConvertBytesToLandBitmap();
433 } 434 }
434 435
435 /// <summary> 436 /// <summary>
436 /// Updates the AABBMin and AABBMax values after area/shape modification of the land object 437 /// Updates the AABBMin and AABBMax values after area/shape modification of the land object
437 /// </summary> 438 /// </summary>
438 private void updateAABBAndAreaValues() 439 private void UpdateAABBAndAreaValues()
439 { 440 {
440 int min_x = 64; 441 int min_x = 64;
441 int min_y = 64; 442 int min_y = 64;
@@ -447,7 +448,7 @@ namespace OpenSim.Region.CoreModules.World.Land
447 { 448 {
448 for (y = 0; y < 64; y++) 449 for (y = 0; y < 64; y++)
449 { 450 {
450 if (landBitmap[x, y] == true) 451 if (LandBitmap[x, y] == true)
451 { 452 {
452 if (min_x > x) min_x = x; 453 if (min_x > x) min_x = x;
453 if (min_y > y) min_y = y; 454 if (min_y > y) min_y = y;
@@ -463,7 +464,7 @@ namespace OpenSim.Region.CoreModules.World.Land
463 int ty = min_y * 4; 464 int ty = min_y * 4;
464 if (ty > ((int)Constants.RegionSize - 1)) 465 if (ty > ((int)Constants.RegionSize - 1))
465 ty = ((int)Constants.RegionSize - 1); 466 ty = ((int)Constants.RegionSize - 1);
466 landData.AABBMin = 467 LandData.AABBMin =
467 new Vector3((float) (min_x * 4), (float) (min_y * 4), 468 new Vector3((float) (min_x * 4), (float) (min_y * 4),
468 (float) m_scene.Heightmap[tx, ty]); 469 (float) m_scene.Heightmap[tx, ty]);
469 470
@@ -473,10 +474,10 @@ namespace OpenSim.Region.CoreModules.World.Land
473 ty = max_y * 4; 474 ty = max_y * 4;
474 if (ty > ((int)Constants.RegionSize - 1)) 475 if (ty > ((int)Constants.RegionSize - 1))
475 ty = ((int)Constants.RegionSize - 1); 476 ty = ((int)Constants.RegionSize - 1);
476 landData.AABBMax = 477 LandData.AABBMax =
477 new Vector3((float) (max_x * 4), (float) (max_y * 4), 478 new Vector3((float) (max_x * 4), (float) (max_y * 4),
478 (float) m_scene.Heightmap[tx, ty]); 479 (float) m_scene.Heightmap[tx, ty]);
479 landData.Area = tempArea; 480 LandData.Area = tempArea;
480 } 481 }
481 482
482 #endregion 483 #endregion
@@ -487,7 +488,7 @@ namespace OpenSim.Region.CoreModules.World.Land
487 /// Sets the land's bitmap manually 488 /// Sets the land's bitmap manually
488 /// </summary> 489 /// </summary>
489 /// <param name="bitmap">64x64 block representing where this land is on a map</param> 490 /// <param name="bitmap">64x64 block representing where this land is on a map</param>
490 public void setLandBitmap(bool[,] bitmap) 491 public void SetLandBitmap(bool[,] bitmap)
491 { 492 {
492 if (bitmap.GetLength(0) != 64 || bitmap.GetLength(1) != 64 || bitmap.Rank != 2) 493 if (bitmap.GetLength(0) != 64 || bitmap.GetLength(1) != 64 || bitmap.Rank != 2)
493 { 494 {
@@ -497,8 +498,8 @@ namespace OpenSim.Region.CoreModules.World.Land
497 else 498 else
498 { 499 {
499 //Valid: Lets set it 500 //Valid: Lets set it
500 landBitmap = bitmap; 501 LandBitmap = bitmap;
501 forceUpdateLandInfo(); 502 ForceUpdateLandInfo();
502 } 503 }
503 } 504 }
504 505
@@ -506,18 +507,18 @@ namespace OpenSim.Region.CoreModules.World.Land
506 /// Gets the land's bitmap manually 507 /// Gets the land's bitmap manually
507 /// </summary> 508 /// </summary>
508 /// <returns></returns> 509 /// <returns></returns>
509 public bool[,] getLandBitmap() 510 public bool[,] GetLandBitmap()
510 { 511 {
511 return landBitmap; 512 return LandBitmap;
512 } 513 }
513 514
514 /// <summary> 515 /// <summary>
515 /// Full sim land object creation 516 /// Full sim land object creation
516 /// </summary> 517 /// </summary>
517 /// <returns></returns> 518 /// <returns></returns>
518 public bool[,] basicFullRegionLandBitmap() 519 public bool[,] BasicFullRegionLandBitmap()
519 { 520 {
520 return getSquareLandBitmap(0, 0, (int) Constants.RegionSize, (int) Constants.RegionSize); 521 return GetSquareLandBitmap(0, 0, (int) Constants.RegionSize, (int) Constants.RegionSize);
521 } 522 }
522 523
523 /// <summary> 524 /// <summary>
@@ -528,12 +529,12 @@ namespace OpenSim.Region.CoreModules.World.Land
528 /// <param name="end_x"></param> 529 /// <param name="end_x"></param>
529 /// <param name="end_y"></param> 530 /// <param name="end_y"></param>
530 /// <returns></returns> 531 /// <returns></returns>
531 public bool[,] getSquareLandBitmap(int start_x, int start_y, int end_x, int end_y) 532 public bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y)
532 { 533 {
533 bool[,] tempBitmap = new bool[64,64]; 534 bool[,] tempBitmap = new bool[64,64];
534 tempBitmap.Initialize(); 535 tempBitmap.Initialize();
535 536
536 tempBitmap = modifyLandBitmapSquare(tempBitmap, start_x, start_y, end_x, end_y, true); 537 tempBitmap = ModifyLandBitmapSquare(tempBitmap, start_x, start_y, end_x, end_y, true);
537 return tempBitmap; 538 return tempBitmap;
538 } 539 }
539 540
@@ -547,7 +548,7 @@ namespace OpenSim.Region.CoreModules.World.Land
547 /// <param name="end_y"></param> 548 /// <param name="end_y"></param>
548 /// <param name="set_value"></param> 549 /// <param name="set_value"></param>
549 /// <returns></returns> 550 /// <returns></returns>
550 public bool[,] modifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, 551 public bool[,] ModifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y,
551 bool set_value) 552 bool set_value)
552 { 553 {
553 if (land_bitmap.GetLength(0) != 64 || land_bitmap.GetLength(1) != 64 || land_bitmap.Rank != 2) 554 if (land_bitmap.GetLength(0) != 64 || land_bitmap.GetLength(1) != 64 || land_bitmap.Rank != 2)
@@ -577,7 +578,7 @@ namespace OpenSim.Region.CoreModules.World.Land
577 /// <param name="bitmap_base"></param> 578 /// <param name="bitmap_base"></param>
578 /// <param name="bitmap_add"></param> 579 /// <param name="bitmap_add"></param>
579 /// <returns></returns> 580 /// <returns></returns>
580 public bool[,] mergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add) 581 public bool[,] MergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add)
581 { 582 {
582 if (bitmap_base.GetLength(0) != 64 || bitmap_base.GetLength(1) != 64 || bitmap_base.Rank != 2) 583 if (bitmap_base.GetLength(0) != 64 || bitmap_base.GetLength(1) != 64 || bitmap_base.Rank != 2)
583 { 584 {
@@ -608,7 +609,7 @@ namespace OpenSim.Region.CoreModules.World.Land
608 /// Converts the land bitmap to a packet friendly byte array 609 /// Converts the land bitmap to a packet friendly byte array
609 /// </summary> 610 /// </summary>
610 /// <returns></returns> 611 /// <returns></returns>
611 private byte[] convertLandBitmapToBytes() 612 private byte[] ConvertLandBitmapToBytes()
612 { 613 {
613 byte[] tempConvertArr = new byte[512]; 614 byte[] tempConvertArr = new byte[512];
614 byte tempByte = 0; 615 byte tempByte = 0;
@@ -618,7 +619,7 @@ namespace OpenSim.Region.CoreModules.World.Land
618 { 619 {
619 for (x = 0; x < 64; x++) 620 for (x = 0; x < 64; x++)
620 { 621 {
621 tempByte = Convert.ToByte(tempByte | Convert.ToByte(landBitmap[x, y]) << (i++ % 8)); 622 tempByte = Convert.ToByte(tempByte | Convert.ToByte(LandBitmap[x, y]) << (i++ % 8));
622 if (i % 8 == 0) 623 if (i % 8 == 0)
623 { 624 {
624 tempConvertArr[byteNum] = tempByte; 625 tempConvertArr[byteNum] = tempByte;
@@ -631,7 +632,7 @@ namespace OpenSim.Region.CoreModules.World.Land
631 return tempConvertArr; 632 return tempConvertArr;
632 } 633 }
633 634
634 private bool[,] convertBytesToLandBitmap() 635 private bool[,] ConvertBytesToLandBitmap()
635 { 636 {
636 bool[,] tempConvertMap = new bool[landArrayMax, landArrayMax]; 637 bool[,] tempConvertMap = new bool[landArrayMax, landArrayMax];
637 tempConvertMap.Initialize(); 638 tempConvertMap.Initialize();
@@ -639,7 +640,7 @@ namespace OpenSim.Region.CoreModules.World.Land
639 int x = 0, y = 0, i = 0, bitNum = 0; 640 int x = 0, y = 0, i = 0, bitNum = 0;
640 for (i = 0; i < 512; i++) 641 for (i = 0; i < 512; i++)
641 { 642 {
642 tempByte = landData.Bitmap[i]; 643 tempByte = LandData.Bitmap[i];
643 for (bitNum = 0; bitNum < 8; bitNum++) 644 for (bitNum = 0; bitNum < 8; bitNum++)
644 { 645 {
645 bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte) 1); 646 bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte) 1);
@@ -659,7 +660,7 @@ namespace OpenSim.Region.CoreModules.World.Land
659 660
660 #region Object Select and Object Owner Listing 661 #region Object Select and Object Owner Listing
661 662
662 public void sendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client) 663 public void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client)
663 { 664 {
664 if (m_scene.Permissions.CanEditParcel(remote_client.AgentId, this)) 665 if (m_scene.Permissions.CanEditParcel(remote_client.AgentId, this))
665 { 666 {
@@ -672,11 +673,11 @@ namespace OpenSim.Region.CoreModules.World.Land
672 { 673 {
673 if (obj.LocalId > 0) 674 if (obj.LocalId > 0)
674 { 675 {
675 if (request_type == LandChannel.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == landData.OwnerID) 676 if (request_type == LandChannel.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == LandData.OwnerID)
676 { 677 {
677 resultLocalIDs.Add(obj.LocalId); 678 resultLocalIDs.Add(obj.LocalId);
678 } 679 }
679 else if (request_type == LandChannel.LAND_SELECT_OBJECTS_GROUP && obj.GroupID == landData.GroupID && landData.GroupID != UUID.Zero) 680 else if (request_type == LandChannel.LAND_SELECT_OBJECTS_GROUP && obj.GroupID == LandData.GroupID && LandData.GroupID != UUID.Zero)
680 { 681 {
681 resultLocalIDs.Add(obj.LocalId); 682 resultLocalIDs.Add(obj.LocalId);
682 } 683 }
@@ -709,7 +710,7 @@ namespace OpenSim.Region.CoreModules.World.Land
709 /// <param name="remote_client"> 710 /// <param name="remote_client">
710 /// A <see cref="IClientAPI"/> 711 /// A <see cref="IClientAPI"/>
711 /// </param> 712 /// </param>
712 public void sendLandObjectOwners(IClientAPI remote_client) 713 public void SendLandObjectOwners(IClientAPI remote_client)
713 { 714 {
714 if (m_scene.Permissions.CanEditParcel(remote_client.AgentId, this)) 715 if (m_scene.Permissions.CanEditParcel(remote_client.AgentId, this))
715 { 716 {
@@ -752,11 +753,11 @@ namespace OpenSim.Region.CoreModules.World.Land
752 } 753 }
753 } 754 }
754 755
755 remote_client.SendLandObjectOwners(landData, groups, primCount); 756 remote_client.SendLandObjectOwners(LandData, groups, primCount);
756 } 757 }
757 } 758 }
758 759
759 public Dictionary<UUID, int> getLandObjectOwners() 760 public Dictionary<UUID, int> GetLandObjectOwners()
760 { 761 {
761 Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>(); 762 Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>();
762 lock (primsOverMe) 763 lock (primsOverMe)
@@ -786,14 +787,14 @@ namespace OpenSim.Region.CoreModules.World.Land
786 787
787 #region Object Returning 788 #region Object Returning
788 789
789 public void returnObject(SceneObjectGroup obj) 790 public void ReturnObject(SceneObjectGroup obj)
790 { 791 {
791 SceneObjectGroup[] objs = new SceneObjectGroup[1]; 792 SceneObjectGroup[] objs = new SceneObjectGroup[1];
792 objs[0] = obj; 793 objs[0] = obj;
793 m_scene.returnObjects(objs, obj.OwnerID); 794 m_scene.returnObjects(objs, obj.OwnerID);
794 } 795 }
795 796
796 public void returnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client) 797 public void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client)
797 { 798 {
798 Dictionary<UUID,List<SceneObjectGroup>> returns = 799 Dictionary<UUID,List<SceneObjectGroup>> returns =
799 new Dictionary<UUID,List<SceneObjectGroup>>(); 800 new Dictionary<UUID,List<SceneObjectGroup>>();
@@ -869,19 +870,19 @@ namespace OpenSim.Region.CoreModules.World.Land
869 870
870 #region Object Adding/Removing from Parcel 871 #region Object Adding/Removing from Parcel
871 872
872 public void resetLandPrimCounts() 873 public void ResetLandPrimCounts()
873 { 874 {
874 landData.GroupPrims = 0; 875 LandData.GroupPrims = 0;
875 landData.OwnerPrims = 0; 876 LandData.OwnerPrims = 0;
876 landData.OtherPrims = 0; 877 LandData.OtherPrims = 0;
877 landData.SelectedPrims = 0; 878 LandData.SelectedPrims = 0;
878 879
879 880
880 lock (primsOverMe) 881 lock (primsOverMe)
881 primsOverMe.Clear(); 882 primsOverMe.Clear();
882 } 883 }
883 884
884 public void addPrimToCount(SceneObjectGroup obj) 885 public void AddPrimToCount(SceneObjectGroup obj)
885 { 886 {
886 887
887 UUID prim_owner = obj.OwnerID; 888 UUID prim_owner = obj.OwnerID;
@@ -889,23 +890,23 @@ namespace OpenSim.Region.CoreModules.World.Land
889 890
890 if (obj.IsSelected) 891 if (obj.IsSelected)
891 { 892 {
892 landData.SelectedPrims += prim_count; 893 LandData.SelectedPrims += prim_count;
893 } 894 }
894 else 895 else
895 { 896 {
896 if (prim_owner == landData.OwnerID) 897 if (prim_owner == LandData.OwnerID)
897 { 898 {
898 landData.OwnerPrims += prim_count; 899 LandData.OwnerPrims += prim_count;
899 } 900 }
900 else if ((obj.GroupID == landData.GroupID || 901 else if ((obj.GroupID == LandData.GroupID ||
901 prim_owner == landData.GroupID) && 902 prim_owner == LandData.GroupID) &&
902 landData.GroupID != UUID.Zero) 903 LandData.GroupID != UUID.Zero)
903 { 904 {
904 landData.GroupPrims += prim_count; 905 LandData.GroupPrims += prim_count;
905 } 906 }
906 else 907 else
907 { 908 {
908 landData.OtherPrims += prim_count; 909 LandData.OtherPrims += prim_count;
909 } 910 }
910 } 911 }
911 912
@@ -913,7 +914,7 @@ namespace OpenSim.Region.CoreModules.World.Land
913 primsOverMe.Add(obj); 914 primsOverMe.Add(obj);
914 } 915 }
915 916
916 public void removePrimFromCount(SceneObjectGroup obj) 917 public void RemovePrimFromCount(SceneObjectGroup obj)
917 { 918 {
918 lock (primsOverMe) 919 lock (primsOverMe)
919 { 920 {
@@ -922,18 +923,18 @@ namespace OpenSim.Region.CoreModules.World.Land
922 UUID prim_owner = obj.OwnerID; 923 UUID prim_owner = obj.OwnerID;
923 int prim_count = obj.PrimCount; 924 int prim_count = obj.PrimCount;
924 925
925 if (prim_owner == landData.OwnerID) 926 if (prim_owner == LandData.OwnerID)
926 { 927 {
927 landData.OwnerPrims -= prim_count; 928 LandData.OwnerPrims -= prim_count;
928 } 929 }
929 else if (obj.GroupID == landData.GroupID || 930 else if (obj.GroupID == LandData.GroupID ||
930 prim_owner == landData.GroupID) 931 prim_owner == LandData.GroupID)
931 { 932 {
932 landData.GroupPrims -= prim_count; 933 LandData.GroupPrims -= prim_count;
933 } 934 }
934 else 935 else
935 { 936 {
936 landData.OtherPrims -= prim_count; 937 LandData.OtherPrims -= prim_count;
937 } 938 }
938 939
939 primsOverMe.Remove(obj); 940 primsOverMe.Remove(obj);
@@ -953,8 +954,8 @@ namespace OpenSim.Region.CoreModules.World.Land
953 /// <param name="url"></param> 954 /// <param name="url"></param>
954 public void SetMediaUrl(string url) 955 public void SetMediaUrl(string url)
955 { 956 {
956 landData.MediaURL = url; 957 LandData.MediaURL = url;
957 sendLandUpdateToAvatarsOverMe(); 958 SendLandUpdateToAvatarsOverMe();
958 } 959 }
959 960
960 /// <summary> 961 /// <summary>
@@ -963,8 +964,8 @@ namespace OpenSim.Region.CoreModules.World.Land
963 /// <param name="url"></param> 964 /// <param name="url"></param>
964 public void SetMusicUrl(string url) 965 public void SetMusicUrl(string url)
965 { 966 {
966 landData.MusicURL = url; 967 LandData.MusicURL = url;
967 sendLandUpdateToAvatarsOverMe(); 968 SendLandUpdateToAvatarsOverMe();
968 } 969 }
969 } 970 }
970} 971}
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerLargeLandChannel.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerLargeLandChannel.cs
index 9e46b94..7df836c 100644
--- a/OpenSim/Region/CoreModules/World/Land/RegionCombinerLargeLandChannel.cs
+++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerLargeLandChannel.cs
@@ -85,7 +85,7 @@ public class RegionCombinerLargeLandChannel : ILandChannel
85 } 85 }
86 } 86 }
87 ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene); 87 ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
88 obj.landData.Name = "NO LAND"; 88 obj.LandData.Name = "NO LAND";
89 return obj; 89 return obj;
90 } 90 }
91 } 91 }
@@ -118,7 +118,7 @@ public class RegionCombinerLargeLandChannel : ILandChannel
118 } 118 }
119 } 119 }
120 ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene); 120 ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
121 obj.landData.Name = "NO LAND"; 121 obj.LandData.Name = "NO LAND";
122 return obj; 122 return obj;
123 } 123 }
124 } 124 }
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index a9e0b7f..040d0a3 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -569,7 +569,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
569 569
570 // Users should be able to edit what is over their land. 570 // Users should be able to edit what is over their land.
571 ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y); 571 ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
572 if (parcel != null && parcel.landData.OwnerID == user && m_ParcelOwnerIsGod) 572 if (parcel != null && parcel.LandData.OwnerID == user && m_ParcelOwnerIsGod)
573 { 573 {
574 // Admin objects should not be editable by the above 574 // Admin objects should not be editable by the above
575 if (!IsAdministrator(objectOwner)) 575 if (!IsAdministrator(objectOwner))
@@ -672,7 +672,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
672 672
673 // Users should be able to edit what is over their land. 673 // Users should be able to edit what is over their land.
674 ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y); 674 ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y);
675 if ((parcel != null) && (parcel.landData.OwnerID == currentUser)) 675 if ((parcel != null) && (parcel.LandData.OwnerID == currentUser))
676 { 676 {
677 permission = true; 677 permission = true;
678 } 678 }
@@ -740,12 +740,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
740 { 740 {
741 bool permission = false; 741 bool permission = false;
742 742
743 if (parcel.landData.OwnerID == user) 743 if (parcel.LandData.OwnerID == user)
744 { 744 {
745 permission = true; 745 permission = true;
746 } 746 }
747 747
748 if ((parcel.landData.GroupID != UUID.Zero) && IsGroupMember(parcel.landData.GroupID, user, groupPowers)) 748 if ((parcel.LandData.GroupID != UUID.Zero) && IsGroupMember(parcel.LandData.GroupID, user, groupPowers))
749 { 749 {
750 permission = true; 750 permission = true;
751 } 751 }
@@ -767,12 +767,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
767 { 767 {
768 bool permission = false; 768 bool permission = false;
769 769
770 if (parcel.landData.OwnerID == user) 770 if (parcel.LandData.OwnerID == user)
771 { 771 {
772 permission = true; 772 permission = true;
773 } 773 }
774 774
775 if (parcel.landData.IsGroupOwned && IsGroupMember(parcel.landData.GroupID, user, groupPowers)) 775 if (parcel.LandData.IsGroupOwned && IsGroupMember(parcel.LandData.GroupID, user, groupPowers))
776 { 776 {
777 permission = true; 777 permission = true;
778 } 778 }
@@ -820,13 +820,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
820 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 820 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
821 if (m_bypassPermissions) return m_bypassPermissionsValue; 821 if (m_bypassPermissions) return m_bypassPermissionsValue;
822 822
823 if (parcel.landData.OwnerID != user) // Only the owner can deed! 823 if (parcel.LandData.OwnerID != user) // Only the owner can deed!
824 return false; 824 return false;
825 825
826 ScenePresence sp = scene.GetScenePresence(user); 826 ScenePresence sp = scene.GetScenePresence(user);
827 IClientAPI client = sp.ControllingClient; 827 IClientAPI client = sp.ControllingClient;
828 828
829 if ((client.GetGroupPowers(parcel.landData.GroupID) & (ulong)GroupPowers.LandDeed) == 0) 829 if ((client.GetGroupPowers(parcel.LandData.GroupID) & (ulong)GroupPowers.LandDeed) == 0)
830 return false; 830 return false;
831 831
832 return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDeed); 832 return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDeed);
@@ -1189,7 +1189,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1189 return false; 1189 return false;
1190 } 1190 }
1191 1191
1192 if ((land.landData.Flags & ((int)ParcelFlags.AllowAPrimitiveEntry)) != 0) 1192 if ((land.LandData.Flags & ((int)ParcelFlags.AllowAPrimitiveEntry)) != 0)
1193 { 1193 {
1194 return true; 1194 return true;
1195 } 1195 }
@@ -1233,7 +1233,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1233 ILandObject land = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y); 1233 ILandObject land = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y);
1234 if (land == null) return false; 1234 if (land == null) return false;
1235 1235
1236 if ((land.landData.Flags & ((int)ParcelFlags.CreateObjects)) == 1236 if ((land.LandData.Flags & ((int)ParcelFlags.CreateObjects)) ==
1237 (int)ParcelFlags.CreateObjects) 1237 (int)ParcelFlags.CreateObjects)
1238 permission = true; 1238 permission = true;
1239 1239
@@ -1360,7 +1360,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1360 return false; 1360 return false;
1361 1361
1362 // Others allowed to terraform? 1362 // Others allowed to terraform?
1363 if ((parcel.landData.Flags & ((int)ParcelFlags.AllowTerraform)) != 0) 1363 if ((parcel.LandData.Flags & ((int)ParcelFlags.AllowTerraform)) != 0)
1364 return true; 1364 return true;
1365 1365
1366 // Land owner can terraform too 1366 // Land owner can terraform too
@@ -1693,27 +1693,27 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1693 if (m_bypassPermissions) return m_bypassPermissionsValue; 1693 if (m_bypassPermissions) return m_bypassPermissionsValue;
1694 1694
1695 long powers = 0; 1695 long powers = 0;
1696 if (parcel.landData.GroupID != UUID.Zero) 1696 if (parcel.LandData.GroupID != UUID.Zero)
1697 client.GetGroupPowers(parcel.landData.GroupID); 1697 client.GetGroupPowers(parcel.LandData.GroupID);
1698 1698
1699 switch (type) 1699 switch (type)
1700 { 1700 {
1701 case (uint)ObjectReturnType.Owner: 1701 case (uint)ObjectReturnType.Owner:
1702 // Don't let group members return owner's objects, ever 1702 // Don't let group members return owner's objects, ever
1703 // 1703 //
1704 if (parcel.landData.IsGroupOwned) 1704 if (parcel.LandData.IsGroupOwned)
1705 { 1705 {
1706 if ((powers & (long)GroupPowers.ReturnGroupOwned) != 0) 1706 if ((powers & (long)GroupPowers.ReturnGroupOwned) != 0)
1707 return true; 1707 return true;
1708 } 1708 }
1709 else 1709 else
1710 { 1710 {
1711 if (parcel.landData.OwnerID != client.AgentId) 1711 if (parcel.LandData.OwnerID != client.AgentId)
1712 return false; 1712 return false;
1713 } 1713 }
1714 return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnGroupOwned); 1714 return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnGroupOwned);
1715 case (uint)ObjectReturnType.Group: 1715 case (uint)ObjectReturnType.Group:
1716 if (parcel.landData.OwnerID != client.AgentId) 1716 if (parcel.LandData.OwnerID != client.AgentId)
1717 { 1717 {
1718 // If permissionis granted through a group... 1718 // If permissionis granted through a group...
1719 // 1719 //
diff --git a/OpenSim/Region/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/DataSnapshot/LandSnapshot.cs
index 005659f..51eacef 100644
--- a/OpenSim/Region/DataSnapshot/LandSnapshot.cs
+++ b/OpenSim/Region/DataSnapshot/LandSnapshot.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
87 //Index sim land 87 //Index sim land
88 foreach (KeyValuePair<int, Land> curLand in m_scene.LandManager.landList) 88 foreach (KeyValuePair<int, Land> curLand in m_scene.LandManager.landList)
89 { 89 {
90 //if ((curLand.Value.landData.landFlags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory) 90 //if ((curLand.Value.LandData.landFlags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory)
91 //{ 91 //{
92 m_landIndexed.Add(curLand.Key, curLand.Value.Copy()); 92 m_landIndexed.Add(curLand.Key, curLand.Value.Copy());
93 //} 93 //}
@@ -135,7 +135,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
135 135
136 LandObject land = (LandObject)parcel_interface; 136 LandObject land = (LandObject)parcel_interface;
137 137
138 LandData parcel = land.landData; 138 LandData parcel = land.LandData;
139 if (m_parent.ExposureLevel.Equals("all") || 139 if (m_parent.ExposureLevel.Equals("all") ||
140 (m_parent.ExposureLevel.Equals("minimum") && 140 (m_parent.ExposureLevel.Equals("minimum") &&
141 (parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory)) 141 (parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory))
@@ -393,26 +393,26 @@ namespace OpenSim.Region.DataSnapshot.Providers
393 { 393 {
394 m_log.DebugFormat("[DATASNAPSHOT] trying {0}, {1}", refX, refY); 394 m_log.DebugFormat("[DATASNAPSHOT] trying {0}, {1}", refX, refY);
395 // the point we started with already is in the parcel 395 // the point we started with already is in the parcel
396 if (land.containsPoint((int)refX, (int)refY)) return; 396 if (land.ContainsPoint((int)refX, (int)refY)) return;
397 397
398 // ... otherwise, we have to search for a point within the parcel 398 // ... otherwise, we have to search for a point within the parcel
399 uint startX = (uint)land.landData.AABBMin.X; 399 uint startX = (uint)land.LandData.AABBMin.X;
400 uint startY = (uint)land.landData.AABBMin.Y; 400 uint startY = (uint)land.LandData.AABBMin.Y;
401 uint endX = (uint)land.landData.AABBMax.X; 401 uint endX = (uint)land.LandData.AABBMax.X;
402 uint endY = (uint)land.landData.AABBMax.Y; 402 uint endY = (uint)land.LandData.AABBMax.Y;
403 403
404 // default: center of the parcel 404 // default: center of the parcel
405 refX = (startX + endX) / 2; 405 refX = (startX + endX) / 2;
406 refY = (startY + endY) / 2; 406 refY = (startY + endY) / 2;
407 // If the center point is within the parcel, take that one 407 // If the center point is within the parcel, take that one
408 if (land.containsPoint((int)refX, (int)refY)) return; 408 if (land.ContainsPoint((int)refX, (int)refY)) return;
409 409
410 // otherwise, go the long way. 410 // otherwise, go the long way.
411 for (uint y = startY; y <= endY; ++y) 411 for (uint y = startY; y <= endY; ++y)
412 { 412 {
413 for (uint x = startX; x <= endX; ++x) 413 for (uint x = startX; x <= endX; ++x)
414 { 414 {
415 if (land.containsPoint((int)x, (int)y)) 415 if (land.ContainsPoint((int)x, (int)y))
416 { 416 {
417 // found a point 417 // found a point
418 refX = x; 418 refX = x;
diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs
index afd70bb..9639095 100644
--- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs
+++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs
@@ -139,7 +139,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
139 xmlobject.AppendChild(node); 139 xmlobject.AppendChild(node);
140 140
141 node = nodeFactory.CreateNode(XmlNodeType.Element, "parceluuid", ""); 141 node = nodeFactory.CreateNode(XmlNodeType.Element, "parceluuid", "");
142 node.InnerText = land.landData.GlobalID.ToString(); 142 node.InnerText = land.LandData.GlobalID.ToString();
143 xmlobject.AppendChild(node); 143 xmlobject.AppendChild(node);
144 144
145 parent.AppendChild(xmlobject); 145 parent.AppendChild(xmlobject);
diff --git a/OpenSim/Region/Framework/Interfaces/ILandObject.cs b/OpenSim/Region/Framework/Interfaces/ILandObject.cs
index a4e90d2..c2b1292 100644
--- a/OpenSim/Region/Framework/Interfaces/ILandObject.cs
+++ b/OpenSim/Region/Framework/Interfaces/ILandObject.cs
@@ -37,49 +37,49 @@ namespace OpenSim.Region.Framework.Interfaces
37 37
38 public interface ILandObject 38 public interface ILandObject
39 { 39 {
40 int getParcelMaxPrimCount(ILandObject thisObject); 40 int GetParcelMaxPrimCount(ILandObject thisObject);
41 int getSimulatorMaxPrimCount(ILandObject thisObject); 41 int GetSimulatorMaxPrimCount(ILandObject thisObject);
42 42
43 LandData landData { get; set; } 43 LandData LandData { get; set; }
44 bool[,] landBitmap { get; set; } 44 bool[,] LandBitmap { get; set; }
45 UUID regionUUID { get; } 45 UUID RegionUUID { get; }
46 bool containsPoint(int x, int y); 46 bool ContainsPoint(int x, int y);
47 ILandObject Copy(); 47 ILandObject Copy();
48 48
49 void sendLandUpdateToAvatarsOverMe(); 49 void SendLandUpdateToAvatarsOverMe();
50 50
51 void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client); 51 void SendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client);
52 void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client); 52 void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client);
53 bool isEitherBannedOrRestricted(UUID avatar); 53 bool IsEitherBannedOrRestricted(UUID avatar);
54 bool isBannedFromLand(UUID avatar); 54 bool IsBannedFromLand(UUID avatar);
55 bool isRestrictedFromLand(UUID avatar); 55 bool IsRestrictedFromLand(UUID avatar);
56 void sendLandUpdateToClient(IClientAPI remote_client); 56 void SendLandUpdateToClient(IClientAPI remote_client);
57 List<UUID> createAccessListArrayByFlag(AccessList flag); 57 List<UUID> CreateAccessListArrayByFlag(AccessList flag);
58 void sendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client); 58 void SendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client);
59 void updateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client); 59 void UpdateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client);
60 void updateLandBitmapByteArray(); 60 void UpdateLandBitmapByteArray();
61 void setLandBitmapFromByteArray(); 61 void SetLandBitmapFromByteArray();
62 bool[,] getLandBitmap(); 62 bool[,] GetLandBitmap();
63 void forceUpdateLandInfo(); 63 void ForceUpdateLandInfo();
64 void setLandBitmap(bool[,] bitmap); 64 void SetLandBitmap(bool[,] bitmap);
65 65
66 bool[,] basicFullRegionLandBitmap(); 66 bool[,] BasicFullRegionLandBitmap();
67 bool[,] getSquareLandBitmap(int start_x, int start_y, int end_x, int end_y); 67 bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y);
68 bool[,] modifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value); 68 bool[,] ModifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value);
69 bool[,] mergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add); 69 bool[,] MergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add);
70 void sendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client); 70 void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client);
71 void sendLandObjectOwners(IClientAPI remote_client); 71 void SendLandObjectOwners(IClientAPI remote_client);
72 void returnObject(SceneObjectGroup obj); 72 void ReturnObject(SceneObjectGroup obj);
73 void returnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client); 73 void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client);
74 void resetLandPrimCounts(); 74 void ResetLandPrimCounts();
75 void addPrimToCount(SceneObjectGroup obj); 75 void AddPrimToCount(SceneObjectGroup obj);
76 void removePrimFromCount(SceneObjectGroup obj); 76 void RemovePrimFromCount(SceneObjectGroup obj);
77 void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area); 77 void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area);
78 78
79 void deedToGroup(UUID groupID); 79 void DeedToGroup(UUID groupID);
80 80
81 void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); 81 void SetParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel);
82 void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); 82 void SetSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel);
83 83
84 /// <summary> 84 /// <summary>
85 /// Set the media url for this land parcel 85 /// Set the media url for this land parcel
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 05a6f13..606135b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3206,9 +3206,9 @@ namespace OpenSim.Region.Framework.Scenes
3206 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); 3206 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
3207 if (land != null) 3207 if (land != null)
3208 { 3208 {
3209 if (land.landData.LandingType == (byte)1 && land.landData.UserLocation != Vector3.Zero) 3209 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero)
3210 { 3210 {
3211 agent.startpos = land.landData.UserLocation; 3211 agent.startpos = land.LandData.UserLocation;
3212 } 3212 }
3213 } 3213 }
3214 } 3214 }
@@ -3846,13 +3846,13 @@ namespace OpenSim.Region.Framework.Scenes
3846 3846
3847 public LandData GetLandData(float x, float y) 3847 public LandData GetLandData(float x, float y)
3848 { 3848 {
3849 return LandChannel.GetLandObject(x, y).landData; 3849 return LandChannel.GetLandObject(x, y).LandData;
3850 } 3850 }
3851 3851
3852 public LandData GetLandData(uint x, uint y) 3852 public LandData GetLandData(uint x, uint y)
3853 { 3853 {
3854 m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y); 3854 m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y);
3855 return LandChannel.GetLandObject((int)x, (int)y).landData; 3855 return LandChannel.GetLandObject((int)x, (int)y).LandData;
3856 } 3856 }
3857 3857
3858 3858
@@ -3880,14 +3880,14 @@ namespace OpenSim.Region.Framework.Scenes
3880 { 3880 {
3881 if (parcel != null) 3881 if (parcel != null)
3882 { 3882 {
3883 if ((parcel.landData.Flags & (uint)ParcelFlags.AllowOtherScripts) != 0) 3883 if ((parcel.LandData.Flags & (uint)ParcelFlags.AllowOtherScripts) != 0)
3884 { 3884 {
3885 return true; 3885 return true;
3886 } 3886 }
3887 else if ((parcel.landData.Flags & (uint)ParcelFlags.AllowGroupScripts) != 0) 3887 else if ((parcel.LandData.Flags & (uint)ParcelFlags.AllowGroupScripts) != 0)
3888 { 3888 {
3889 if (part.OwnerID == parcel.landData.OwnerID 3889 if (part.OwnerID == parcel.LandData.OwnerID
3890 || (parcel.landData.IsGroupOwned && part.GroupID == parcel.landData.GroupID) 3890 || (parcel.LandData.IsGroupOwned && part.GroupID == parcel.LandData.GroupID)
3891 || Permissions.IsGod(part.OwnerID)) 3891 || Permissions.IsGod(part.OwnerID))
3892 { 3892 {
3893 return true; 3893 return true;
@@ -3899,7 +3899,7 @@ namespace OpenSim.Region.Framework.Scenes
3899 } 3899 }
3900 else 3900 else
3901 { 3901 {
3902 if (part.OwnerID == parcel.landData.OwnerID) 3902 if (part.OwnerID == parcel.LandData.OwnerID)
3903 { 3903 {
3904 return true; 3904 return true;
3905 } 3905 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 25489d8..6a10618 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1320,15 +1320,15 @@ namespace OpenSim.Region.Framework.Scenes
1320 ILandObject parcel = m_scene.LandChannel.GetLandObject( 1320 ILandObject parcel = m_scene.LandChannel.GetLandObject(
1321 m_rootPart.GroupPosition.X, m_rootPart.GroupPosition.Y); 1321 m_rootPart.GroupPosition.X, m_rootPart.GroupPosition.Y);
1322 1322
1323 if (parcel != null && parcel.landData != null && 1323 if (parcel != null && parcel.LandData != null &&
1324 parcel.landData.OtherCleanTime != 0) 1324 parcel.LandData.OtherCleanTime != 0)
1325 { 1325 {
1326 if (parcel.landData.OwnerID != OwnerID && 1326 if (parcel.LandData.OwnerID != OwnerID &&
1327 (parcel.landData.GroupID != GroupID || 1327 (parcel.LandData.GroupID != GroupID ||
1328 parcel.landData.GroupID == UUID.Zero)) 1328 parcel.LandData.GroupID == UUID.Zero))
1329 { 1329 {
1330 if ((DateTime.Now - RootPart.Rezzed).TotalMinutes > 1330 if ((DateTime.Now - RootPart.Rezzed).TotalMinutes >
1331 parcel.landData.OtherCleanTime) 1331 parcel.LandData.OtherCleanTime)
1332 { 1332 {
1333 DetachFromBackup(); 1333 DetachFromBackup();
1334 m_log.InfoFormat("[SCENE]: Returning object {0} due to parcel auto return", RootPart.UUID.ToString()); 1334 m_log.InfoFormat("[SCENE]: Returning object {0} due to parcel auto return", RootPart.UUID.ToString());
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/LOParcel.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/LOParcel.cs
index 37c7434..8df020f 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/LOParcel.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/LOParcel.cs
@@ -48,14 +48,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
48 48
49 public string Name 49 public string Name
50 { 50 {
51 get { return GetLO().landData.Name; } 51 get { return GetLO().LandData.Name; }
52 set { GetLO().landData.Name = value; } 52 set { GetLO().LandData.Name = value; }
53 } 53 }
54 54
55 public string Description 55 public string Description
56 { 56 {
57 get { return GetLO().landData.Description; } 57 get { return GetLO().LandData.Description; }
58 set { GetLO().landData.Description = value; } 58 set { GetLO().LandData.Description = value; }
59 } 59 }
60 60
61 public ISocialEntity Owner 61 public ISocialEntity Owner
@@ -66,7 +66,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
66 66
67 public bool[,] Bitmap 67 public bool[,] Bitmap
68 { 68 {
69 get { return GetLO().landBitmap; } 69 get { return GetLO().LandBitmap; }
70 } 70 }
71 } 71 }
72} 72}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
index da5ea0d..6fcb5d0 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
@@ -191,7 +191,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
191 191
192 foreach (ILandObject landObject in m_los) 192 foreach (ILandObject landObject in m_los)
193 { 193 {
194 m_parcels.Add(new LOParcel(m_internalScene, landObject.landData.LocalID)); 194 m_parcels.Add(new LOParcel(m_internalScene, landObject.LandData.LocalID));
195 } 195 }
196 196
197 return m_parcels.ToArray(); 197 return m_parcels.ToArray();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 0bd6546..cb91677 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3899,7 +3899,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3899 { 3899 {
3900 // agent must be over the owners land 3900 // agent must be over the owners land
3901 if (m_host.OwnerID == World.LandChannel.GetLandObject( 3901 if (m_host.OwnerID == World.LandChannel.GetLandObject(
3902 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 3902 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
3903 { 3903 {
3904 presence.ControllingClient.SendTeleportLocationStart(); 3904 presence.ControllingClient.SendTeleportLocationStart();
3905 World.TeleportClientHome(agentId, presence.ControllingClient); 3905 World.TeleportClientHome(agentId, presence.ControllingClient);
@@ -4091,7 +4091,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4091 return; 4091 return;
4092 4092
4093 // Need provisions for Group Owned here 4093 // Need provisions for Group Owned here
4094 if (m_host.OwnerID == targetlandObj.landData.OwnerID || targetlandObj.landData.IsGroupOwned || m_host.OwnerID == targetID) 4094 if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
4095 targetlandObj.LandData.IsGroupOwned || m_host.OwnerID == targetID)
4095 { 4096 {
4096 pushAllowed = true; 4097 pushAllowed = true;
4097 } 4098 }
@@ -4107,10 +4108,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4107 else 4108 else
4108 { 4109 {
4109 // Parcel push restriction 4110 // Parcel push restriction
4110 if ((targetlandObj.landData.Flags & (uint)ParcelFlags.RestrictPushObject) == (uint)ParcelFlags.RestrictPushObject) 4111 if ((targetlandObj.LandData.Flags & (uint)ParcelFlags.RestrictPushObject) == (uint)ParcelFlags.RestrictPushObject)
4111 { 4112 {
4112 // Need provisions for Group Owned here 4113 // Need provisions for Group Owned here
4113 if (m_host.OwnerID == targetlandObj.landData.OwnerID || targetlandObj.landData.IsGroupOwned || m_host.OwnerID == targetID) 4114 if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
4115 targetlandObj.LandData.IsGroupOwned ||
4116 m_host.OwnerID == targetID)
4114 { 4117 {
4115 pushAllowed = true; 4118 pushAllowed = true;
4116 } 4119 }
@@ -5442,7 +5445,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5442 { 5445 {
5443 // agent must be over the owners land 5446 // agent must be over the owners land
5444 if (m_host.OwnerID == World.LandChannel.GetLandObject( 5447 if (m_host.OwnerID == World.LandChannel.GetLandObject(
5445 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 5448 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
5446 World.TeleportClientHome(agentId, presence.ControllingClient); 5449 World.TeleportClientHome(agentId, presence.ControllingClient);
5447 } 5450 }
5448 } 5451 }
@@ -5532,7 +5535,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5532 { 5535 {
5533 if (m_host.OwnerID 5536 if (m_host.OwnerID
5534 == World.LandChannel.GetLandObject( 5537 == World.LandChannel.GetLandObject(
5535 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 5538 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
5536 return 1; 5539 return 1;
5537 } 5540 }
5538 else // object is not an avatar 5541 else // object is not an avatar
@@ -5541,7 +5544,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5541 if (obj != null) 5544 if (obj != null)
5542 if (m_host.OwnerID 5545 if (m_host.OwnerID
5543 == World.LandChannel.GetLandObject( 5546 == World.LandChannel.GetLandObject(
5544 obj.AbsolutePosition.X, obj.AbsolutePosition.Y).landData.OwnerID) 5547 obj.AbsolutePosition.X, obj.AbsolutePosition.Y).LandData.OwnerID)
5545 return 1; 5548 return 1;
5546 } 5549 }
5547 } 5550 }
@@ -5552,7 +5555,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5552 public LSL_String llGetLandOwnerAt(LSL_Vector pos) 5555 public LSL_String llGetLandOwnerAt(LSL_Vector pos)
5553 { 5556 {
5554 m_host.AddScriptLPS(1); 5557 m_host.AddScriptLPS(1);
5555 return World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.OwnerID.ToString(); 5558 return World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.OwnerID.ToString();
5556 } 5559 }
5557 5560
5558 /// <summary> 5561 /// <summary>
@@ -5621,9 +5624,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5621 ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y); 5624 ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y);
5622 if (parcel != null) 5625 if (parcel != null)
5623 { 5626 {
5624 if (m_host.ObjectOwner == parcel.landData.OwnerID || 5627 if (m_host.ObjectOwner == parcel.LandData.OwnerID ||
5625 (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.GroupID 5628 (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.LandData.GroupID
5626 && parcel.landData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID)) 5629 && parcel.LandData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID))
5627 { 5630 {
5628 av.StandUp(); 5631 av.StandUp();
5629 } 5632 }
@@ -6126,7 +6129,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6126 { 6129 {
6127 m_host.AddScriptLPS(1); 6130 m_host.AddScriptLPS(1);
6128 UUID key; 6131 UUID key;
6129 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 6132 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
6130 if (land.OwnerID == m_host.OwnerID) 6133 if (land.OwnerID == m_host.OwnerID)
6131 { 6134 {
6132 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 6135 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
@@ -7144,7 +7147,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7144 7147
7145 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 7148 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
7146 7149
7147 if (land.landData.OwnerID != m_host.ObjectOwner) 7150 if (land.LandData.OwnerID != m_host.ObjectOwner)
7148 return; 7151 return;
7149 7152
7150 land.SetMusicUrl(url); 7153 land.SetMusicUrl(url);
@@ -8403,7 +8406,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8403 bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? 8406 bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)?
8404 byte loop = 0; 8407 byte loop = 0;
8405 8408
8406 LandData landData = landObject.landData; 8409 LandData landData = landObject.LandData;
8407 string url = landData.MediaURL; 8410 string url = landData.MediaURL;
8408 string texture = landData.MediaID.ToString(); 8411 string texture = landData.MediaID.ToString();
8409 bool autoAlign = landData.MediaAutoScale != 0; 8412 bool autoAlign = landData.MediaAutoScale != 0;
@@ -8832,7 +8835,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8832 { 8835 {
8833 m_host.AddScriptLPS(1); 8836 m_host.AddScriptLPS(1);
8834 UUID key; 8837 UUID key;
8835 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 8838 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
8836 if (land.OwnerID == m_host.OwnerID) 8839 if (land.OwnerID == m_host.OwnerID)
8837 { 8840 {
8838 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 8841 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
@@ -8851,7 +8854,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8851 { 8854 {
8852 m_host.AddScriptLPS(1); 8855 m_host.AddScriptLPS(1);
8853 UUID key; 8856 UUID key;
8854 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 8857 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
8855 if (land.OwnerID == m_host.OwnerID) 8858 if (land.OwnerID == m_host.OwnerID)
8856 { 8859 {
8857 if (UUID.TryParse(avatar, out key)) 8860 if (UUID.TryParse(avatar, out key))
@@ -8873,7 +8876,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8873 { 8876 {
8874 m_host.AddScriptLPS(1); 8877 m_host.AddScriptLPS(1);
8875 UUID key; 8878 UUID key;
8876 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 8879 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
8877 if (land.OwnerID == m_host.OwnerID) 8880 if (land.OwnerID == m_host.OwnerID)
8878 { 8881 {
8879 if (UUID.TryParse(avatar, out key)) 8882 if (UUID.TryParse(avatar, out key))
@@ -9018,7 +9021,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9018 public LSL_Integer llGetParcelFlags(LSL_Vector pos) 9021 public LSL_Integer llGetParcelFlags(LSL_Vector pos)
9019 { 9022 {
9020 m_host.AddScriptLPS(1); 9023 m_host.AddScriptLPS(1);
9021 return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.Flags; 9024 return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.Flags;
9022 } 9025 }
9023 9026
9024 public LSL_Integer llGetRegionFlags() 9027 public LSL_Integer llGetRegionFlags()
@@ -9139,7 +9142,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9139 public void llResetLandBanList() 9142 public void llResetLandBanList()
9140 { 9143 {
9141 m_host.AddScriptLPS(1); 9144 m_host.AddScriptLPS(1);
9142 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 9145 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
9143 if (land.OwnerID == m_host.OwnerID) 9146 if (land.OwnerID == m_host.OwnerID)
9144 { 9147 {
9145 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) 9148 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
@@ -9156,7 +9159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9156 public void llResetLandPassList() 9159 public void llResetLandPassList()
9157 { 9160 {
9158 m_host.AddScriptLPS(1); 9161 m_host.AddScriptLPS(1);
9159 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 9162 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
9160 if (land.OwnerID == m_host.OwnerID) 9163 if (land.OwnerID == m_host.OwnerID)
9161 { 9164 {
9162 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) 9165 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
@@ -9240,7 +9243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9240 LSL_List ret = new LSL_List(); 9243 LSL_List ret = new LSL_List();
9241 if (land != null) 9244 if (land != null)
9242 { 9245 {
9243 foreach (KeyValuePair<UUID, int> detectedParams in land.getLandObjectOwners()) 9246 foreach (KeyValuePair<UUID, int> detectedParams in land.GetLandObjectOwners())
9244 { 9247 {
9245 ret.Add(detectedParams.Key.ToString()); 9248 ret.Add(detectedParams.Key.ToString());
9246 ret.Add(detectedParams.Value); 9249 ret.Add(detectedParams.Value);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 0b95abc..59525b6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -593,7 +593,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
593 // agent must be over owners land to avoid abuse 593 // agent must be over owners land to avoid abuse
594 if (m_host.OwnerID 594 if (m_host.OwnerID
595 == World.LandChannel.GetLandObject( 595 == World.LandChannel.GetLandObject(
596 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 596 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
597 { 597 {
598 598
599 // Check for hostname , attempt to make a hglink 599 // Check for hostname , attempt to make a hglink
@@ -647,7 +647,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
647 // agent must be over owners land to avoid abuse 647 // agent must be over owners land to avoid abuse
648 if (m_host.OwnerID 648 if (m_host.OwnerID
649 == World.LandChannel.GetLandObject( 649 == World.LandChannel.GetLandObject(
650 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 650 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
651 { 651 {
652 presence.ControllingClient.SendTeleportLocationStart(); 652 presence.ControllingClient.SendTeleportLocationStart();
653 World.RequestTeleportLocation(presence.ControllingClient, regionHandle, 653 World.RequestTeleportLocation(presence.ControllingClient, regionHandle,
@@ -1164,7 +1164,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1164 ILandObject land 1164 ILandObject land
1165 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 1165 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
1166 1166
1167 if (land.landData.OwnerID != m_host.ObjectOwner) 1167 if (land.LandData.OwnerID != m_host.ObjectOwner)
1168 return; 1168 return;
1169 1169
1170 land.SetMediaUrl(url); 1170 land.SetMediaUrl(url);
@@ -1182,7 +1182,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1182 ILandObject land 1182 ILandObject land
1183 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 1183 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
1184 1184
1185 if (land.landData.OwnerID != m_host.ObjectOwner) 1185 if (land.LandData.OwnerID != m_host.ObjectOwner)
1186 { 1186 {
1187 OSSLError("osSetParcelSIPAddress: Sorry, you need to own the land to use this function"); 1187 OSSLError("osSetParcelSIPAddress: Sorry, you need to own the land to use this function");
1188 return; 1188 return;
@@ -1192,7 +1192,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1192 IVoiceModule voiceModule = World.RequestModuleInterface<IVoiceModule>(); 1192 IVoiceModule voiceModule = World.RequestModuleInterface<IVoiceModule>();
1193 1193
1194 if (voiceModule != null) 1194 if (voiceModule != null)
1195 voiceModule.setLandSIPAddress(SIPAddress,land.landData.GlobalID); 1195 voiceModule.setLandSIPAddress(SIPAddress,land.LandData.GlobalID);
1196 else 1196 else
1197 OSSLError("osSetParcelSIPAddress: No voice module enabled for this land"); 1197 OSSLError("osSetParcelSIPAddress: No voice module enabled for this land");
1198 1198
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 53f24d9..952fac9 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -127,7 +127,7 @@ namespace OpenSim.Tests.Common.Setup
127 public static TestScene SetupScene( 127 public static TestScene SetupScene(
128 string name, UUID id, uint x, uint y, TestCommunicationsManager cm, String realServices) 128 string name, UUID id, uint x, uint y, TestCommunicationsManager cm, String realServices)
129 { 129 {
130 bool newScene= false; 130 bool newScene = false;
131 131
132 Console.WriteLine("Setting up test scene {0}", name); 132 Console.WriteLine("Setting up test scene {0}", name);
133 133