Merge branch 'master' into diva-textures

0.6.8-post-fixes
Melanie 2009-10-02 19:03:22 +01:00
commit ce8974539e
28 changed files with 481 additions and 396 deletions

View File

@ -658,9 +658,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
foreach (ILandObject parcel in parcels) foreach (ILandObject parcel in parcels)
{ {
parcel.landData.Flags |= (uint) ParcelFlags.AllowVoiceChat; parcel.LandData.Flags |= (uint) ParcelFlags.AllowVoiceChat;
parcel.landData.Flags |= (uint) ParcelFlags.UseEstateVoiceChan; parcel.LandData.Flags |= (uint) ParcelFlags.UseEstateVoiceChan;
((Scene)newscene).LandChannel.UpdateLandObject(parcel.landData.LocalID, parcel.landData); ((Scene)newscene).LandChannel.UpdateLandObject(parcel.LandData.LocalID, parcel.LandData);
} }
} }
@ -910,15 +910,15 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
if (enableVoice) if (enableVoice)
{ {
parcel.landData.Flags |= (uint)ParcelFlags.AllowVoiceChat; parcel.LandData.Flags |= (uint)ParcelFlags.AllowVoiceChat;
parcel.landData.Flags |= (uint)ParcelFlags.UseEstateVoiceChan; parcel.LandData.Flags |= (uint)ParcelFlags.UseEstateVoiceChan;
} }
else else
{ {
parcel.landData.Flags &= ~(uint)ParcelFlags.AllowVoiceChat; parcel.LandData.Flags &= ~(uint)ParcelFlags.AllowVoiceChat;
parcel.landData.Flags &= ~(uint)ParcelFlags.UseEstateVoiceChan; parcel.LandData.Flags &= ~(uint)ParcelFlags.UseEstateVoiceChan;
} }
scene.LandChannel.UpdateLandObject(parcel.landData.LocalID, parcel.landData); scene.LandChannel.UpdateLandObject(parcel.LandData.LocalID, parcel.LandData);
} }
} }

View File

@ -624,7 +624,7 @@ ELSE
//As the delete landaccess is already in the mysql code //As the delete landaccess is already in the mysql code
//Delete old values //Delete old values
RemoveLandObject(parcel.landData.GlobalID); RemoveLandObject(parcel.LandData.GlobalID);
//Insert new values //Insert new values
string sql = @"INSERT INTO [land] string sql = @"INSERT INTO [land]
@ -634,7 +634,7 @@ VALUES
using (AutoClosingSqlCommand cmd = _Database.Query(sql)) using (AutoClosingSqlCommand cmd = _Database.Query(sql))
{ {
cmd.Parameters.AddRange(CreateLandParameters(parcel.landData, parcel.regionUUID)); cmd.Parameters.AddRange(CreateLandParameters(parcel.LandData, parcel.RegionUUID));
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
@ -643,9 +643,9 @@ VALUES
using (AutoClosingSqlCommand cmd = _Database.Query(sql)) using (AutoClosingSqlCommand cmd = _Database.Query(sql))
{ {
foreach (ParcelManager.ParcelAccessEntry parcelAccessEntry in parcel.landData.ParcelAccessList) foreach (ParcelManager.ParcelAccessEntry parcelAccessEntry in parcel.LandData.ParcelAccessList)
{ {
cmd.Parameters.AddRange(CreateLandAccessParameters(parcelAccessEntry, parcel.regionUUID)); cmd.Parameters.AddRange(CreateLandAccessParameters(parcelAccessEntry, parcel.RegionUUID));
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
cmd.Parameters.Clear(); cmd.Parameters.Clear();

View File

@ -685,7 +685,7 @@ namespace OpenSim.Data.MySQL
"?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " + "?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " +
"?AuthbuyerID, ?OtherCleanTime, ?Dwell)"; "?AuthbuyerID, ?OtherCleanTime, ?Dwell)";
FillLandCommand(cmd, parcel.landData, parcel.regionUUID); FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID);
ExecuteNonQuery(cmd); ExecuteNonQuery(cmd);
@ -700,9 +700,9 @@ namespace OpenSim.Data.MySQL
"?Flags)"; "?Flags)";
foreach (ParcelManager.ParcelAccessEntry entry in foreach (ParcelManager.ParcelAccessEntry entry in
parcel.landData.ParcelAccessList) parcel.LandData.ParcelAccessList)
{ {
FillLandAccessCommand(cmd, entry, parcel.landData.GlobalID); FillLandAccessCommand(cmd, entry, parcel.LandData.GlobalID);
ExecuteNonQuery(cmd); ExecuteNonQuery(cmd);
cmd.Parameters.Clear(); cmd.Parameters.Clear();
} }

View File

@ -227,7 +227,7 @@ namespace OpenSim.Data.NHibernate
manager.Delete(p); manager.Delete(p);
} }
m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.Guid, regionUUID); // m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.Guid, regionUUID);
} }

View File

@ -336,7 +336,7 @@ namespace OpenSim.Data.SQLite
/// <param name="regionUUID">the region UUID</param> /// <param name="regionUUID">the region UUID</param>
public void RemoveObject(UUID obj, UUID regionUUID) public void RemoveObject(UUID obj, UUID regionUUID)
{ {
m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.Guid, regionUUID); // m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.Guid, regionUUID);
DataTable prims = ds.Tables["prims"]; DataTable prims = ds.Tables["prims"];
DataTable shapes = ds.Tables["primshapes"]; DataTable shapes = ds.Tables["primshapes"];
@ -638,29 +638,29 @@ namespace OpenSim.Data.SQLite
DataTable land = ds.Tables["land"]; DataTable land = ds.Tables["land"];
DataTable landaccesslist = ds.Tables["landaccesslist"]; DataTable landaccesslist = ds.Tables["landaccesslist"];
DataRow landRow = land.Rows.Find(parcel.landData.GlobalID.ToString()); DataRow landRow = land.Rows.Find(parcel.LandData.GlobalID.ToString());
if (landRow == null) if (landRow == null)
{ {
landRow = land.NewRow(); landRow = land.NewRow();
fillLandRow(landRow, parcel.landData, parcel.regionUUID); fillLandRow(landRow, parcel.LandData, parcel.RegionUUID);
land.Rows.Add(landRow); land.Rows.Add(landRow);
} }
else else
{ {
fillLandRow(landRow, parcel.landData, parcel.regionUUID); fillLandRow(landRow, parcel.LandData, parcel.RegionUUID);
} }
// I know this caused someone issues before, but OpenSim is unusable if we leave this stuff around // I know this caused someone issues before, but OpenSim is unusable if we leave this stuff around
using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:LandUUID", m_conn)) using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:LandUUID", m_conn))
{ {
cmd.Parameters.Add(new SqliteParameter(":LandUUID", parcel.landData.GlobalID.ToString())); cmd.Parameters.Add(new SqliteParameter(":LandUUID", parcel.LandData.GlobalID.ToString()));
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.ParcelAccessList) foreach (ParcelManager.ParcelAccessEntry entry in parcel.LandData.ParcelAccessList)
{ {
DataRow newAccessRow = landaccesslist.NewRow(); DataRow newAccessRow = landaccesslist.NewRow();
fillLandAccessRow(newAccessRow, entry, parcel.landData.GlobalID); fillLandAccessRow(newAccessRow, entry, parcel.LandData.GlobalID);
landaccesslist.Rows.Add(newAccessRow); landaccesslist.Rows.Add(newAccessRow);
} }
} }

View File

@ -65,6 +65,11 @@ namespace OpenSim.Framework.Serialization
/// </value> /// </value>
public const string SETTINGS_PATH = "settings/"; public const string SETTINGS_PATH = "settings/";
/// <value>
/// Path for region settings.
/// </value>
public const string LANDDATA_PATH = "landdata/";
/// <value> /// <value>
/// Path for user profiles /// Path for user profiles
/// </value> /// </value>

View File

@ -40,6 +40,7 @@ namespace OpenSim.Framework.Serialization
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected static ASCIIEncoding m_asciiEncoding = new ASCIIEncoding(); protected static ASCIIEncoding m_asciiEncoding = new ASCIIEncoding();
protected static UTF8Encoding m_utf8Encoding = new UTF8Encoding();
/// <summary> /// <summary>
/// Binary writer for the underlying stream /// Binary writer for the underlying stream
@ -71,7 +72,7 @@ namespace OpenSim.Framework.Serialization
/// <param name="data"></param> /// <param name="data"></param>
public void WriteFile(string filePath, string data) public void WriteFile(string filePath, string data)
{ {
WriteFile(filePath, m_asciiEncoding.GetBytes(data)); WriteFile(filePath, m_utf8Encoding.GetBytes(data));
} }
/// <summary> /// <summary>

View File

@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
{ {
ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
if ((obj.landData.Flags & (uint)ParcelFlags.AllowDamage) != 0) if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0)
{ {
avatar.Invulnerable = false; avatar.Invulnerable = false;
} }

View File

@ -53,6 +53,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static ASCIIEncoding m_asciiEncoding = new ASCIIEncoding(); private static ASCIIEncoding m_asciiEncoding = new ASCIIEncoding();
private static UTF8Encoding m_utf8Encoding = new UTF8Encoding();
private Scene m_scene; private Scene m_scene;
private Stream m_loadStream; private Stream m_loadStream;
@ -100,6 +101,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
int successfulAssetRestores = 0; int successfulAssetRestores = 0;
int failedAssetRestores = 0; int failedAssetRestores = 0;
List<string> serialisedSceneObjects = new List<string>(); List<string> serialisedSceneObjects = new List<string>();
List<string> serialisedParcels = new List<string>();
string filePath = "NONE"; string filePath = "NONE";
try try
@ -119,7 +121,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH)) if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH))
{ {
serialisedSceneObjects.Add(m_asciiEncoding.GetString(data)); serialisedSceneObjects.Add(m_utf8Encoding.GetString(data));
} }
else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
{ {
@ -136,6 +138,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver
{ {
LoadRegionSettings(filePath, data); LoadRegionSettings(filePath, data);
} }
else if (!m_merge && filePath.StartsWith(ArchiveConstants.LANDDATA_PATH))
{
serialisedParcels.Add(m_utf8Encoding.GetString(data));
}
else if (filePath == ArchiveConstants.CONTROL_FILE_PATH) else if (filePath == ArchiveConstants.CONTROL_FILE_PATH)
{ {
LoadControlFile(filePath, data); LoadControlFile(filePath, data);
@ -169,6 +175,26 @@ namespace OpenSim.Region.CoreModules.World.Archiver
m_scene.DeleteAllSceneObjects(); m_scene.DeleteAllSceneObjects();
} }
// Try to retain the original creator/owner/lastowner if their uuid is present on this grid
// otherwise, use the master avatar uuid instead
UUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID;
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner;
// Reload serialized parcels
m_log.InfoFormat("[ARCHIVER]: Loading {0} parcels. Please wait.", serialisedParcels.Count);
List<LandData> landData = new List<LandData>();
foreach (string serialisedParcel in serialisedParcels)
{
LandData parcel = LandDataSerializer.Deserialize(serialisedParcel);
if (!ResolveUserUuid(parcel.OwnerID))
parcel.OwnerID = masterAvatarId;
landData.Add(parcel);
}
m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData);
m_log.InfoFormat("[ARCHIVER]: Restored {0} parcels.", landData.Count);
// Reload serialized prims // Reload serialized prims
m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count); m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count);
@ -198,12 +224,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
// to the same scene (when this is possible). // to the same scene (when this is possible).
sceneObject.ResetIDs(); sceneObject.ResetIDs();
// Try to retain the original creator/owner/lastowner if their uuid is present on this grid
// otherwise, use the master avatar uuid instead
UUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID;
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner;
foreach (SceneObjectPart part in sceneObject.Children.Values) foreach (SceneObjectPart part in sceneObject.Children.Values)
{ {

View File

@ -102,6 +102,17 @@ namespace OpenSim.Region.CoreModules.World.Archiver
m_log.InfoFormat("[ARCHIVER]: Added region settings to archive."); m_log.InfoFormat("[ARCHIVER]: Added region settings to archive.");
// Write out land data (aka parcel) settings
List<ILandObject>landObjects = m_scene.LandChannel.AllParcels();
foreach (ILandObject lo in landObjects)
{
LandData landData = lo.LandData;
string landDataPath = String.Format("{0}{1}.xml", ArchiveConstants.LANDDATA_PATH,
landData.GlobalID.ToString());
m_archiveWriter.WriteFile(landDataPath, LandDataSerializer.Serialize(landData));
}
m_log.InfoFormat("[ARCHIVER]: Added parcel settings to archive.");
// Write out terrain // Write out terrain
string terrainPath string terrainPath
= String.Format("{0}{1}.r32", ArchiveConstants.TERRAINS_PATH, m_scene.RegionInfo.RegionName); = String.Format("{0}{1}.r32", ArchiveConstants.TERRAINS_PATH, m_scene.RegionInfo.RegionName);

View File

@ -82,7 +82,7 @@ namespace OpenSim.Region.CoreModules.World.Land
} }
ILandObject obj = new LandObject(UUID.Zero, false, m_scene); ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
obj.landData.Name = "NO LAND"; obj.LandData.Name = "NO LAND";
return obj; return obj;
} }
@ -103,7 +103,7 @@ namespace OpenSim.Region.CoreModules.World.Land
} }
ILandObject obj = new LandObject(UUID.Zero, false, m_scene); ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
obj.landData.Name = "NO LAND"; obj.LandData.Name = "NO LAND";
return obj; return obj;
} }

View File

@ -47,9 +47,9 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
// used for caching // used for caching
internal class ExtendedLandData { internal class ExtendedLandData {
public LandData landData; public LandData LandData;
public ulong regionHandle; public ulong RegionHandle;
public uint x, y; public uint X, Y;
} }
public class LandManagementModule : INonSharedRegionModule public class LandManagementModule : INonSharedRegionModule
@ -191,7 +191,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
if (m_landList.ContainsKey(local_id)) if (m_landList.ContainsKey(local_id))
{ {
m_landList[local_id].landData = newData; m_landList[local_id].LandData = newData;
m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, m_landList[local_id]); m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, m_landList[local_id]);
} }
} }
@ -218,12 +218,12 @@ namespace OpenSim.Region.CoreModules.World.Land
ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene);
fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
fullSimParcel.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
else else
fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
fullSimParcel.landData.ClaimDate = Util.UnixTimeSinceEpoch(); fullSimParcel.LandData.ClaimDate = Util.UnixTimeSinceEpoch();
AddLandObject(fullSimParcel); AddLandObject(fullSimParcel);
} }
@ -289,11 +289,11 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
if (avatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT) if (avatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT)
{ {
if (parcelAvatarIsEntering.isBannedFromLand(avatar.UUID)) if (parcelAvatarIsEntering.IsBannedFromLand(avatar.UUID))
{ {
SendYouAreBannedNotice(avatar); SendYouAreBannedNotice(avatar);
} }
else if (parcelAvatarIsEntering.isRestrictedFromLand(avatar.UUID)) else if (parcelAvatarIsEntering.IsRestrictedFromLand(avatar.UUID))
{ {
avatar.ControllingClient.SendAlertMessage( avatar.ControllingClient.SendAlertMessage(
"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!)."); "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
List<ILandObject> checkLandParcels = ParcelsNearPoint(presence.AbsolutePosition); List<ILandObject> checkLandParcels = ParcelsNearPoint(presence.AbsolutePosition);
foreach (ILandObject checkBan in checkLandParcels) foreach (ILandObject checkBan in checkLandParcels)
{ {
if (checkBan.isBannedFromLand(avatar.AgentId)) if (checkBan.IsBannedFromLand(avatar.AgentId))
{ {
checkBan.sendLandProperties((int)ParcelPropertiesStatus.CollisionBanned, false, (int)ParcelResult.Single, avatar); checkBan.SendLandProperties((int)ParcelPropertiesStatus.CollisionBanned, false, (int)ParcelResult.Single, avatar);
return; //Only send one return; //Only send one
} }
if (checkBan.isRestrictedFromLand(avatar.AgentId)) if (checkBan.IsRestrictedFromLand(avatar.AgentId))
{ {
checkBan.sendLandProperties((int)ParcelPropertiesStatus.CollisionNotOnAccessList, false, (int)ParcelResult.Single, avatar); checkBan.SendLandProperties((int)ParcelPropertiesStatus.CollisionNotOnAccessList, false, (int)ParcelResult.Single, avatar);
return; //Only send one return; //Only send one
} }
} }
@ -348,19 +348,19 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
if (!avatar.IsChildAgent) if (!avatar.IsChildAgent)
{ {
over.sendLandUpdateToClient(avatar.ControllingClient); over.SendLandUpdateToClient(avatar.ControllingClient);
m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.LocalID, m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID,
m_scene.RegionInfo.RegionID); m_scene.RegionInfo.RegionID);
} }
} }
if (avatar.currentParcelUUID != over.landData.GlobalID) if (avatar.currentParcelUUID != over.LandData.GlobalID)
{ {
if (!avatar.IsChildAgent) if (!avatar.IsChildAgent)
{ {
over.sendLandUpdateToClient(avatar.ControllingClient); over.SendLandUpdateToClient(avatar.ControllingClient);
avatar.currentParcelUUID = over.landData.GlobalID; avatar.currentParcelUUID = over.LandData.GlobalID;
m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.LocalID, m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID,
m_scene.RegionInfo.RegionID); m_scene.RegionInfo.RegionID);
} }
} }
@ -386,16 +386,16 @@ namespace OpenSim.Region.CoreModules.World.Land
if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) clientAvatar.sentMessageAboutRestrictedParcelFlyingDown)
{ {
EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.landData.LocalID, EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID,
m_scene.RegionInfo.RegionID); m_scene.RegionInfo.RegionID);
//They are going under the safety line! //They are going under the safety line!
if (!parcel.isBannedFromLand(clientAvatar.UUID)) if (!parcel.IsBannedFromLand(clientAvatar.UUID))
{ {
clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false; clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false;
} }
} }
else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
parcel.isBannedFromLand(clientAvatar.UUID)) parcel.IsBannedFromLand(clientAvatar.UUID))
{ {
SendYouAreBannedNotice(clientAvatar); SendYouAreBannedNotice(clientAvatar);
} }
@ -409,7 +409,7 @@ namespace OpenSim.Region.CoreModules.World.Land
ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
if (over != null) if (over != null)
{ {
if (!over.isBannedFromLand(avatar.UUID) || avatar.AbsolutePosition.Z >= LandChannel.BAN_LINE_SAFETY_HIEGHT) if (!over.IsBannedFromLand(avatar.UUID) || avatar.AbsolutePosition.Z >= LandChannel.BAN_LINE_SAFETY_HIEGHT)
{ {
avatar.lastKnownAllowedPosition = avatar.lastKnownAllowedPosition =
new Vector3(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z); new Vector3(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z);
@ -429,7 +429,7 @@ namespace OpenSim.Region.CoreModules.World.Land
if (land != null) if (land != null)
{ {
m_landList[landLocalID].sendAccessList(agentID, sessionID, flags, sequenceID, remote_client); m_landList[landLocalID].SendAccessList(agentID, sessionID, flags, sequenceID, remote_client);
} }
} }
@ -445,9 +445,9 @@ namespace OpenSim.Region.CoreModules.World.Land
if (land != null) if (land != null)
{ {
if (agentID == land.landData.OwnerID) if (agentID == land.LandData.OwnerID)
{ {
land.updateAccessList(flags, entries, remote_client); land.UpdateAccessList(flags, entries, remote_client);
} }
} }
else else
@ -476,9 +476,9 @@ namespace OpenSim.Region.CoreModules.World.Land
lock (m_landList) lock (m_landList)
{ {
int newLandLocalID = ++m_lastLandLocalID; int newLandLocalID = ++m_lastLandLocalID;
new_land.landData.LocalID = newLandLocalID; new_land.LandData.LocalID = newLandLocalID;
bool[,] landBitmap = new_land.getLandBitmap(); bool[,] landBitmap = new_land.GetLandBitmap();
for (int x = 0; x < landArrayMax; x++) for (int x = 0; x < landArrayMax; x++)
{ {
for (int y = 0; y < landArrayMax; y++) for (int y = 0; y < landArrayMax; y++)
@ -493,7 +493,7 @@ namespace OpenSim.Region.CoreModules.World.Land
m_landList.Add(newLandLocalID, new_land); m_landList.Add(newLandLocalID, new_land);
} }
new_land.forceUpdateLandInfo(); new_land.ForceUpdateLandInfo();
m_scene.EventManager.TriggerLandObjectAdded(new_land); m_scene.EventManager.TriggerLandObjectAdded(new_land);
return new_land; return new_land;
} }
@ -520,14 +520,14 @@ namespace OpenSim.Region.CoreModules.World.Land
} }
} }
m_scene.EventManager.TriggerLandObjectRemoved(m_landList[local_id].landData.GlobalID); m_scene.EventManager.TriggerLandObjectRemoved(m_landList[local_id].LandData.GlobalID);
m_landList.Remove(local_id); m_landList.Remove(local_id);
} }
} }
private void performFinalLandJoin(ILandObject master, ILandObject slave) private void performFinalLandJoin(ILandObject master, ILandObject slave)
{ {
bool[,] landBitmapSlave = slave.getLandBitmap(); bool[,] landBitmapSlave = slave.GetLandBitmap();
lock (m_landList) lock (m_landList)
{ {
for (int x = 0; x < 64; x++) for (int x = 0; x < 64; x++)
@ -536,14 +536,14 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
if (landBitmapSlave[x, y]) if (landBitmapSlave[x, y])
{ {
m_landIDList[x, y] = master.landData.LocalID; m_landIDList[x, y] = master.LandData.LocalID;
} }
} }
} }
} }
removeLandObject(slave.landData.LocalID); removeLandObject(slave.LandData.LocalID);
UpdateLandObject(master.landData.LocalID, master.landData); UpdateLandObject(master.LandData.LocalID, master.LandData);
} }
public ILandObject GetLandObject(int parcelLocalID) public ILandObject GetLandObject(int parcelLocalID)
@ -630,7 +630,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
foreach (LandObject p in m_landList.Values) foreach (LandObject p in m_landList.Values)
{ {
p.resetLandPrimCounts(); p.ResetLandPrimCounts();
} }
} }
} }
@ -651,7 +651,7 @@ namespace OpenSim.Region.CoreModules.World.Land
ILandObject landUnderPrim = GetLandObject(position.X, position.Y); ILandObject landUnderPrim = GetLandObject(position.X, position.Y);
if (landUnderPrim != null) if (landUnderPrim != null)
{ {
landUnderPrim.addPrimToCount(obj); landUnderPrim.AddPrimToCount(obj);
} }
} }
@ -662,7 +662,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
foreach (LandObject p in m_landList.Values) foreach (LandObject p in m_landList.Values)
{ {
p.removePrimFromCount(obj); p.RemovePrimFromCount(obj);
} }
} }
} }
@ -675,15 +675,15 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
foreach (LandObject p in m_landList.Values) foreach (LandObject p in m_landList.Values)
{ {
if (!landOwnersAndParcels.ContainsKey(p.landData.OwnerID)) if (!landOwnersAndParcels.ContainsKey(p.LandData.OwnerID))
{ {
List<LandObject> tempList = new List<LandObject>(); List<LandObject> tempList = new List<LandObject>();
tempList.Add(p); tempList.Add(p);
landOwnersAndParcels.Add(p.landData.OwnerID, tempList); landOwnersAndParcels.Add(p.LandData.OwnerID, tempList);
} }
else else
{ {
landOwnersAndParcels[p.landData.OwnerID].Add(p); landOwnersAndParcels[p.LandData.OwnerID].Add(p);
} }
} }
} }
@ -694,15 +694,15 @@ namespace OpenSim.Region.CoreModules.World.Land
int simPrims = 0; int simPrims = 0;
foreach (LandObject p in landOwnersAndParcels[owner]) foreach (LandObject p in landOwnersAndParcels[owner])
{ {
simArea += p.landData.Area; simArea += p.LandData.Area;
simPrims += p.landData.OwnerPrims + p.landData.OtherPrims + p.landData.GroupPrims + simPrims += p.LandData.OwnerPrims + p.LandData.OtherPrims + p.LandData.GroupPrims +
p.landData.SelectedPrims; p.LandData.SelectedPrims;
} }
foreach (LandObject p in landOwnersAndParcels[owner]) foreach (LandObject p in landOwnersAndParcels[owner])
{ {
p.landData.SimwideArea = simArea; p.LandData.SimwideArea = simArea;
p.landData.SimwidePrims = simPrims; p.LandData.SimwidePrims = simPrims;
} }
} }
} }
@ -779,26 +779,26 @@ namespace OpenSim.Region.CoreModules.World.Land
//Lets create a new land object with bitmap activated at that point (keeping the old land objects info) //Lets create a new land object with bitmap activated at that point (keeping the old land objects info)
ILandObject newLand = startLandObject.Copy(); ILandObject newLand = startLandObject.Copy();
newLand.landData.Name = newLand.landData.Name; newLand.LandData.Name = newLand.LandData.Name;
newLand.landData.GlobalID = UUID.Random(); newLand.LandData.GlobalID = UUID.Random();
newLand.setLandBitmap(newLand.getSquareLandBitmap(start_x, start_y, end_x, end_y)); newLand.SetLandBitmap(newLand.GetSquareLandBitmap(start_x, start_y, end_x, end_y));
//Now, lets set the subdivision area of the original to false //Now, lets set the subdivision area of the original to false
int startLandObjectIndex = startLandObject.landData.LocalID; int startLandObjectIndex = startLandObject.LandData.LocalID;
lock (m_landList) lock (m_landList)
{ {
m_landList[startLandObjectIndex].setLandBitmap( m_landList[startLandObjectIndex].SetLandBitmap(
newLand.modifyLandBitmapSquare(startLandObject.getLandBitmap(), start_x, start_y, end_x, end_y, false)); newLand.ModifyLandBitmapSquare(startLandObject.GetLandBitmap(), start_x, start_y, end_x, end_y, false));
m_landList[startLandObjectIndex].forceUpdateLandInfo(); m_landList[startLandObjectIndex].ForceUpdateLandInfo();
} }
EventManagerOnParcelPrimCountTainted(); EventManagerOnParcelPrimCountTainted();
//Now add the new land object //Now add the new land object
ILandObject result = AddLandObject(newLand); ILandObject result = AddLandObject(newLand);
UpdateLandObject(startLandObject.landData.LocalID, startLandObject.landData); UpdateLandObject(startLandObject.LandData.LocalID, startLandObject.LandData);
result.sendLandUpdateToAvatarsOverMe(); result.SendLandUpdateToAvatarsOverMe();
} }
/// <summary> /// <summary>
@ -846,7 +846,7 @@ namespace OpenSim.Region.CoreModules.World.Land
} }
foreach (ILandObject p in selectedLandObjects) foreach (ILandObject p in selectedLandObjects)
{ {
if (p.landData.OwnerID != masterLandObject.landData.OwnerID) if (p.LandData.OwnerID != masterLandObject.LandData.OwnerID)
{ {
return; return;
} }
@ -856,14 +856,14 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
foreach (ILandObject slaveLandObject in selectedLandObjects) foreach (ILandObject slaveLandObject in selectedLandObjects)
{ {
m_landList[masterLandObject.landData.LocalID].setLandBitmap( m_landList[masterLandObject.LandData.LocalID].SetLandBitmap(
slaveLandObject.mergeLandBitmaps(masterLandObject.getLandBitmap(), slaveLandObject.getLandBitmap())); slaveLandObject.MergeLandBitmaps(masterLandObject.GetLandBitmap(), slaveLandObject.GetLandBitmap()));
performFinalLandJoin(masterLandObject, slaveLandObject); performFinalLandJoin(masterLandObject, slaveLandObject);
} }
} }
EventManagerOnParcelPrimCountTainted(); EventManagerOnParcelPrimCountTainted();
masterLandObject.sendLandUpdateToAvatarsOverMe(); masterLandObject.SendLandUpdateToAvatarsOverMe();
} }
#endregion #endregion
@ -894,19 +894,19 @@ namespace OpenSim.Region.CoreModules.World.Land
if (currentParcelBlock != null) if (currentParcelBlock != null)
{ {
if (currentParcelBlock.landData.OwnerID == remote_client.AgentId) if (currentParcelBlock.LandData.OwnerID == remote_client.AgentId)
{ {
//Owner Flag //Owner Flag
tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER); tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER);
} }
else if (currentParcelBlock.landData.SalePrice > 0 && else if (currentParcelBlock.LandData.SalePrice > 0 &&
(currentParcelBlock.landData.AuthBuyerID == UUID.Zero || (currentParcelBlock.LandData.AuthBuyerID == UUID.Zero ||
currentParcelBlock.landData.AuthBuyerID == remote_client.AgentId)) currentParcelBlock.LandData.AuthBuyerID == remote_client.AgentId))
{ {
//Sale Flag //Sale Flag
tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_IS_FOR_SALE); tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_IS_FOR_SALE);
} }
else if (currentParcelBlock.landData.OwnerID == UUID.Zero) else if (currentParcelBlock.LandData.OwnerID == UUID.Zero)
{ {
//Public Flag //Public Flag
tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC); tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC);
@ -980,7 +980,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
if (!temp.Contains(currentParcel)) if (!temp.Contains(currentParcel))
{ {
currentParcel.forceUpdateLandInfo(); currentParcel.ForceUpdateLandInfo();
temp.Add(currentParcel); temp.Add(currentParcel);
} }
} }
@ -996,7 +996,7 @@ namespace OpenSim.Region.CoreModules.World.Land
for (int i = 0; i < temp.Count; i++) for (int i = 0; i < temp.Count; i++)
{ {
temp[i].sendLandProperties(sequence_id, snap_selection, requestResult, remote_client); temp[i].SendLandProperties(sequence_id, snap_selection, requestResult, remote_client);
} }
SendParcelOverlay(remote_client); SendParcelOverlay(remote_client);
@ -1010,7 +1010,7 @@ namespace OpenSim.Region.CoreModules.World.Land
m_landList.TryGetValue(localID, out land); m_landList.TryGetValue(localID, out land);
} }
if (land != null) land.updateLandProperties(args, remote_client); if (land != null) land.UpdateLandProperties(args, remote_client);
} }
public void ClientOnParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client) public void ClientOnParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client)
@ -1026,7 +1026,7 @@ namespace OpenSim.Region.CoreModules.World.Land
public void ClientOnParcelSelectObjects(int local_id, int request_type, public void ClientOnParcelSelectObjects(int local_id, int request_type,
List<UUID> returnIDs, IClientAPI remote_client) List<UUID> returnIDs, IClientAPI remote_client)
{ {
m_landList[local_id].sendForceObjectSelect(local_id, request_type, returnIDs, remote_client); m_landList[local_id].SendForceObjectSelect(local_id, request_type, returnIDs, remote_client);
} }
public void ClientOnParcelObjectOwnerRequest(int local_id, IClientAPI remote_client) public void ClientOnParcelObjectOwnerRequest(int local_id, IClientAPI remote_client)
@ -1039,7 +1039,7 @@ namespace OpenSim.Region.CoreModules.World.Land
if (land != null) if (land != null)
{ {
m_landList[local_id].sendLandObjectOwners(remote_client); m_landList[local_id].SendLandObjectOwners(remote_client);
} }
else else
{ {
@ -1059,10 +1059,10 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
if (m_scene.Permissions.IsGod(remote_client.AgentId)) if (m_scene.Permissions.IsGod(remote_client.AgentId))
{ {
land.landData.OwnerID = ownerID; land.LandData.OwnerID = ownerID;
m_scene.Broadcast(SendParcelOverlay); m_scene.Broadcast(SendParcelOverlay);
land.sendLandUpdateToClient(remote_client); land.SendLandUpdateToClient(remote_client);
} }
} }
} }
@ -1080,11 +1080,11 @@ namespace OpenSim.Region.CoreModules.World.Land
if (m_scene.Permissions.CanAbandonParcel(remote_client.AgentId, land)) if (m_scene.Permissions.CanAbandonParcel(remote_client.AgentId, land))
{ {
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
land.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; land.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
else else
land.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; land.LandData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
m_scene.Broadcast(SendParcelOverlay); m_scene.Broadcast(SendParcelOverlay);
land.sendLandUpdateToClient(remote_client); land.SendLandUpdateToClient(remote_client);
} }
} }
} }
@ -1102,13 +1102,13 @@ namespace OpenSim.Region.CoreModules.World.Land
if (m_scene.Permissions.CanReclaimParcel(remote_client.AgentId, land)) if (m_scene.Permissions.CanReclaimParcel(remote_client.AgentId, land))
{ {
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
land.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; land.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
else else
land.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; land.LandData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
land.landData.ClaimDate = Util.UnixTimeSinceEpoch(); land.LandData.ClaimDate = Util.UnixTimeSinceEpoch();
land.landData.IsGroupOwned = false; land.LandData.IsGroupOwned = false;
m_scene.Broadcast(SendParcelOverlay); m_scene.Broadcast(SendParcelOverlay);
land.sendLandUpdateToClient(remote_client); land.SendLandUpdateToClient(remote_client);
} }
} }
} }
@ -1130,7 +1130,7 @@ namespace OpenSim.Region.CoreModules.World.Land
if (land != null) if (land != null)
{ {
land.updateLandSold(e.agentId, e.groupId, e.groupOwned, (uint)e.transactionID, e.parcelPrice, e.parcelArea); land.UpdateLandSold(e.agentId, e.groupId, e.groupOwned, (uint)e.transactionID, e.parcelPrice, e.parcelArea);
} }
} }
} }
@ -1151,11 +1151,11 @@ namespace OpenSim.Region.CoreModules.World.Land
if (lob != null) if (lob != null)
{ {
UUID AuthorizedID = lob.landData.AuthBuyerID; UUID AuthorizedID = lob.LandData.AuthBuyerID;
int saleprice = lob.landData.SalePrice; int saleprice = lob.LandData.SalePrice;
UUID pOwnerID = lob.landData.OwnerID; UUID pOwnerID = lob.LandData.OwnerID;
bool landforsale = ((lob.landData.Flags & bool landforsale = ((lob.LandData.Flags &
(uint)(ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects)) != 0); (uint)(ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects)) != 0);
if ((AuthorizedID == UUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale) if ((AuthorizedID == UUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale)
{ {
@ -1184,7 +1184,7 @@ namespace OpenSim.Region.CoreModules.World.Land
if (land != null) if (land != null)
{ {
land.deedToGroup(groupID); land.DeedToGroup(groupID);
} }
} }
@ -1203,8 +1203,8 @@ namespace OpenSim.Region.CoreModules.World.Land
public void IncomingLandObjectFromStorage(LandData data) public void IncomingLandObjectFromStorage(LandData data)
{ {
ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene); ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
new_land.landData = data.Copy(); new_land.LandData = data.Copy();
new_land.setLandBitmapFromByteArray(); new_land.SetLandBitmapFromByteArray();
AddLandObject(new_land); AddLandObject(new_land);
} }
@ -1218,7 +1218,7 @@ namespace OpenSim.Region.CoreModules.World.Land
if (selectedParcel == null) return; if (selectedParcel == null) return;
selectedParcel.returnLandObjects(returnType, agentIDs, taskIDs, remoteClient); selectedParcel.ReturnLandObjects(returnType, agentIDs, taskIDs, remoteClient);
} }
public void EventManagerOnNoLandDataFromStorage() public void EventManagerOnNoLandDataFromStorage()
@ -1234,7 +1234,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
foreach (LandObject obj in m_landList.Values) foreach (LandObject obj in m_landList.Values)
{ {
obj.setParcelObjectMaxOverride(overrideDel); obj.SetParcelObjectMaxOverride(overrideDel);
} }
} }
} }
@ -1337,7 +1337,7 @@ namespace OpenSim.Region.CoreModules.World.Land
return; return;
} }
remoteClient.SendParcelDwellReply(localID, selectedParcel.landData.GlobalID, selectedParcel.landData.Dwell); remoteClient.SendParcelDwellReply(localID, selectedParcel.LandData.GlobalID, selectedParcel.LandData.Dwell);
} }
private void ClientOnParcelInfoRequest(IClientAPI remoteClient, UUID parcelID) private void ClientOnParcelInfoRequest(IClientAPI remoteClient, UUID parcelID)
@ -1345,39 +1345,43 @@ namespace OpenSim.Region.CoreModules.World.Land
if (parcelID == UUID.Zero) if (parcelID == UUID.Zero)
return; return;
ExtendedLandData data = (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), delegate(string id) { ExtendedLandData data =
UUID parcel = UUID.Zero; (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(),
UUID.TryParse(id, out parcel); delegate(string id)
// assume we've got the parcelID we just computed in RemoteParcelRequest {
ExtendedLandData extLandData = new ExtendedLandData(); UUID parcel = UUID.Zero;
Util.ParseFakeParcelID(parcel, out extLandData.regionHandle, out extLandData.x, out extLandData.y); UUID.TryParse(id, out parcel);
m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", // assume we've got the parcelID we just computed in RemoteParcelRequest
extLandData.regionHandle, extLandData.x, extLandData.y); ExtendedLandData extLandData = new ExtendedLandData();
Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle,
// for this region or for somewhere else? out extLandData.X, out extLandData.Y);
if (extLandData.regionHandle == m_scene.RegionInfo.RegionHandle) m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}",
{ extLandData.RegionHandle, extLandData.X, extLandData.Y);
extLandData.landData = this.GetLandObject(extLandData.x, extLandData.y).landData;
} // for this region or for somewhere else?
else if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle)
{ {
ILandService landService = m_scene.RequestModuleInterface<ILandService>(); extLandData.LandData = this.GetLandObject(extLandData.X, extLandData.Y).LandData;
extLandData.landData = landService.GetLandData(extLandData.regionHandle, }
extLandData.x, else
extLandData.y); {
if (extLandData.landData == null) ILandService landService = m_scene.RequestModuleInterface<ILandService>();
{ extLandData.LandData = landService.GetLandData(extLandData.RegionHandle,
// we didn't find the region/land => don't cache extLandData.X,
return null; extLandData.Y);
} if (extLandData.LandData == null)
} {
return extLandData; // we didn't find the region/land => don't cache
}); return null;
}
}
return extLandData;
});
if (data != null) // if we found some data, send it if (data != null) // if we found some data, send it
{ {
GridRegion info; GridRegion info;
if (data.regionHandle == m_scene.RegionInfo.RegionHandle) if (data.RegionHandle == m_scene.RegionInfo.RegionHandle)
{ {
info = new GridRegion(m_scene.RegionInfo); info = new GridRegion(m_scene.RegionInfo);
} }
@ -1385,18 +1389,18 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
// most likely still cached from building the extLandData entry // most likely still cached from building the extLandData entry
uint x = 0, y = 0; uint x = 0, y = 0;
Utils.LongToUInts(data.regionHandle, out x, out y); Utils.LongToUInts(data.RegionHandle, out x, out y);
info = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); info = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
} }
// we need to transfer the fake parcelID, not the one in landData, so the viewer can match it to the landmark. // we need to transfer the fake parcelID, not the one in landData, so the viewer can match it to the landmark.
m_log.DebugFormat("[LAND] got parcelinfo for parcel {0} in region {1}; sending...", m_log.DebugFormat("[LAND] got parcelinfo for parcel {0} in region {1}; sending...",
data.landData.Name, data.regionHandle); data.LandData.Name, data.RegionHandle);
// HACK for now // HACK for now
RegionInfo r = new RegionInfo(); RegionInfo r = new RegionInfo();
r.RegionName = info.RegionName; r.RegionName = info.RegionName;
r.RegionLocX = (uint)info.RegionLocX; r.RegionLocX = (uint)info.RegionLocX;
r.RegionLocY = (uint)info.RegionLocY; r.RegionLocY = (uint)info.RegionLocY;
remoteClient.SendParcelInfo(r, data.landData, parcelID, data.x, data.y); remoteClient.SendParcelInfo(r, data.LandData, parcelID, data.X, data.Y);
} }
else else
m_log.Debug("[LAND] got no parcelinfo; not sending"); m_log.Debug("[LAND] got no parcelinfo; not sending");
@ -1415,9 +1419,9 @@ namespace OpenSim.Region.CoreModules.World.Land
if (!m_scene.Permissions.CanEditParcel(remoteClient.AgentId, land)) if (!m_scene.Permissions.CanEditParcel(remoteClient.AgentId, land))
return; return;
land.landData.OtherCleanTime = otherCleanTime; land.LandData.OtherCleanTime = otherCleanTime;
UpdateLandObject(localID, land.landData); UpdateLandObject(localID, land.LandData);
} }
} }
} }

View File

@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.World.Land
protected Scene m_scene; protected Scene m_scene;
protected List<SceneObjectGroup> primsOverMe = new List<SceneObjectGroup>(); protected List<SceneObjectGroup> primsOverMe = new List<SceneObjectGroup>();
public bool[,] landBitmap public bool[,] LandBitmap
{ {
get { return m_landBitmap; } get { return m_landBitmap; }
set { m_landBitmap = value; } set { m_landBitmap = value; }
@ -63,14 +63,14 @@ namespace OpenSim.Region.CoreModules.World.Land
#region ILandObject Members #region ILandObject Members
public LandData landData public LandData LandData
{ {
get { return m_landData; } get { return m_landData; }
set { m_landData = value; } set { m_landData = value; }
} }
public UUID regionUUID public UUID RegionUUID
{ {
get { return m_scene.RegionInfo.RegionID; } get { return m_scene.RegionInfo.RegionID; }
} }
@ -80,8 +80,8 @@ namespace OpenSim.Region.CoreModules.World.Land
public LandObject(UUID owner_id, bool is_group_owned, Scene scene) public LandObject(UUID owner_id, bool is_group_owned, Scene scene)
{ {
m_scene = scene; m_scene = scene;
landData.OwnerID = owner_id; LandData.OwnerID = owner_id;
landData.IsGroupOwned = is_group_owned; LandData.IsGroupOwned = is_group_owned;
} }
#endregion #endregion
@ -96,11 +96,11 @@ namespace OpenSim.Region.CoreModules.World.Land
/// <param name="x"></param> /// <param name="x"></param>
/// <param name="y"></param> /// <param name="y"></param>
/// <returns>Returns true if the piece of land contains the specified point</returns> /// <returns>Returns true if the piece of land contains the specified point</returns>
public bool containsPoint(int x, int y) public bool ContainsPoint(int x, int y)
{ {
if (x >= 0 && y >= 0 && x <= Constants.RegionSize && x <= Constants.RegionSize) if (x >= 0 && y >= 0 && x <= Constants.RegionSize && x <= Constants.RegionSize)
{ {
return (landBitmap[x / 4, y / 4] == true); return (LandBitmap[x / 4, y / 4] == true);
} }
else else
{ {
@ -110,11 +110,11 @@ namespace OpenSim.Region.CoreModules.World.Land
public ILandObject Copy() public ILandObject Copy()
{ {
ILandObject newLand = new LandObject(landData.OwnerID, landData.IsGroupOwned, m_scene); ILandObject newLand = new LandObject(LandData.OwnerID, LandData.IsGroupOwned, m_scene);
//Place all new variables here! //Place all new variables here!
newLand.landBitmap = (bool[,]) (landBitmap.Clone()); newLand.LandBitmap = (bool[,]) (LandBitmap.Clone());
newLand.landData = landData.Copy(); newLand.LandData = LandData.Copy();
return newLand; return newLand;
} }
@ -122,16 +122,16 @@ namespace OpenSim.Region.CoreModules.World.Land
static overrideParcelMaxPrimCountDelegate overrideParcelMaxPrimCount; static overrideParcelMaxPrimCountDelegate overrideParcelMaxPrimCount;
static overrideSimulatorMaxPrimCountDelegate overrideSimulatorMaxPrimCount; static overrideSimulatorMaxPrimCountDelegate overrideSimulatorMaxPrimCount;
public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) public void SetParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel)
{ {
overrideParcelMaxPrimCount = overrideDel; overrideParcelMaxPrimCount = overrideDel;
} }
public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) public void SetSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel)
{ {
overrideSimulatorMaxPrimCount = overrideDel; overrideSimulatorMaxPrimCount = overrideDel;
} }
public int getParcelMaxPrimCount(ILandObject thisObject) public int GetParcelMaxPrimCount(ILandObject thisObject)
{ {
if (overrideParcelMaxPrimCount != null) if (overrideParcelMaxPrimCount != null)
{ {
@ -141,11 +141,11 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
//Normal Calculations //Normal Calculations
return Convert.ToInt32( return Convert.ToInt32(
Math.Round((Convert.ToDecimal(landData.Area) / Convert.ToDecimal(65536)) * m_scene.objectCapacity * Math.Round((Convert.ToDecimal(LandData.Area) / Convert.ToDecimal(65536)) * m_scene.objectCapacity *
Convert.ToDecimal(m_scene.RegionInfo.RegionSettings.ObjectBonus))); ; Convert.ToDecimal(m_scene.RegionInfo.RegionSettings.ObjectBonus))); ;
} }
} }
public int getSimulatorMaxPrimCount(ILandObject thisObject) public int GetSimulatorMaxPrimCount(ILandObject thisObject)
{ {
if (overrideSimulatorMaxPrimCount != null) if (overrideSimulatorMaxPrimCount != null)
{ {
@ -161,7 +161,7 @@ namespace OpenSim.Region.CoreModules.World.Land
#region Packet Request Handling #region Packet Request Handling
public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client)
{ {
IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>(); IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>();
uint regionFlags = 336723974 & ~((uint)(RegionFlags.AllowLandmark | RegionFlags.AllowSetHome)); uint regionFlags = 336723974 & ~((uint)(RegionFlags.AllowLandmark | RegionFlags.AllowSetHome));
@ -175,18 +175,18 @@ namespace OpenSim.Region.CoreModules.World.Land
// if (landData.OwnerID == remote_client.AgentId) // if (landData.OwnerID == remote_client.AgentId)
// regionFlags |= (uint)RegionFlags.AllowSetHome; // regionFlags |= (uint)RegionFlags.AllowSetHome;
remote_client.SendLandProperties(sequence_id, remote_client.SendLandProperties(sequence_id,
snap_selection, request_result, landData, snap_selection, request_result, LandData,
(float)m_scene.RegionInfo.RegionSettings.ObjectBonus, (float)m_scene.RegionInfo.RegionSettings.ObjectBonus,
getParcelMaxPrimCount(this), GetParcelMaxPrimCount(this),
getSimulatorMaxPrimCount(this), regionFlags); GetSimulatorMaxPrimCount(this), regionFlags);
} }
public void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client) public void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client)
{ {
if (m_scene.Permissions.CanEditParcel(remote_client.AgentId,this)) if (m_scene.Permissions.CanEditParcel(remote_client.AgentId,this))
{ {
//Needs later group support //Needs later group support
LandData newData = landData.Copy(); LandData newData = LandData.Copy();
if (args.AuthBuyerID != newData.AuthBuyerID || args.SalePrice != newData.SalePrice) if (args.AuthBuyerID != newData.AuthBuyerID || args.SalePrice != newData.SalePrice)
{ {
@ -212,15 +212,15 @@ namespace OpenSim.Region.CoreModules.World.Land
newData.UserLocation = args.UserLocation; newData.UserLocation = args.UserLocation;
newData.UserLookAt = args.UserLookAt; newData.UserLookAt = args.UserLookAt;
m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
sendLandUpdateToAvatarsOverMe(); SendLandUpdateToAvatarsOverMe();
} }
} }
public void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) public void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area)
{ {
LandData newData = landData.Copy(); LandData newData = LandData.Copy();
newData.OwnerID = avatarID; newData.OwnerID = avatarID;
newData.GroupID = groupID; newData.GroupID = groupID;
newData.IsGroupOwned = groupOwned; newData.IsGroupOwned = groupOwned;
@ -230,45 +230,45 @@ namespace OpenSim.Region.CoreModules.World.Land
newData.SalePrice = 0; newData.SalePrice = 0;
newData.AuthBuyerID = UUID.Zero; newData.AuthBuyerID = UUID.Zero;
newData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects); newData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects);
m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
sendLandUpdateToAvatarsOverMe(); SendLandUpdateToAvatarsOverMe();
} }
public void deedToGroup(UUID groupID) public void DeedToGroup(UUID groupID)
{ {
LandData newData = landData.Copy(); LandData newData = LandData.Copy();
newData.OwnerID = groupID; newData.OwnerID = groupID;
newData.GroupID = groupID; newData.GroupID = groupID;
newData.IsGroupOwned = true; newData.IsGroupOwned = true;
m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
sendLandUpdateToAvatarsOverMe(); SendLandUpdateToAvatarsOverMe();
} }
public bool isEitherBannedOrRestricted(UUID avatar) public bool IsEitherBannedOrRestricted(UUID avatar)
{ {
if (isBannedFromLand(avatar)) if (IsBannedFromLand(avatar))
{ {
return true; return true;
} }
else if (isRestrictedFromLand(avatar)) else if (IsRestrictedFromLand(avatar))
{ {
return true; return true;
} }
return false; return false;
} }
public bool isBannedFromLand(UUID avatar) public bool IsBannedFromLand(UUID avatar)
{ {
if ((landData.Flags & (uint) ParcelFlags.UseBanList) > 0) if ((LandData.Flags & (uint) ParcelFlags.UseBanList) > 0)
{ {
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = avatar; entry.AgentID = avatar;
entry.Flags = AccessList.Ban; entry.Flags = AccessList.Ban;
entry.Time = new DateTime(); entry.Time = new DateTime();
if (landData.ParcelAccessList.Contains(entry)) if (LandData.ParcelAccessList.Contains(entry))
{ {
//They are banned, so lets send them a notice about this parcel //They are banned, so lets send them a notice about this parcel
return true; return true;
@ -277,15 +277,15 @@ namespace OpenSim.Region.CoreModules.World.Land
return false; return false;
} }
public bool isRestrictedFromLand(UUID avatar) public bool IsRestrictedFromLand(UUID avatar)
{ {
if ((landData.Flags & (uint) ParcelFlags.UseAccessList) > 0) if ((LandData.Flags & (uint) ParcelFlags.UseAccessList) > 0)
{ {
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = avatar; entry.AgentID = avatar;
entry.Flags = AccessList.Access; entry.Flags = AccessList.Access;
entry.Time = new DateTime(); entry.Time = new DateTime();
if (!landData.ParcelAccessList.Contains(entry)) if (!LandData.ParcelAccessList.Contains(entry))
{ {
//They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel //They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel
return true; return true;
@ -294,12 +294,12 @@ namespace OpenSim.Region.CoreModules.World.Land
return false; return false;
} }
public void sendLandUpdateToClient(IClientAPI remote_client) public void SendLandUpdateToClient(IClientAPI remote_client)
{ {
sendLandProperties(0, false, 0, remote_client); SendLandProperties(0, false, 0, remote_client);
} }
public void sendLandUpdateToAvatarsOverMe() public void SendLandUpdateToAvatarsOverMe()
{ {
List<ScenePresence> avatars = m_scene.GetAvatars(); List<ScenePresence> avatars = m_scene.GetAvatars();
ILandObject over = null; ILandObject over = null;
@ -319,14 +319,15 @@ namespace OpenSim.Region.CoreModules.World.Land
if (over != null) if (over != null)
{ {
if (over.landData.LocalID == landData.LocalID) if (over.LandData.LocalID == LandData.LocalID)
{ {
if (((over.landData.Flags & (uint)ParcelFlags.AllowDamage) != 0) && m_scene.RegionInfo.RegionSettings.AllowDamage) if (((over.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0) &&
m_scene.RegionInfo.RegionSettings.AllowDamage)
avatars[i].Invulnerable = false; avatars[i].Invulnerable = false;
else else
avatars[i].Invulnerable = true; avatars[i].Invulnerable = true;
sendLandUpdateToClient(avatars[i].ControllingClient); SendLandUpdateToClient(avatars[i].ControllingClient);
} }
} }
} }
@ -336,10 +337,10 @@ namespace OpenSim.Region.CoreModules.World.Land
#region AccessList Functions #region AccessList Functions
public List<UUID> createAccessListArrayByFlag(AccessList flag) public List<UUID> CreateAccessListArrayByFlag(AccessList flag)
{ {
List<UUID> list = new List<UUID>(); List<UUID> list = new List<UUID>();
foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList) foreach (ParcelManager.ParcelAccessEntry entry in LandData.ParcelAccessList)
{ {
if (entry.Flags == flag) if (entry.Flags == flag)
{ {
@ -354,26 +355,26 @@ namespace OpenSim.Region.CoreModules.World.Land
return list; return list;
} }
public void sendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, public void SendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID,
IClientAPI remote_client) IClientAPI remote_client)
{ {
if (flags == (uint) AccessList.Access || flags == (uint) AccessList.Both) if (flags == (uint) AccessList.Access || flags == (uint) AccessList.Both)
{ {
List<UUID> avatars = createAccessListArrayByFlag(AccessList.Access); List<UUID> avatars = CreateAccessListArrayByFlag(AccessList.Access);
remote_client.SendLandAccessListData(avatars,(uint) AccessList.Access,landData.LocalID); remote_client.SendLandAccessListData(avatars,(uint) AccessList.Access,LandData.LocalID);
} }
if (flags == (uint) AccessList.Ban || flags == (uint) AccessList.Both) if (flags == (uint) AccessList.Ban || flags == (uint) AccessList.Both)
{ {
List<UUID> avatars = createAccessListArrayByFlag(AccessList.Ban); List<UUID> avatars = CreateAccessListArrayByFlag(AccessList.Ban);
remote_client.SendLandAccessListData(avatars, (uint)AccessList.Ban, landData.LocalID); remote_client.SendLandAccessListData(avatars, (uint)AccessList.Ban, LandData.LocalID);
} }
} }
public void updateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client) public void UpdateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client)
{ {
LandData newData = landData.Copy(); LandData newData = LandData.Copy();
if (entries.Count == 1 && entries[0].AgentID == UUID.Zero) if (entries.Count == 1 && entries[0].AgentID == UUID.Zero)
{ {
@ -406,36 +407,36 @@ namespace OpenSim.Region.CoreModules.World.Land
} }
} }
m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
} }
#endregion #endregion
#region Update Functions #region Update Functions
public void updateLandBitmapByteArray() public void UpdateLandBitmapByteArray()
{ {
landData.Bitmap = convertLandBitmapToBytes(); LandData.Bitmap = ConvertLandBitmapToBytes();
} }
/// <summary> /// <summary>
/// Update all settings in land such as area, bitmap byte array, etc /// Update all settings in land such as area, bitmap byte array, etc
/// </summary> /// </summary>
public void forceUpdateLandInfo() public void ForceUpdateLandInfo()
{ {
updateAABBAndAreaValues(); UpdateAABBAndAreaValues();
updateLandBitmapByteArray(); UpdateLandBitmapByteArray();
} }
public void setLandBitmapFromByteArray() public void SetLandBitmapFromByteArray()
{ {
landBitmap = convertBytesToLandBitmap(); LandBitmap = ConvertBytesToLandBitmap();
} }
/// <summary> /// <summary>
/// Updates the AABBMin and AABBMax values after area/shape modification of the land object /// Updates the AABBMin and AABBMax values after area/shape modification of the land object
/// </summary> /// </summary>
private void updateAABBAndAreaValues() private void UpdateAABBAndAreaValues()
{ {
int min_x = 64; int min_x = 64;
int min_y = 64; int min_y = 64;
@ -447,7 +448,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
for (y = 0; y < 64; y++) for (y = 0; y < 64; y++)
{ {
if (landBitmap[x, y] == true) if (LandBitmap[x, y] == true)
{ {
if (min_x > x) min_x = x; if (min_x > x) min_x = x;
if (min_y > y) min_y = y; if (min_y > y) min_y = y;
@ -463,7 +464,7 @@ namespace OpenSim.Region.CoreModules.World.Land
int ty = min_y * 4; int ty = min_y * 4;
if (ty > ((int)Constants.RegionSize - 1)) if (ty > ((int)Constants.RegionSize - 1))
ty = ((int)Constants.RegionSize - 1); ty = ((int)Constants.RegionSize - 1);
landData.AABBMin = LandData.AABBMin =
new Vector3((float) (min_x * 4), (float) (min_y * 4), new Vector3((float) (min_x * 4), (float) (min_y * 4),
(float) m_scene.Heightmap[tx, ty]); (float) m_scene.Heightmap[tx, ty]);
@ -473,10 +474,10 @@ namespace OpenSim.Region.CoreModules.World.Land
ty = max_y * 4; ty = max_y * 4;
if (ty > ((int)Constants.RegionSize - 1)) if (ty > ((int)Constants.RegionSize - 1))
ty = ((int)Constants.RegionSize - 1); ty = ((int)Constants.RegionSize - 1);
landData.AABBMax = LandData.AABBMax =
new Vector3((float) (max_x * 4), (float) (max_y * 4), new Vector3((float) (max_x * 4), (float) (max_y * 4),
(float) m_scene.Heightmap[tx, ty]); (float) m_scene.Heightmap[tx, ty]);
landData.Area = tempArea; LandData.Area = tempArea;
} }
#endregion #endregion
@ -487,7 +488,7 @@ namespace OpenSim.Region.CoreModules.World.Land
/// Sets the land's bitmap manually /// Sets the land's bitmap manually
/// </summary> /// </summary>
/// <param name="bitmap">64x64 block representing where this land is on a map</param> /// <param name="bitmap">64x64 block representing where this land is on a map</param>
public void setLandBitmap(bool[,] bitmap) public void SetLandBitmap(bool[,] bitmap)
{ {
if (bitmap.GetLength(0) != 64 || bitmap.GetLength(1) != 64 || bitmap.Rank != 2) if (bitmap.GetLength(0) != 64 || bitmap.GetLength(1) != 64 || bitmap.Rank != 2)
{ {
@ -497,8 +498,8 @@ namespace OpenSim.Region.CoreModules.World.Land
else else
{ {
//Valid: Lets set it //Valid: Lets set it
landBitmap = bitmap; LandBitmap = bitmap;
forceUpdateLandInfo(); ForceUpdateLandInfo();
} }
} }
@ -506,18 +507,18 @@ namespace OpenSim.Region.CoreModules.World.Land
/// Gets the land's bitmap manually /// Gets the land's bitmap manually
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public bool[,] getLandBitmap() public bool[,] GetLandBitmap()
{ {
return landBitmap; return LandBitmap;
} }
/// <summary> /// <summary>
/// Full sim land object creation /// Full sim land object creation
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public bool[,] basicFullRegionLandBitmap() public bool[,] BasicFullRegionLandBitmap()
{ {
return getSquareLandBitmap(0, 0, (int) Constants.RegionSize, (int) Constants.RegionSize); return GetSquareLandBitmap(0, 0, (int) Constants.RegionSize, (int) Constants.RegionSize);
} }
/// <summary> /// <summary>
@ -528,12 +529,12 @@ namespace OpenSim.Region.CoreModules.World.Land
/// <param name="end_x"></param> /// <param name="end_x"></param>
/// <param name="end_y"></param> /// <param name="end_y"></param>
/// <returns></returns> /// <returns></returns>
public bool[,] getSquareLandBitmap(int start_x, int start_y, int end_x, int end_y) public bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y)
{ {
bool[,] tempBitmap = new bool[64,64]; bool[,] tempBitmap = new bool[64,64];
tempBitmap.Initialize(); tempBitmap.Initialize();
tempBitmap = modifyLandBitmapSquare(tempBitmap, start_x, start_y, end_x, end_y, true); tempBitmap = ModifyLandBitmapSquare(tempBitmap, start_x, start_y, end_x, end_y, true);
return tempBitmap; return tempBitmap;
} }
@ -547,7 +548,7 @@ namespace OpenSim.Region.CoreModules.World.Land
/// <param name="end_y"></param> /// <param name="end_y"></param>
/// <param name="set_value"></param> /// <param name="set_value"></param>
/// <returns></returns> /// <returns></returns>
public bool[,] modifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, public bool[,] ModifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y,
bool set_value) bool set_value)
{ {
if (land_bitmap.GetLength(0) != 64 || land_bitmap.GetLength(1) != 64 || land_bitmap.Rank != 2) 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
/// <param name="bitmap_base"></param> /// <param name="bitmap_base"></param>
/// <param name="bitmap_add"></param> /// <param name="bitmap_add"></param>
/// <returns></returns> /// <returns></returns>
public bool[,] mergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add) public bool[,] MergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add)
{ {
if (bitmap_base.GetLength(0) != 64 || bitmap_base.GetLength(1) != 64 || bitmap_base.Rank != 2) if (bitmap_base.GetLength(0) != 64 || bitmap_base.GetLength(1) != 64 || bitmap_base.Rank != 2)
{ {
@ -608,7 +609,7 @@ namespace OpenSim.Region.CoreModules.World.Land
/// Converts the land bitmap to a packet friendly byte array /// Converts the land bitmap to a packet friendly byte array
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
private byte[] convertLandBitmapToBytes() private byte[] ConvertLandBitmapToBytes()
{ {
byte[] tempConvertArr = new byte[512]; byte[] tempConvertArr = new byte[512];
byte tempByte = 0; byte tempByte = 0;
@ -618,7 +619,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
for (x = 0; x < 64; x++) for (x = 0; x < 64; x++)
{ {
tempByte = Convert.ToByte(tempByte | Convert.ToByte(landBitmap[x, y]) << (i++ % 8)); tempByte = Convert.ToByte(tempByte | Convert.ToByte(LandBitmap[x, y]) << (i++ % 8));
if (i % 8 == 0) if (i % 8 == 0)
{ {
tempConvertArr[byteNum] = tempByte; tempConvertArr[byteNum] = tempByte;
@ -631,7 +632,7 @@ namespace OpenSim.Region.CoreModules.World.Land
return tempConvertArr; return tempConvertArr;
} }
private bool[,] convertBytesToLandBitmap() private bool[,] ConvertBytesToLandBitmap()
{ {
bool[,] tempConvertMap = new bool[landArrayMax, landArrayMax]; bool[,] tempConvertMap = new bool[landArrayMax, landArrayMax];
tempConvertMap.Initialize(); tempConvertMap.Initialize();
@ -639,7 +640,7 @@ namespace OpenSim.Region.CoreModules.World.Land
int x = 0, y = 0, i = 0, bitNum = 0; int x = 0, y = 0, i = 0, bitNum = 0;
for (i = 0; i < 512; i++) for (i = 0; i < 512; i++)
{ {
tempByte = landData.Bitmap[i]; tempByte = LandData.Bitmap[i];
for (bitNum = 0; bitNum < 8; bitNum++) for (bitNum = 0; bitNum < 8; bitNum++)
{ {
bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte) 1); bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte) 1);
@ -659,7 +660,7 @@ namespace OpenSim.Region.CoreModules.World.Land
#region Object Select and Object Owner Listing #region Object Select and Object Owner Listing
public void sendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client) public void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client)
{ {
if (m_scene.Permissions.CanEditParcel(remote_client.AgentId, this)) if (m_scene.Permissions.CanEditParcel(remote_client.AgentId, this))
{ {
@ -672,11 +673,11 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
if (obj.LocalId > 0) if (obj.LocalId > 0)
{ {
if (request_type == LandChannel.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == landData.OwnerID) if (request_type == LandChannel.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == LandData.OwnerID)
{ {
resultLocalIDs.Add(obj.LocalId); resultLocalIDs.Add(obj.LocalId);
} }
else if (request_type == LandChannel.LAND_SELECT_OBJECTS_GROUP && obj.GroupID == landData.GroupID && landData.GroupID != UUID.Zero) else if (request_type == LandChannel.LAND_SELECT_OBJECTS_GROUP && obj.GroupID == LandData.GroupID && LandData.GroupID != UUID.Zero)
{ {
resultLocalIDs.Add(obj.LocalId); resultLocalIDs.Add(obj.LocalId);
} }
@ -709,7 +710,7 @@ namespace OpenSim.Region.CoreModules.World.Land
/// <param name="remote_client"> /// <param name="remote_client">
/// A <see cref="IClientAPI"/> /// A <see cref="IClientAPI"/>
/// </param> /// </param>
public void sendLandObjectOwners(IClientAPI remote_client) public void SendLandObjectOwners(IClientAPI remote_client)
{ {
if (m_scene.Permissions.CanEditParcel(remote_client.AgentId, this)) if (m_scene.Permissions.CanEditParcel(remote_client.AgentId, this))
{ {
@ -752,11 +753,11 @@ namespace OpenSim.Region.CoreModules.World.Land
} }
} }
remote_client.SendLandObjectOwners(landData, groups, primCount); remote_client.SendLandObjectOwners(LandData, groups, primCount);
} }
} }
public Dictionary<UUID, int> getLandObjectOwners() public Dictionary<UUID, int> GetLandObjectOwners()
{ {
Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>(); Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>();
lock (primsOverMe) lock (primsOverMe)
@ -786,14 +787,14 @@ namespace OpenSim.Region.CoreModules.World.Land
#region Object Returning #region Object Returning
public void returnObject(SceneObjectGroup obj) public void ReturnObject(SceneObjectGroup obj)
{ {
SceneObjectGroup[] objs = new SceneObjectGroup[1]; SceneObjectGroup[] objs = new SceneObjectGroup[1];
objs[0] = obj; objs[0] = obj;
m_scene.returnObjects(objs, obj.OwnerID); m_scene.returnObjects(objs, obj.OwnerID);
} }
public void returnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client) public void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client)
{ {
Dictionary<UUID,List<SceneObjectGroup>> returns = Dictionary<UUID,List<SceneObjectGroup>> returns =
new Dictionary<UUID,List<SceneObjectGroup>>(); new Dictionary<UUID,List<SceneObjectGroup>>();
@ -869,19 +870,19 @@ namespace OpenSim.Region.CoreModules.World.Land
#region Object Adding/Removing from Parcel #region Object Adding/Removing from Parcel
public void resetLandPrimCounts() public void ResetLandPrimCounts()
{ {
landData.GroupPrims = 0; LandData.GroupPrims = 0;
landData.OwnerPrims = 0; LandData.OwnerPrims = 0;
landData.OtherPrims = 0; LandData.OtherPrims = 0;
landData.SelectedPrims = 0; LandData.SelectedPrims = 0;
lock (primsOverMe) lock (primsOverMe)
primsOverMe.Clear(); primsOverMe.Clear();
} }
public void addPrimToCount(SceneObjectGroup obj) public void AddPrimToCount(SceneObjectGroup obj)
{ {
UUID prim_owner = obj.OwnerID; UUID prim_owner = obj.OwnerID;
@ -889,23 +890,23 @@ namespace OpenSim.Region.CoreModules.World.Land
if (obj.IsSelected) if (obj.IsSelected)
{ {
landData.SelectedPrims += prim_count; LandData.SelectedPrims += prim_count;
} }
else else
{ {
if (prim_owner == landData.OwnerID) if (prim_owner == LandData.OwnerID)
{ {
landData.OwnerPrims += prim_count; LandData.OwnerPrims += prim_count;
} }
else if ((obj.GroupID == landData.GroupID || else if ((obj.GroupID == LandData.GroupID ||
prim_owner == landData.GroupID) && prim_owner == LandData.GroupID) &&
landData.GroupID != UUID.Zero) LandData.GroupID != UUID.Zero)
{ {
landData.GroupPrims += prim_count; LandData.GroupPrims += prim_count;
} }
else else
{ {
landData.OtherPrims += prim_count; LandData.OtherPrims += prim_count;
} }
} }
@ -913,7 +914,7 @@ namespace OpenSim.Region.CoreModules.World.Land
primsOverMe.Add(obj); primsOverMe.Add(obj);
} }
public void removePrimFromCount(SceneObjectGroup obj) public void RemovePrimFromCount(SceneObjectGroup obj)
{ {
lock (primsOverMe) lock (primsOverMe)
{ {
@ -922,18 +923,18 @@ namespace OpenSim.Region.CoreModules.World.Land
UUID prim_owner = obj.OwnerID; UUID prim_owner = obj.OwnerID;
int prim_count = obj.PrimCount; int prim_count = obj.PrimCount;
if (prim_owner == landData.OwnerID) if (prim_owner == LandData.OwnerID)
{ {
landData.OwnerPrims -= prim_count; LandData.OwnerPrims -= prim_count;
} }
else if (obj.GroupID == landData.GroupID || else if (obj.GroupID == LandData.GroupID ||
prim_owner == landData.GroupID) prim_owner == LandData.GroupID)
{ {
landData.GroupPrims -= prim_count; LandData.GroupPrims -= prim_count;
} }
else else
{ {
landData.OtherPrims -= prim_count; LandData.OtherPrims -= prim_count;
} }
primsOverMe.Remove(obj); primsOverMe.Remove(obj);
@ -953,8 +954,8 @@ namespace OpenSim.Region.CoreModules.World.Land
/// <param name="url"></param> /// <param name="url"></param>
public void SetMediaUrl(string url) public void SetMediaUrl(string url)
{ {
landData.MediaURL = url; LandData.MediaURL = url;
sendLandUpdateToAvatarsOverMe(); SendLandUpdateToAvatarsOverMe();
} }
/// <summary> /// <summary>
@ -963,8 +964,8 @@ namespace OpenSim.Region.CoreModules.World.Land
/// <param name="url"></param> /// <param name="url"></param>
public void SetMusicUrl(string url) public void SetMusicUrl(string url)
{ {
landData.MusicURL = url; LandData.MusicURL = url;
sendLandUpdateToAvatarsOverMe(); SendLandUpdateToAvatarsOverMe();
} }
} }
} }

View File

@ -85,7 +85,7 @@ public class RegionCombinerLargeLandChannel : ILandChannel
} }
} }
ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene); ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
obj.landData.Name = "NO LAND"; obj.LandData.Name = "NO LAND";
return obj; return obj;
} }
} }
@ -118,7 +118,7 @@ public class RegionCombinerLargeLandChannel : ILandChannel
} }
} }
ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene); ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
obj.landData.Name = "NO LAND"; obj.LandData.Name = "NO LAND";
return obj; return obj;
} }
} }

View File

@ -569,7 +569,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
// Users should be able to edit what is over their land. // Users should be able to edit what is over their land.
ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y); ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
if (parcel != null && parcel.landData.OwnerID == user && m_ParcelOwnerIsGod) if (parcel != null && parcel.LandData.OwnerID == user && m_ParcelOwnerIsGod)
{ {
// Admin objects should not be editable by the above // Admin objects should not be editable by the above
if (!IsAdministrator(objectOwner)) if (!IsAdministrator(objectOwner))
@ -672,7 +672,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
// Users should be able to edit what is over their land. // Users should be able to edit what is over their land.
ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y); ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y);
if ((parcel != null) && (parcel.landData.OwnerID == currentUser)) if ((parcel != null) && (parcel.LandData.OwnerID == currentUser))
{ {
permission = true; permission = true;
} }
@ -740,12 +740,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
{ {
bool permission = false; bool permission = false;
if (parcel.landData.OwnerID == user) if (parcel.LandData.OwnerID == user)
{ {
permission = true; permission = true;
} }
if ((parcel.landData.GroupID != UUID.Zero) && IsGroupMember(parcel.landData.GroupID, user, groupPowers)) if ((parcel.LandData.GroupID != UUID.Zero) && IsGroupMember(parcel.LandData.GroupID, user, groupPowers))
{ {
permission = true; permission = true;
} }
@ -767,12 +767,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
{ {
bool permission = false; bool permission = false;
if (parcel.landData.OwnerID == user) if (parcel.LandData.OwnerID == user)
{ {
permission = true; permission = true;
} }
if (parcel.landData.IsGroupOwned && IsGroupMember(parcel.landData.GroupID, user, groupPowers)) if (parcel.LandData.IsGroupOwned && IsGroupMember(parcel.LandData.GroupID, user, groupPowers))
{ {
permission = true; permission = true;
} }
@ -820,13 +820,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue; if (m_bypassPermissions) return m_bypassPermissionsValue;
if (parcel.landData.OwnerID != user) // Only the owner can deed! if (parcel.LandData.OwnerID != user) // Only the owner can deed!
return false; return false;
ScenePresence sp = scene.GetScenePresence(user); ScenePresence sp = scene.GetScenePresence(user);
IClientAPI client = sp.ControllingClient; IClientAPI client = sp.ControllingClient;
if ((client.GetGroupPowers(parcel.landData.GroupID) & (ulong)GroupPowers.LandDeed) == 0) if ((client.GetGroupPowers(parcel.LandData.GroupID) & (ulong)GroupPowers.LandDeed) == 0)
return false; return false;
return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDeed); return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDeed);
@ -1189,7 +1189,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
return false; return false;
} }
if ((land.landData.Flags & ((int)ParcelFlags.AllowAPrimitiveEntry)) != 0) if ((land.LandData.Flags & ((int)ParcelFlags.AllowAPrimitiveEntry)) != 0)
{ {
return true; return true;
} }
@ -1233,7 +1233,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
ILandObject land = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y); ILandObject land = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y);
if (land == null) return false; if (land == null) return false;
if ((land.landData.Flags & ((int)ParcelFlags.CreateObjects)) == if ((land.LandData.Flags & ((int)ParcelFlags.CreateObjects)) ==
(int)ParcelFlags.CreateObjects) (int)ParcelFlags.CreateObjects)
permission = true; permission = true;
@ -1360,7 +1360,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
return false; return false;
// Others allowed to terraform? // Others allowed to terraform?
if ((parcel.landData.Flags & ((int)ParcelFlags.AllowTerraform)) != 0) if ((parcel.LandData.Flags & ((int)ParcelFlags.AllowTerraform)) != 0)
return true; return true;
// Land owner can terraform too // Land owner can terraform too
@ -1693,27 +1693,27 @@ namespace OpenSim.Region.CoreModules.World.Permissions
if (m_bypassPermissions) return m_bypassPermissionsValue; if (m_bypassPermissions) return m_bypassPermissionsValue;
long powers = 0; long powers = 0;
if (parcel.landData.GroupID != UUID.Zero) if (parcel.LandData.GroupID != UUID.Zero)
client.GetGroupPowers(parcel.landData.GroupID); client.GetGroupPowers(parcel.LandData.GroupID);
switch (type) switch (type)
{ {
case (uint)ObjectReturnType.Owner: case (uint)ObjectReturnType.Owner:
// Don't let group members return owner's objects, ever // Don't let group members return owner's objects, ever
// //
if (parcel.landData.IsGroupOwned) if (parcel.LandData.IsGroupOwned)
{ {
if ((powers & (long)GroupPowers.ReturnGroupOwned) != 0) if ((powers & (long)GroupPowers.ReturnGroupOwned) != 0)
return true; return true;
} }
else else
{ {
if (parcel.landData.OwnerID != client.AgentId) if (parcel.LandData.OwnerID != client.AgentId)
return false; return false;
} }
return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnGroupOwned); return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnGroupOwned);
case (uint)ObjectReturnType.Group: case (uint)ObjectReturnType.Group:
if (parcel.landData.OwnerID != client.AgentId) if (parcel.LandData.OwnerID != client.AgentId)
{ {
// If permissionis granted through a group... // If permissionis granted through a group...
// //

View File

@ -87,7 +87,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
//Index sim land //Index sim land
foreach (KeyValuePair<int, Land> curLand in m_scene.LandManager.landList) foreach (KeyValuePair<int, Land> curLand in m_scene.LandManager.landList)
{ {
//if ((curLand.Value.landData.landFlags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory) //if ((curLand.Value.LandData.landFlags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory)
//{ //{
m_landIndexed.Add(curLand.Key, curLand.Value.Copy()); m_landIndexed.Add(curLand.Key, curLand.Value.Copy());
//} //}
@ -135,7 +135,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
LandObject land = (LandObject)parcel_interface; LandObject land = (LandObject)parcel_interface;
LandData parcel = land.landData; LandData parcel = land.LandData;
if (m_parent.ExposureLevel.Equals("all") || if (m_parent.ExposureLevel.Equals("all") ||
(m_parent.ExposureLevel.Equals("minimum") && (m_parent.ExposureLevel.Equals("minimum") &&
(parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory)) (parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory))
@ -393,26 +393,26 @@ namespace OpenSim.Region.DataSnapshot.Providers
{ {
m_log.DebugFormat("[DATASNAPSHOT] trying {0}, {1}", refX, refY); m_log.DebugFormat("[DATASNAPSHOT] trying {0}, {1}", refX, refY);
// the point we started with already is in the parcel // the point we started with already is in the parcel
if (land.containsPoint((int)refX, (int)refY)) return; if (land.ContainsPoint((int)refX, (int)refY)) return;
// ... otherwise, we have to search for a point within the parcel // ... otherwise, we have to search for a point within the parcel
uint startX = (uint)land.landData.AABBMin.X; uint startX = (uint)land.LandData.AABBMin.X;
uint startY = (uint)land.landData.AABBMin.Y; uint startY = (uint)land.LandData.AABBMin.Y;
uint endX = (uint)land.landData.AABBMax.X; uint endX = (uint)land.LandData.AABBMax.X;
uint endY = (uint)land.landData.AABBMax.Y; uint endY = (uint)land.LandData.AABBMax.Y;
// default: center of the parcel // default: center of the parcel
refX = (startX + endX) / 2; refX = (startX + endX) / 2;
refY = (startY + endY) / 2; refY = (startY + endY) / 2;
// If the center point is within the parcel, take that one // If the center point is within the parcel, take that one
if (land.containsPoint((int)refX, (int)refY)) return; if (land.ContainsPoint((int)refX, (int)refY)) return;
// otherwise, go the long way. // otherwise, go the long way.
for (uint y = startY; y <= endY; ++y) for (uint y = startY; y <= endY; ++y)
{ {
for (uint x = startX; x <= endX; ++x) for (uint x = startX; x <= endX; ++x)
{ {
if (land.containsPoint((int)x, (int)y)) if (land.ContainsPoint((int)x, (int)y))
{ {
// found a point // found a point
refX = x; refX = x;

View File

@ -139,7 +139,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
xmlobject.AppendChild(node); xmlobject.AppendChild(node);
node = nodeFactory.CreateNode(XmlNodeType.Element, "parceluuid", ""); node = nodeFactory.CreateNode(XmlNodeType.Element, "parceluuid", "");
node.InnerText = land.landData.GlobalID.ToString(); node.InnerText = land.LandData.GlobalID.ToString();
xmlobject.AppendChild(node); xmlobject.AppendChild(node);
parent.AppendChild(xmlobject); parent.AppendChild(xmlobject);

View File

@ -37,49 +37,49 @@ namespace OpenSim.Region.Framework.Interfaces
public interface ILandObject public interface ILandObject
{ {
int getParcelMaxPrimCount(ILandObject thisObject); int GetParcelMaxPrimCount(ILandObject thisObject);
int getSimulatorMaxPrimCount(ILandObject thisObject); int GetSimulatorMaxPrimCount(ILandObject thisObject);
LandData landData { get; set; } LandData LandData { get; set; }
bool[,] landBitmap { get; set; } bool[,] LandBitmap { get; set; }
UUID regionUUID { get; } UUID RegionUUID { get; }
bool containsPoint(int x, int y); bool ContainsPoint(int x, int y);
ILandObject Copy(); ILandObject Copy();
void sendLandUpdateToAvatarsOverMe(); void SendLandUpdateToAvatarsOverMe();
void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client); void SendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client);
void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client); void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client);
bool isEitherBannedOrRestricted(UUID avatar); bool IsEitherBannedOrRestricted(UUID avatar);
bool isBannedFromLand(UUID avatar); bool IsBannedFromLand(UUID avatar);
bool isRestrictedFromLand(UUID avatar); bool IsRestrictedFromLand(UUID avatar);
void sendLandUpdateToClient(IClientAPI remote_client); void SendLandUpdateToClient(IClientAPI remote_client);
List<UUID> createAccessListArrayByFlag(AccessList flag); List<UUID> CreateAccessListArrayByFlag(AccessList flag);
void sendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client); void SendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client);
void updateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client); void UpdateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client);
void updateLandBitmapByteArray(); void UpdateLandBitmapByteArray();
void setLandBitmapFromByteArray(); void SetLandBitmapFromByteArray();
bool[,] getLandBitmap(); bool[,] GetLandBitmap();
void forceUpdateLandInfo(); void ForceUpdateLandInfo();
void setLandBitmap(bool[,] bitmap); void SetLandBitmap(bool[,] bitmap);
bool[,] basicFullRegionLandBitmap(); bool[,] BasicFullRegionLandBitmap();
bool[,] getSquareLandBitmap(int start_x, int start_y, int end_x, int end_y); bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y);
bool[,] modifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value); bool[,] ModifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value);
bool[,] mergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add); bool[,] MergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add);
void sendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client); void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client);
void sendLandObjectOwners(IClientAPI remote_client); void SendLandObjectOwners(IClientAPI remote_client);
void returnObject(SceneObjectGroup obj); void ReturnObject(SceneObjectGroup obj);
void returnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client); void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client);
void resetLandPrimCounts(); void ResetLandPrimCounts();
void addPrimToCount(SceneObjectGroup obj); void AddPrimToCount(SceneObjectGroup obj);
void removePrimFromCount(SceneObjectGroup obj); void RemovePrimFromCount(SceneObjectGroup obj);
void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area); void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area);
void deedToGroup(UUID groupID); void DeedToGroup(UUID groupID);
void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); void SetParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel);
void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); void SetSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel);
/// <summary> /// <summary>
/// Set the media url for this land parcel /// Set the media url for this land parcel

View File

@ -3206,9 +3206,9 @@ namespace OpenSim.Region.Framework.Scenes
ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
if (land != null) if (land != null)
{ {
if (land.landData.LandingType == (byte)1 && land.landData.UserLocation != Vector3.Zero) if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero)
{ {
agent.startpos = land.landData.UserLocation; agent.startpos = land.LandData.UserLocation;
} }
} }
} }
@ -3846,13 +3846,13 @@ namespace OpenSim.Region.Framework.Scenes
public LandData GetLandData(float x, float y) public LandData GetLandData(float x, float y)
{ {
return LandChannel.GetLandObject(x, y).landData; return LandChannel.GetLandObject(x, y).LandData;
} }
public LandData GetLandData(uint x, uint y) public LandData GetLandData(uint x, uint y)
{ {
m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y); m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y);
return LandChannel.GetLandObject((int)x, (int)y).landData; return LandChannel.GetLandObject((int)x, (int)y).LandData;
} }
@ -3880,14 +3880,14 @@ namespace OpenSim.Region.Framework.Scenes
{ {
if (parcel != null) if (parcel != null)
{ {
if ((parcel.landData.Flags & (uint)ParcelFlags.AllowOtherScripts) != 0) if ((parcel.LandData.Flags & (uint)ParcelFlags.AllowOtherScripts) != 0)
{ {
return true; return true;
} }
else if ((parcel.landData.Flags & (uint)ParcelFlags.AllowGroupScripts) != 0) else if ((parcel.LandData.Flags & (uint)ParcelFlags.AllowGroupScripts) != 0)
{ {
if (part.OwnerID == parcel.landData.OwnerID if (part.OwnerID == parcel.LandData.OwnerID
|| (parcel.landData.IsGroupOwned && part.GroupID == parcel.landData.GroupID) || (parcel.LandData.IsGroupOwned && part.GroupID == parcel.LandData.GroupID)
|| Permissions.IsGod(part.OwnerID)) || Permissions.IsGod(part.OwnerID))
{ {
return true; return true;
@ -3899,7 +3899,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
else else
{ {
if (part.OwnerID == parcel.landData.OwnerID) if (part.OwnerID == parcel.LandData.OwnerID)
{ {
return true; return true;
} }

View File

@ -1320,15 +1320,15 @@ namespace OpenSim.Region.Framework.Scenes
ILandObject parcel = m_scene.LandChannel.GetLandObject( ILandObject parcel = m_scene.LandChannel.GetLandObject(
m_rootPart.GroupPosition.X, m_rootPart.GroupPosition.Y); m_rootPart.GroupPosition.X, m_rootPart.GroupPosition.Y);
if (parcel != null && parcel.landData != null && if (parcel != null && parcel.LandData != null &&
parcel.landData.OtherCleanTime != 0) parcel.LandData.OtherCleanTime != 0)
{ {
if (parcel.landData.OwnerID != OwnerID && if (parcel.LandData.OwnerID != OwnerID &&
(parcel.landData.GroupID != GroupID || (parcel.LandData.GroupID != GroupID ||
parcel.landData.GroupID == UUID.Zero)) parcel.LandData.GroupID == UUID.Zero))
{ {
if ((DateTime.Now - RootPart.Rezzed).TotalMinutes > if ((DateTime.Now - RootPart.Rezzed).TotalMinutes >
parcel.landData.OtherCleanTime) parcel.LandData.OtherCleanTime)
{ {
DetachFromBackup(); DetachFromBackup();
m_log.InfoFormat("[SCENE]: Returning object {0} due to parcel auto return", RootPart.UUID.ToString()); m_log.InfoFormat("[SCENE]: Returning object {0} due to parcel auto return", RootPart.UUID.ToString());

View File

@ -48,14 +48,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
public string Name public string Name
{ {
get { return GetLO().landData.Name; } get { return GetLO().LandData.Name; }
set { GetLO().landData.Name = value; } set { GetLO().LandData.Name = value; }
} }
public string Description public string Description
{ {
get { return GetLO().landData.Description; } get { return GetLO().LandData.Description; }
set { GetLO().landData.Description = value; } set { GetLO().LandData.Description = value; }
} }
public ISocialEntity Owner public ISocialEntity Owner
@ -66,7 +66,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
public bool[,] Bitmap public bool[,] Bitmap
{ {
get { return GetLO().landBitmap; } get { return GetLO().LandBitmap; }
} }
} }
} }

View File

@ -191,7 +191,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
foreach (ILandObject landObject in m_los) foreach (ILandObject landObject in m_los)
{ {
m_parcels.Add(new LOParcel(m_internalScene, landObject.landData.LocalID)); m_parcels.Add(new LOParcel(m_internalScene, landObject.LandData.LocalID));
} }
return m_parcels.ToArray(); return m_parcels.ToArray();

View File

@ -305,9 +305,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
if (engine != myScriptEngine.ScriptEngineName) if (engine != myScriptEngine.ScriptEngineName)
return; return;
m_log.Debug("OnRezScript localID: " + localID + // m_log.Debug("OnRezScript localID: " + localID +
" LLUID: " + itemID.ToString() + " Size: " + // " LLUID: " + itemID.ToString() + " Size: " +
script.Length); // script.Length);
myScriptEngine.m_ScriptManager.StartScript(localID, itemID, script, myScriptEngine.m_ScriptManager.StartScript(localID, itemID, script,
startParam, postOnRez); startParam, postOnRez);
@ -315,7 +315,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
public void OnRemoveScript(uint localID, UUID itemID) public void OnRemoveScript(uint localID, UUID itemID)
{ {
m_log.Debug("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString()); // m_log.Debug("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString());
myScriptEngine.m_ScriptManager.StopScript( myScriptEngine.m_ScriptManager.StopScript(
localID, localID,
itemID itemID

View File

@ -3899,7 +3899,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
// agent must be over the owners land // agent must be over the owners land
if (m_host.OwnerID == World.LandChannel.GetLandObject( if (m_host.OwnerID == World.LandChannel.GetLandObject(
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
{ {
presence.ControllingClient.SendTeleportLocationStart(); presence.ControllingClient.SendTeleportLocationStart();
World.TeleportClientHome(agentId, presence.ControllingClient); World.TeleportClientHome(agentId, presence.ControllingClient);
@ -4091,7 +4091,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return; return;
// Need provisions for Group Owned here // Need provisions for Group Owned here
if (m_host.OwnerID == targetlandObj.landData.OwnerID || targetlandObj.landData.IsGroupOwned || m_host.OwnerID == targetID) if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
targetlandObj.LandData.IsGroupOwned || m_host.OwnerID == targetID)
{ {
pushAllowed = true; pushAllowed = true;
} }
@ -4107,10 +4108,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
else else
{ {
// Parcel push restriction // Parcel push restriction
if ((targetlandObj.landData.Flags & (uint)ParcelFlags.RestrictPushObject) == (uint)ParcelFlags.RestrictPushObject) if ((targetlandObj.LandData.Flags & (uint)ParcelFlags.RestrictPushObject) == (uint)ParcelFlags.RestrictPushObject)
{ {
// Need provisions for Group Owned here // Need provisions for Group Owned here
if (m_host.OwnerID == targetlandObj.landData.OwnerID || targetlandObj.landData.IsGroupOwned || m_host.OwnerID == targetID) if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
targetlandObj.LandData.IsGroupOwned ||
m_host.OwnerID == targetID)
{ {
pushAllowed = true; pushAllowed = true;
} }
@ -5442,7 +5445,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
// agent must be over the owners land // agent must be over the owners land
if (m_host.OwnerID == World.LandChannel.GetLandObject( if (m_host.OwnerID == World.LandChannel.GetLandObject(
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
World.TeleportClientHome(agentId, presence.ControllingClient); World.TeleportClientHome(agentId, presence.ControllingClient);
} }
} }
@ -5532,7 +5535,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
if (m_host.OwnerID if (m_host.OwnerID
== World.LandChannel.GetLandObject( == World.LandChannel.GetLandObject(
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
return 1; return 1;
} }
else // object is not an avatar else // object is not an avatar
@ -5541,7 +5544,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (obj != null) if (obj != null)
if (m_host.OwnerID if (m_host.OwnerID
== World.LandChannel.GetLandObject( == World.LandChannel.GetLandObject(
obj.AbsolutePosition.X, obj.AbsolutePosition.Y).landData.OwnerID) obj.AbsolutePosition.X, obj.AbsolutePosition.Y).LandData.OwnerID)
return 1; return 1;
} }
} }
@ -5552,7 +5555,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_String llGetLandOwnerAt(LSL_Vector pos) public LSL_String llGetLandOwnerAt(LSL_Vector pos)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
return World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.OwnerID.ToString(); return World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.OwnerID.ToString();
} }
/// <summary> /// <summary>
@ -5621,9 +5624,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y); ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y);
if (parcel != null) if (parcel != null)
{ {
if (m_host.ObjectOwner == parcel.landData.OwnerID || if (m_host.ObjectOwner == parcel.LandData.OwnerID ||
(m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.GroupID (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.LandData.GroupID
&& parcel.landData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID)) && parcel.LandData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID))
{ {
av.StandUp(); av.StandUp();
} }
@ -6126,7 +6129,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
UUID key; UUID key;
LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
if (land.OwnerID == m_host.OwnerID) if (land.OwnerID == m_host.OwnerID)
{ {
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
@ -7144,7 +7147,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
if (land.landData.OwnerID != m_host.ObjectOwner) if (land.LandData.OwnerID != m_host.ObjectOwner)
return; return;
land.SetMusicUrl(url); land.SetMusicUrl(url);
@ -8403,7 +8406,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)?
byte loop = 0; byte loop = 0;
LandData landData = landObject.landData; LandData landData = landObject.LandData;
string url = landData.MediaURL; string url = landData.MediaURL;
string texture = landData.MediaID.ToString(); string texture = landData.MediaID.ToString();
bool autoAlign = landData.MediaAutoScale != 0; bool autoAlign = landData.MediaAutoScale != 0;
@ -8832,7 +8835,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
UUID key; UUID key;
LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
if (land.OwnerID == m_host.OwnerID) if (land.OwnerID == m_host.OwnerID)
{ {
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
@ -8851,7 +8854,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
UUID key; UUID key;
LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
if (land.OwnerID == m_host.OwnerID) if (land.OwnerID == m_host.OwnerID)
{ {
if (UUID.TryParse(avatar, out key)) if (UUID.TryParse(avatar, out key))
@ -8873,7 +8876,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
UUID key; UUID key;
LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
if (land.OwnerID == m_host.OwnerID) if (land.OwnerID == m_host.OwnerID)
{ {
if (UUID.TryParse(avatar, out key)) if (UUID.TryParse(avatar, out key))
@ -9018,7 +9021,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Integer llGetParcelFlags(LSL_Vector pos) public LSL_Integer llGetParcelFlags(LSL_Vector pos)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.Flags; return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.Flags;
} }
public LSL_Integer llGetRegionFlags() public LSL_Integer llGetRegionFlags()
@ -9139,7 +9142,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llResetLandBanList() public void llResetLandBanList()
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
if (land.OwnerID == m_host.OwnerID) if (land.OwnerID == m_host.OwnerID)
{ {
foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
@ -9156,7 +9159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llResetLandPassList() public void llResetLandPassList()
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
if (land.OwnerID == m_host.OwnerID) if (land.OwnerID == m_host.OwnerID)
{ {
foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
@ -9240,7 +9243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
LSL_List ret = new LSL_List(); LSL_List ret = new LSL_List();
if (land != null) if (land != null)
{ {
foreach (KeyValuePair<UUID, int> detectedParams in land.getLandObjectOwners()) foreach (KeyValuePair<UUID, int> detectedParams in land.GetLandObjectOwners())
{ {
ret.Add(detectedParams.Key.ToString()); ret.Add(detectedParams.Key.ToString());
ret.Add(detectedParams.Value); ret.Add(detectedParams.Value);

View File

@ -593,7 +593,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// agent must be over owners land to avoid abuse // agent must be over owners land to avoid abuse
if (m_host.OwnerID if (m_host.OwnerID
== World.LandChannel.GetLandObject( == World.LandChannel.GetLandObject(
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
{ {
// Check for hostname , attempt to make a hglink // Check for hostname , attempt to make a hglink
@ -647,7 +647,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// agent must be over owners land to avoid abuse // agent must be over owners land to avoid abuse
if (m_host.OwnerID if (m_host.OwnerID
== World.LandChannel.GetLandObject( == World.LandChannel.GetLandObject(
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
{ {
presence.ControllingClient.SendTeleportLocationStart(); presence.ControllingClient.SendTeleportLocationStart();
World.RequestTeleportLocation(presence.ControllingClient, regionHandle, World.RequestTeleportLocation(presence.ControllingClient, regionHandle,
@ -1164,7 +1164,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ILandObject land ILandObject land
= World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
if (land.landData.OwnerID != m_host.ObjectOwner) if (land.LandData.OwnerID != m_host.ObjectOwner)
return; return;
land.SetMediaUrl(url); land.SetMediaUrl(url);
@ -1182,7 +1182,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ILandObject land ILandObject land
= World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
if (land.landData.OwnerID != m_host.ObjectOwner) if (land.LandData.OwnerID != m_host.ObjectOwner)
{ {
OSSLError("osSetParcelSIPAddress: Sorry, you need to own the land to use this function"); OSSLError("osSetParcelSIPAddress: Sorry, you need to own the land to use this function");
return; return;
@ -1192,7 +1192,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
IVoiceModule voiceModule = World.RequestModuleInterface<IVoiceModule>(); IVoiceModule voiceModule = World.RequestModuleInterface<IVoiceModule>();
if (voiceModule != null) if (voiceModule != null)
voiceModule.setLandSIPAddress(SIPAddress,land.landData.GlobalID); voiceModule.setLandSIPAddress(SIPAddress,land.LandData.GlobalID);
else else
OSSLError("osSetParcelSIPAddress: No voice module enabled for this land"); OSSLError("osSetParcelSIPAddress: No voice module enabled for this land");

View File

@ -29,6 +29,8 @@ using System.Collections.Generic;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.CoreModules.World.Land;
namespace OpenSim.Tests.Common.Mock namespace OpenSim.Tests.Common.Mock
{ {
@ -37,11 +39,45 @@ namespace OpenSim.Tests.Common.Mock
/// </summary> /// </summary>
public class TestLandChannel : ILandChannel public class TestLandChannel : ILandChannel
{ {
public List<ILandObject> ParcelsNearPoint(Vector3 position) { return null; } private Scene m_scene;
public List<ILandObject> AllParcels() { return null; }
public ILandObject GetLandObject(int x, int y) { return null; } public TestLandChannel(Scene scene)
public ILandObject GetLandObject(int localID) { return null; } {
public ILandObject GetLandObject(float x, float y) { return null; } m_scene = scene;
}
public List<ILandObject> ParcelsNearPoint(Vector3 position)
{
return new List<ILandObject>();
}
public List<ILandObject> AllParcels()
{
return new List<ILandObject>();
}
protected ILandObject GetNoLand()
{
ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
obj.LandData.Name = "NO LAND";
return obj;
}
public ILandObject GetLandObject(int x, int y)
{
return GetNoLand();
}
public ILandObject GetLandObject(int localID)
{
return GetNoLand();
}
public ILandObject GetLandObject(float x, float y)
{
return GetNoLand();
}
public bool IsLandPrimCountTainted() { return false; } public bool IsLandPrimCountTainted() { return false; }
public bool IsForcefulBansAllowed() { return false; } public bool IsForcefulBansAllowed() { return false; }
public void UpdateLandObject(int localID, LandData data) {} public void UpdateLandObject(int localID, LandData data) {}

View File

@ -127,7 +127,7 @@ namespace OpenSim.Tests.Common.Setup
public static TestScene SetupScene( public static TestScene SetupScene(
string name, UUID id, uint x, uint y, TestCommunicationsManager cm, String realServices) string name, UUID id, uint x, uint y, TestCommunicationsManager cm, String realServices)
{ {
bool newScene= false; bool newScene = false;
Console.WriteLine("Setting up test scene {0}", name); Console.WriteLine("Setting up test scene {0}", name);
@ -198,7 +198,7 @@ namespace OpenSim.Tests.Common.Setup
testScene.SetModuleInterfaces(); testScene.SetModuleInterfaces();
testScene.LandChannel = new TestLandChannel(); testScene.LandChannel = new TestLandChannel(testScene);
testScene.LoadWorldMap(); testScene.LoadWorldMap();
PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager(); PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();

View File

@ -1374,6 +1374,7 @@
;; zero configuration ;; zero configuration
;; ;;
[DatabaseService] [DatabaseService]
;; default standalone, overridable in StandaloneCommon.ini
StorageProvider = "OpenSim.Data.SQLite.dll" StorageProvider = "OpenSim.Data.SQLite.dll"
@ -1381,6 +1382,9 @@
DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll"
AssetLoaderArgs = "assets/AssetSets.xml" AssetLoaderArgs = "assets/AssetSets.xml"
[GridService]
;; default standalone, overridable in StandaloneCommon.ini
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The following is the configuration section for the new style services ;; The following is the configuration section for the new style services