refactored LandData to use properties, and cleaned up the naming on

the properties a bit to be more consistant with other objects (having things
like .Name .Description, etc).
0.6.0-stable
Sean Dague 2008-07-23 15:50:32 +00:00
parent ecd296ad67
commit 090159defc
16 changed files with 833 additions and 509 deletions

View File

@ -470,7 +470,7 @@ namespace OpenSim.Data.MSSQL
DataTable land = m_landTable;
DataTable landaccesslist = m_landAccessListTable;
DataRow landRow = land.Rows.Find(parcel.landData.globalID.UUID);
DataRow landRow = land.Rows.Find(parcel.landData.GlobalID.UUID);
if (landRow == null)
{
landRow = land.NewRow();
@ -486,14 +486,14 @@ namespace OpenSim.Data.MSSQL
SqlCommand cmd =
new SqlCommand("delete from landaccesslist where LandUUID=@LandUUID", m_connection))
{
cmd.Parameters.Add(new SqlParameter("@LandUUID", parcel.landData.globalID.UUID));
cmd.Parameters.Add(new SqlParameter("@LandUUID", parcel.landData.GlobalID.UUID));
cmd.ExecuteNonQuery();
}
foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.parcelAccessList)
foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.ParcelAccessList)
{
DataRow newAccessRow = landaccesslist.NewRow();
fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID);
fillLandAccessRow(newAccessRow, entry, parcel.landData.GlobalID);
landaccesslist.Rows.Add(newAccessRow);
}
@ -518,11 +518,11 @@ namespace OpenSim.Data.MSSQL
foreach (DataRow rawDataLand in rawDataForRegion)
{
LandData newLand = buildLandData(rawDataLand);
string accessListSearchExp = "LandUUID = '" + newLand.globalID.UUID + "'";
string accessListSearchExp = "LandUUID = '" + newLand.GlobalID.UUID + "'";
DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp);
foreach (DataRow rawDataLandAccess in rawDataForLandAccessList)
{
newLand.parcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
newLand.ParcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
}
landDataForRegion.Add(newLand);
@ -992,43 +992,43 @@ namespace OpenSim.Data.MSSQL
{
LandData newData = new LandData();
newData.globalID = new LLUUID((String)row["UUID"]);
newData.localID = Convert.ToInt32(row["LocalLandID"]);
newData.GlobalID = new LLUUID((String)row["UUID"]);
newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
// Bitmap is a byte[512]
newData.landBitmapByteArray = (Byte[])row["Bitmap"];
newData.Bitmap = (Byte[])row["Bitmap"];
newData.landName = (String)row["Name"];
newData.landDesc = (String)row["Description"];
newData.ownerID = (String)row["OwnerUUID"];
newData.isGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
newData.area = Convert.ToInt32(row["Area"]);
newData.auctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
newData.category = (Parcel.ParcelCategory)Convert.ToInt32(row["Category"]);
newData.Name = (String)row["Name"];
newData.Description = (String)row["Description"];
newData.OwnerID = (String)row["OwnerUUID"];
newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
newData.Area = Convert.ToInt32(row["Area"]);
newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
newData.Category = (Parcel.ParcelCategory)Convert.ToInt32(row["Category"]);
//Enum libsecondlife.Parcel.ParcelCategory
newData.claimDate = Convert.ToInt32(row["ClaimDate"]);
newData.claimPrice = Convert.ToInt32(row["ClaimPrice"]);
newData.groupID = new LLUUID((String)row["GroupUUID"]);
newData.salePrice = Convert.ToInt32(row["SalePrice"]);
newData.landStatus = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]);
newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]);
newData.GroupID = new LLUUID((String)row["GroupUUID"]);
newData.SalePrice = Convert.ToInt32(row["SalePrice"]);
newData.Status = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]);
//Enum. libsecondlife.Parcel.ParcelStatus
newData.landFlags = Convert.ToUInt32(row["LandFlags"]);
newData.landingType = Convert.ToByte(row["LandingType"]);
newData.mediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
newData.mediaID = new LLUUID((String)row["MediaTextureUUID"]);
newData.mediaURL = (String)row["MediaURL"];
newData.musicURL = (String)row["MusicURL"];
newData.passHours = Convert.ToSingle(row["PassHours"]);
newData.passPrice = Convert.ToInt32(row["PassPrice"]);
newData.snapshotID = (String)row["SnapshotUUID"];
newData.Flags = Convert.ToUInt32(row["LandFlags"]);
newData.LandingType = Convert.ToByte(row["LandingType"]);
newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
newData.MediaID = new LLUUID((String)row["MediaTextureUUID"]);
newData.MediaURL = (String)row["MediaURL"];
newData.MusicURL = (String)row["MusicURL"];
newData.PassHours = Convert.ToSingle(row["PassHours"]);
newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
newData.SnapshotID = (String)row["SnapshotUUID"];
newData.userLocation =
newData.UserLocation =
new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
Convert.ToSingle(row["UserLocationZ"]));
newData.userLookAt =
newData.UserLookAt =
new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
Convert.ToSingle(row["UserLookAtZ"]));
newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
return newData;
}
@ -1186,40 +1186,40 @@ namespace OpenSim.Data.MSSQL
/// <param name="regionUUID"></param>
private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
{
row["UUID"] = land.globalID.UUID;
row["UUID"] = land.GlobalID.UUID;
row["RegionUUID"] = regionUUID.UUID;
row["LocalLandID"] = land.localID;
row["LocalLandID"] = land.LocalID;
// Bitmap is a byte[512]
row["Bitmap"] = land.landBitmapByteArray;
row["Bitmap"] = land.Bitmap;
row["Name"] = land.landName;
row["Description"] = land.landDesc;
row["OwnerUUID"] = land.ownerID.UUID;
row["IsGroupOwned"] = land.isGroupOwned;
row["Area"] = land.area;
row["AuctionID"] = land.auctionID; //Unemplemented
row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory
row["ClaimDate"] = land.claimDate;
row["ClaimPrice"] = land.claimPrice;
row["GroupUUID"] = land.groupID.UUID;
row["SalePrice"] = land.salePrice;
row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus
row["LandFlags"] = land.landFlags;
row["LandingType"] = land.landingType;
row["MediaAutoScale"] = land.mediaAutoScale;
row["MediaTextureUUID"] = land.mediaID.UUID;
row["MediaURL"] = land.mediaURL;
row["MusicURL"] = land.musicURL;
row["PassHours"] = land.passHours;
row["PassPrice"] = land.passPrice;
row["SnapshotUUID"] = land.snapshotID.UUID;
row["UserLocationX"] = land.userLocation.X;
row["UserLocationY"] = land.userLocation.Y;
row["UserLocationZ"] = land.userLocation.Z;
row["UserLookAtX"] = land.userLookAt.X;
row["UserLookAtY"] = land.userLookAt.Y;
row["UserLookAtZ"] = land.userLookAt.Z;
row["Name"] = land.Name;
row["Description"] = land.Description;
row["OwnerUUID"] = land.OwnerID.UUID;
row["IsGroupOwned"] = land.IsGroupOwned;
row["Area"] = land.Area;
row["AuctionID"] = land.AuctionID; //Unemplemented
row["Category"] = land.Category; //Enum libsecondlife.Parcel.ParcelCategory
row["ClaimDate"] = land.ClaimDate;
row["ClaimPrice"] = land.ClaimPrice;
row["GroupUUID"] = land.GroupID.UUID;
row["SalePrice"] = land.SalePrice;
row["LandStatus"] = land.Status; //Enum. libsecondlife.Parcel.ParcelStatus
row["LandFlags"] = land.Flags;
row["LandingType"] = land.LandingType;
row["MediaAutoScale"] = land.MediaAutoScale;
row["MediaTextureUUID"] = land.MediaID.UUID;
row["MediaURL"] = land.MediaURL;
row["MusicURL"] = land.MusicURL;
row["PassHours"] = land.PassHours;
row["PassPrice"] = land.PassPrice;
row["SnapshotUUID"] = land.SnapshotID.UUID;
row["UserLocationX"] = land.UserLocation.X;
row["UserLocationY"] = land.UserLocation.Y;
row["UserLocationZ"] = land.UserLocation.Z;
row["UserLookAtX"] = land.UserLookAt.X;
row["UserLookAtY"] = land.UserLookAt.Y;
row["UserLookAtZ"] = land.UserLookAt.Z;
}
/// <summary>

View File

@ -692,7 +692,7 @@ namespace OpenSim.Data.MySQL
DataTable land = m_landTable;
DataTable landaccesslist = m_landAccessListTable;
DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.globalID));
DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.GlobalID));
if (landRow == null)
{
landRow = land.NewRow();
@ -708,14 +708,14 @@ namespace OpenSim.Data.MySQL
MySqlCommand cmd =
new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection))
{
cmd.Parameters.Add(new MySqlParameter("?LandUUID", Util.ToRawUuidString(parcel.landData.globalID)));
cmd.Parameters.Add(new MySqlParameter("?LandUUID", Util.ToRawUuidString(parcel.landData.GlobalID)));
cmd.ExecuteNonQuery();
}
foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.parcelAccessList)
foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.ParcelAccessList)
{
DataRow newAccessRow = landaccesslist.NewRow();
fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID);
fillLandAccessRow(newAccessRow, entry, parcel.landData.GlobalID);
landaccesslist.Rows.Add(newAccessRow);
}
@ -787,11 +787,11 @@ namespace OpenSim.Data.MySQL
foreach (DataRow rawDataLand in rawDataForRegion)
{
LandData newLand = buildLandData(rawDataLand);
string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.globalID) + "'";
string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.GlobalID) + "'";
DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp);
foreach (DataRow rawDataLandAccess in rawDataForLandAccessList)
{
newLand.parcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
newLand.ParcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
}
landDataForRegion.Add(newLand);
@ -1319,59 +1319,59 @@ namespace OpenSim.Data.MySQL
{
LandData newData = new LandData();
newData.globalID = new LLUUID((String) row["UUID"]);
newData.localID = Convert.ToInt32(row["LocalLandID"]);
newData.GlobalID = new LLUUID((String) row["UUID"]);
newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
// Bitmap is a byte[512]
newData.landBitmapByteArray = (Byte[]) row["Bitmap"];
newData.Bitmap = (Byte[]) row["Bitmap"];
newData.landName = (String) row["Name"];
newData.landDesc = (String) row["Description"];
newData.ownerID = (String) row["OwnerUUID"];
newData.isGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
newData.area = Convert.ToInt32(row["Area"]);
newData.auctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
newData.category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]);
newData.Name = (String) row["Name"];
newData.Description = (String) row["Description"];
newData.OwnerID = (String) row["OwnerUUID"];
newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
newData.Area = Convert.ToInt32(row["Area"]);
newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]);
//Enum libsecondlife.Parcel.ParcelCategory
newData.claimDate = Convert.ToInt32(row["ClaimDate"]);
newData.claimPrice = Convert.ToInt32(row["ClaimPrice"]);
newData.groupID = new LLUUID((String) row["GroupUUID"]);
newData.salePrice = Convert.ToInt32(row["SalePrice"]);
newData.landStatus = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]);
newData.GroupID = new LLUUID((String) row["GroupUUID"]);
newData.SalePrice = Convert.ToInt32(row["SalePrice"]);
newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
//Enum. libsecondlife.Parcel.ParcelStatus
newData.landFlags = Convert.ToUInt32(row["LandFlags"]);
newData.landingType = Convert.ToByte(row["LandingType"]);
newData.mediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
newData.mediaID = new LLUUID((String) row["MediaTextureUUID"]);
newData.mediaURL = (String) row["MediaURL"];
newData.musicURL = (String) row["MusicURL"];
newData.passHours = Convert.ToSingle(row["PassHours"]);
newData.passPrice = Convert.ToInt32(row["PassPrice"]);
newData.Flags = Convert.ToUInt32(row["LandFlags"]);
newData.LandingType = Convert.ToByte(row["LandingType"]);
newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
newData.MediaID = new LLUUID((String) row["MediaTextureUUID"]);
newData.MediaURL = (String) row["MediaURL"];
newData.MusicURL = (String) row["MusicURL"];
newData.PassHours = Convert.ToSingle(row["PassHours"]);
newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
LLUUID authedbuyer = LLUUID.Zero;
LLUUID snapshotID = LLUUID.Zero;
Helpers.TryParse((string)row["AuthBuyerID"], out authedbuyer);
Helpers.TryParse((string)row["SnapshotUUID"], out snapshotID);
newData.authBuyerID = authedbuyer;
newData.snapshotID = snapshotID;
newData.AuthBuyerID = authedbuyer;
newData.SnapshotID = snapshotID;
try
{
newData.userLocation =
newData.UserLocation =
new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
Convert.ToSingle(row["UserLocationZ"]));
newData.userLookAt =
newData.UserLookAt =
new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
Convert.ToSingle(row["UserLookAtZ"]));
}
catch (InvalidCastException)
{
newData.userLocation = LLVector3.Zero;
newData.userLookAt = LLVector3.Zero;
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.landName);
newData.UserLocation = LLVector3.Zero;
newData.UserLookAt = LLVector3.Zero;
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
}
newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
return newData;
}
@ -1576,41 +1576,41 @@ namespace OpenSim.Data.MySQL
/// <param name="regionUUID"></param>
private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
{
row["UUID"] = Util.ToRawUuidString(land.globalID);
row["UUID"] = Util.ToRawUuidString(land.GlobalID);
row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
row["LocalLandID"] = land.localID;
row["LocalLandID"] = land.LocalID;
// Bitmap is a byte[512]
row["Bitmap"] = land.landBitmapByteArray;
row["Bitmap"] = land.Bitmap;
row["Name"] = land.landName;
row["Description"] = land.landDesc;
row["OwnerUUID"] = Util.ToRawUuidString(land.ownerID);
row["IsGroupOwned"] = land.isGroupOwned;
row["Area"] = land.area;
row["AuctionID"] = land.auctionID; //Unemplemented
row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory
row["ClaimDate"] = land.claimDate;
row["ClaimPrice"] = land.claimPrice;
row["GroupUUID"] = Util.ToRawUuidString(land.groupID);
row["SalePrice"] = land.salePrice;
row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus
row["LandFlags"] = land.landFlags;
row["LandingType"] = land.landingType;
row["MediaAutoScale"] = land.mediaAutoScale;
row["MediaTextureUUID"] = Util.ToRawUuidString(land.mediaID);
row["MediaURL"] = land.mediaURL;
row["MusicURL"] = land.musicURL;
row["PassHours"] = land.passHours;
row["PassPrice"] = land.passPrice;
row["SnapshotUUID"] = Util.ToRawUuidString(land.snapshotID);
row["UserLocationX"] = land.userLocation.X;
row["UserLocationY"] = land.userLocation.Y;
row["UserLocationZ"] = land.userLocation.Z;
row["UserLookAtX"] = land.userLookAt.X;
row["UserLookAtY"] = land.userLookAt.Y;
row["UserLookAtZ"] = land.userLookAt.Z;
row["AuthBuyerID"] = land.authBuyerID;
row["Name"] = land.Name;
row["Description"] = land.Description;
row["OwnerUUID"] = Util.ToRawUuidString(land.OwnerID);
row["IsGroupOwned"] = land.IsGroupOwned;
row["Area"] = land.Area;
row["AuctionID"] = land.AuctionID; //Unemplemented
row["Category"] = land.Category; //Enum libsecondlife.Parcel.ParcelCategory
row["ClaimDate"] = land.ClaimDate;
row["ClaimPrice"] = land.ClaimPrice;
row["GroupUUID"] = Util.ToRawUuidString(land.GroupID);
row["SalePrice"] = land.SalePrice;
row["LandStatus"] = land.Status; //Enum. libsecondlife.Parcel.ParcelStatus
row["LandFlags"] = land.Flags;
row["LandingType"] = land.LandingType;
row["MediaAutoScale"] = land.MediaAutoScale;
row["MediaTextureUUID"] = Util.ToRawUuidString(land.MediaID);
row["MediaURL"] = land.MediaURL;
row["MusicURL"] = land.MusicURL;
row["PassHours"] = land.PassHours;
row["PassPrice"] = land.PassPrice;
row["SnapshotUUID"] = Util.ToRawUuidString(land.SnapshotID);
row["UserLocationX"] = land.UserLocation.X;
row["UserLocationY"] = land.UserLocation.Y;
row["UserLocationZ"] = land.UserLocation.Z;
row["UserLookAtX"] = land.UserLookAt.X;
row["UserLookAtY"] = land.UserLookAt.Y;
row["UserLookAtZ"] = land.UserLookAt.Z;
row["AuthBuyerID"] = land.AuthBuyerID;
}
/// <summary>

View File

@ -533,7 +533,7 @@ namespace OpenSim.Data.SQLite
DataTable land = ds.Tables["land"];
DataTable landaccesslist = ds.Tables["landaccesslist"];
DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.globalID));
DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.GlobalID));
if (landRow == null)
{
landRow = land.NewRow();
@ -548,14 +548,14 @@ namespace OpenSim.Data.SQLite
// 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))
{
cmd.Parameters.Add(new SqliteParameter(":LandUUID", Util.ToRawUuidString(parcel.landData.globalID)));
cmd.Parameters.Add(new SqliteParameter(":LandUUID", Util.ToRawUuidString(parcel.landData.GlobalID)));
cmd.ExecuteNonQuery();
}
foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.parcelAccessList)
foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.ParcelAccessList)
{
DataRow newAccessRow = landaccesslist.NewRow();
fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID);
fillLandAccessRow(newAccessRow, entry, parcel.landData.GlobalID);
landaccesslist.Rows.Add(newAccessRow);
}
}
@ -580,11 +580,11 @@ namespace OpenSim.Data.SQLite
foreach (DataRow rawDataLand in rawDataForRegion)
{
LandData newLand = buildLandData(rawDataLand);
string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.globalID) + "'";
string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.GlobalID) + "'";
DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp);
foreach (DataRow rawDataLandAccess in rawDataForLandAccessList)
{
newLand.parcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
newLand.ParcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
}
landDataForRegion.Add(newLand);
@ -1033,53 +1033,53 @@ namespace OpenSim.Data.SQLite
{
LandData newData = new LandData();
newData.globalID = new LLUUID((String) row["UUID"]);
newData.localID = Convert.ToInt32(row["LocalLandID"]);
newData.GlobalID = new LLUUID((String) row["UUID"]);
newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
// Bitmap is a byte[512]
newData.landBitmapByteArray = (Byte[]) row["Bitmap"];
newData.Bitmap = (Byte[]) row["Bitmap"];
newData.landName = (String) row["Name"];
newData.landDesc = (String) row["Desc"];
newData.ownerID = (String) row["OwnerUUID"];
newData.isGroupOwned = (Boolean) row["IsGroupOwned"];
newData.area = Convert.ToInt32(row["Area"]);
newData.auctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
newData.category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]);
newData.Name = (String) row["Name"];
newData.Description = (String) row["Desc"];
newData.OwnerID = (String) row["OwnerUUID"];
newData.IsGroupOwned = (Boolean) row["IsGroupOwned"];
newData.Area = Convert.ToInt32(row["Area"]);
newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]);
//Enum libsecondlife.Parcel.ParcelCategory
newData.claimDate = Convert.ToInt32(row["ClaimDate"]);
newData.claimPrice = Convert.ToInt32(row["ClaimPrice"]);
newData.groupID = new LLUUID((String) row["GroupUUID"]);
newData.salePrice = Convert.ToInt32(row["SalePrice"]);
newData.landStatus = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]);
newData.GroupID = new LLUUID((String) row["GroupUUID"]);
newData.SalePrice = Convert.ToInt32(row["SalePrice"]);
newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
//Enum. libsecondlife.Parcel.ParcelStatus
newData.landFlags = Convert.ToUInt32(row["LandFlags"]);
newData.landingType = (Byte) row["LandingType"];
newData.mediaAutoScale = (Byte) row["MediaAutoScale"];
newData.mediaID = new LLUUID((String) row["MediaTextureUUID"]);
newData.mediaURL = (String) row["MediaURL"];
newData.musicURL = (String) row["MusicURL"];
newData.passHours = Convert.ToSingle(row["PassHours"]);
newData.passPrice = Convert.ToInt32(row["PassPrice"]);
newData.snapshotID = (String) row["SnapshotUUID"];
newData.Flags = Convert.ToUInt32(row["LandFlags"]);
newData.LandingType = (Byte) row["LandingType"];
newData.MediaAutoScale = (Byte) row["MediaAutoScale"];
newData.MediaID = new LLUUID((String) row["MediaTextureUUID"]);
newData.MediaURL = (String) row["MediaURL"];
newData.MusicURL = (String) row["MusicURL"];
newData.PassHours = Convert.ToSingle(row["PassHours"]);
newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
newData.SnapshotID = (String) row["SnapshotUUID"];
try
{
newData.userLocation =
newData.UserLocation =
new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
Convert.ToSingle(row["UserLocationZ"]));
newData.userLookAt =
newData.UserLookAt =
new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
Convert.ToSingle(row["UserLookAtZ"]));
}
catch (InvalidCastException)
{
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.landName);
newData.userLocation = LLVector3.Zero;
newData.userLookAt = LLVector3.Zero;
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
newData.UserLocation = LLVector3.Zero;
newData.UserLookAt = LLVector3.Zero;
}
newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
LLUUID authBuyerID = LLUUID.Zero;
try
@ -1270,41 +1270,41 @@ namespace OpenSim.Data.SQLite
/// <param name="regionUUID"></param>
private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
{
row["UUID"] = Util.ToRawUuidString(land.globalID);
row["UUID"] = Util.ToRawUuidString(land.GlobalID);
row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
row["LocalLandID"] = land.localID;
row["LocalLandID"] = land.LocalID;
// Bitmap is a byte[512]
row["Bitmap"] = land.landBitmapByteArray;
row["Bitmap"] = land.Bitmap;
row["Name"] = land.landName;
row["Desc"] = land.landDesc;
row["OwnerUUID"] = Util.ToRawUuidString(land.ownerID);
row["IsGroupOwned"] = land.isGroupOwned;
row["Area"] = land.area;
row["AuctionID"] = land.auctionID; //Unemplemented
row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory
row["ClaimDate"] = land.claimDate;
row["ClaimPrice"] = land.claimPrice;
row["GroupUUID"] = Util.ToRawUuidString(land.groupID);
row["SalePrice"] = land.salePrice;
row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus
row["LandFlags"] = land.landFlags;
row["LandingType"] = land.landingType;
row["MediaAutoScale"] = land.mediaAutoScale;
row["MediaTextureUUID"] = Util.ToRawUuidString(land.mediaID);
row["MediaURL"] = land.mediaURL;
row["MusicURL"] = land.musicURL;
row["PassHours"] = land.passHours;
row["PassPrice"] = land.passPrice;
row["SnapshotUUID"] = Util.ToRawUuidString(land.snapshotID);
row["UserLocationX"] = land.userLocation.X;
row["UserLocationY"] = land.userLocation.Y;
row["UserLocationZ"] = land.userLocation.Z;
row["UserLookAtX"] = land.userLookAt.X;
row["UserLookAtY"] = land.userLookAt.Y;
row["UserLookAtZ"] = land.userLookAt.Z;
row["AuthbuyerID"] = Util.ToRawUuidString(land.authBuyerID);
row["Name"] = land.Name;
row["Desc"] = land.Description;
row["OwnerUUID"] = Util.ToRawUuidString(land.OwnerID);
row["IsGroupOwned"] = land.IsGroupOwned;
row["Area"] = land.Area;
row["AuctionID"] = land.AuctionID; //Unemplemented
row["Category"] = land.Category; //Enum libsecondlife.Parcel.ParcelCategory
row["ClaimDate"] = land.ClaimDate;
row["ClaimPrice"] = land.ClaimPrice;
row["GroupUUID"] = Util.ToRawUuidString(land.GroupID);
row["SalePrice"] = land.SalePrice;
row["LandStatus"] = land.Status; //Enum. libsecondlife.Parcel.ParcelStatus
row["LandFlags"] = land.Flags;
row["LandingType"] = land.LandingType;
row["MediaAutoScale"] = land.MediaAutoScale;
row["MediaTextureUUID"] = Util.ToRawUuidString(land.MediaID);
row["MediaURL"] = land.MediaURL;
row["MusicURL"] = land.MusicURL;
row["PassHours"] = land.PassHours;
row["PassPrice"] = land.PassPrice;
row["SnapshotUUID"] = Util.ToRawUuidString(land.SnapshotID);
row["UserLocationX"] = land.UserLocation.X;
row["UserLocationY"] = land.UserLocation.Y;
row["UserLocationZ"] = land.UserLocation.Z;
row["UserLookAtX"] = land.UserLookAt.X;
row["UserLookAtY"] = land.UserLookAt.Y;
row["UserLookAtZ"] = land.UserLookAt.Z;
row["AuthbuyerID"] = Util.ToRawUuidString(land.AuthBuyerID);
}
/// <summary>

View File

@ -33,103 +33,427 @@ namespace OpenSim.Framework
{
public class LandData
{
public LLVector3 AABBMax = new LLVector3();
public LLVector3 AABBMin = new LLVector3();
public int area = 0;
public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned
public LLUUID authBuyerID = LLUUID.Zero; //Unemplemented. Authorized Buyer's UUID
public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category
public int claimDate = 0;
public int claimPrice = 0; //Unemplemented
public LLUUID globalID = LLUUID.Zero;
public LLUUID groupID = LLUUID.Zero; //Unemplemented
public int groupPrims = 0;
public bool isGroupOwned = false;
public byte[] landBitmapByteArray = new byte[512];
public string landDesc = String.Empty;
public LLVector3 _AABBMax = new LLVector3();
public LLVector3 _AABBMin = new LLVector3();
public int _area = 0;
public uint _auctionID = 0; //Unemplemented. If set to 0, not being auctioned
public LLUUID _authBuyerID = LLUUID.Zero; //Unemplemented. Authorized Buyer's UUID
public Parcel.ParcelCategory _category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category
public int _claimDate = 0;
public int _claimPrice = 0; //Unemplemented
public LLUUID _globalID = LLUUID.Zero;
public LLUUID _groupID = LLUUID.Zero; //Unemplemented
public int _groupPrims = 0;
public bool _isGroupOwned = false;
public byte[] _bitmap = new byte[512];
public string _description = String.Empty;
public uint landFlags = (uint) Parcel.ParcelFlags.AllowFly | (uint) Parcel.ParcelFlags.AllowLandmark |
public uint _flags = (uint) Parcel.ParcelFlags.AllowFly | (uint) Parcel.ParcelFlags.AllowLandmark |
(uint) Parcel.ParcelFlags.AllowAllObjectEntry |
(uint) Parcel.ParcelFlags.AllowDeedToGroup | (uint) Parcel.ParcelFlags.AllowTerraform |
(uint) Parcel.ParcelFlags.CreateObjects | (uint) Parcel.ParcelFlags.AllowOtherScripts |
(uint) Parcel.ParcelFlags.SoundLocal;
public byte landingType = 0;
public string landName = "Your Parcel";
public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased;
public int localID = 0;
public byte mediaAutoScale = 0;
public LLUUID mediaID = LLUUID.Zero;
public byte _landingType = 0;
public string _name = "Your Parcel";
public Parcel.ParcelStatus _status = Parcel.ParcelStatus.Leased;
public int _localID = 0;
public byte _mediaAutoScale = 0;
public LLUUID _mediaID = LLUUID.Zero;
public string mediaURL = String.Empty;
public string musicURL = String.Empty;
public int otherPrims = 0;
public LLUUID ownerID = LLUUID.Zero;
public int ownerPrims = 0;
public List<ParcelManager.ParcelAccessEntry> parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
public float passHours = 0;
public int passPrice = 0;
public int salePrice = 0; //Unemeplemented. Parcels price.
public int selectedPrims = 0;
public int simwideArea = 0;
public int simwidePrims = 0;
public LLUUID snapshotID = LLUUID.Zero;
public LLVector3 userLocation = new LLVector3();
public LLVector3 userLookAt = new LLVector3();
public string _mediaURL = String.Empty;
public string _musicURL = String.Empty;
public int _otherPrims = 0;
public LLUUID _ownerID = LLUUID.Zero;
public int _ownerPrims = 0;
public List<ParcelManager.ParcelAccessEntry> _parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
public float _passHours = 0;
public int _passPrice = 0;
public int _salePrice = 0; //Unemeplemented. Parcels price.
public int _selectedPrims = 0;
public int _simwideArea = 0;
public int _simwidePrims = 0;
public LLUUID _snapshotID = LLUUID.Zero;
public LLVector3 _userLocation = new LLVector3();
public LLVector3 _userLookAt = new LLVector3();
public LLVector3 AABBMax {
get {
return _AABBMax;
}
set {
_AABBMax = value;
}
}
public LLVector3 AABBMin {
get {
return _AABBMin;
}
set {
_AABBMin = value;
}
}
public int Area {
get {
return _area;
}
set {
_area = value;
}
}
public uint AuctionID {
get {
return _auctionID;
}
set {
_auctionID = value;
}
}
public LLUUID AuthBuyerID {
get {
return _authBuyerID;
}
set {
_authBuyerID = value;
}
}
public libsecondlife.Parcel.ParcelCategory Category {
get {
return _category;
}
set {
_category = value;
}
}
public int ClaimDate {
get {
return _claimDate;
}
set {
_claimDate = value;
}
}
public int ClaimPrice {
get {
return _claimPrice;
}
set {
_claimPrice = value;
}
}
public LLUUID GlobalID {
get {
return _globalID;
}
set {
_globalID = value;
}
}
public LLUUID GroupID {
get {
return _groupID;
}
set {
_groupID = value;
}
}
public int GroupPrims {
get {
return _groupPrims;
}
set {
_groupPrims = value;
}
}
public bool IsGroupOwned {
get {
return _isGroupOwned;
}
set {
_isGroupOwned = value;
}
}
public byte[] Bitmap {
get {
return _bitmap;
}
set {
_bitmap = value;
}
}
public string Description {
get {
return _description;
}
set {
_description = value;
}
}
public uint Flags {
get {
return _flags;
}
set {
_flags = value;
}
}
public byte LandingType {
get {
return _landingType;
}
set {
_landingType = value;
}
}
public string Name {
get {
return _name;
}
set {
_name = value;
}
}
public libsecondlife.Parcel.ParcelStatus Status {
get {
return _status;
}
set {
_status = value;
}
}
public int LocalID {
get {
return _localID;
}
set {
_localID = value;
}
}
public byte MediaAutoScale {
get {
return _mediaAutoScale;
}
set {
_mediaAutoScale = value;
}
}
public LLUUID MediaID {
get {
return _mediaID;
}
set {
_mediaID = value;
}
}
public string MediaURL {
get {
return _mediaURL;
}
set {
_mediaURL = value;
}
}
public string MusicURL {
get {
return _musicURL;
}
set {
_musicURL = value;
}
}
public int OtherPrims {
get {
return _otherPrims;
}
set {
_otherPrims = value;
}
}
public LLUUID OwnerID {
get {
return _ownerID;
}
set {
_ownerID = value;
}
}
public int OwnerPrims {
get {
return _ownerPrims;
}
set {
_ownerPrims = value;
}
}
public List<libsecondlife.ParcelManager.ParcelAccessEntry> ParcelAccessList {
get {
return _parcelAccessList;
}
set {
_parcelAccessList = value;
}
}
public float PassHours {
get {
return _passHours;
}
set {
_passHours = value;
}
}
public int PassPrice {
get {
return _passPrice;
}
set {
_passPrice = value;
}
}
public int SalePrice {
get {
return _salePrice;
}
set {
_salePrice = value;
}
}
public int SelectedPrims {
get {
return _selectedPrims;
}
set {
_selectedPrims = value;
}
}
public int SimwideArea {
get {
return _simwideArea;
}
set {
_simwideArea = value;
}
}
public int SimwidePrims {
get {
return _simwidePrims;
}
set {
_simwidePrims = value;
}
}
public LLUUID SnapshotID {
get {
return _snapshotID;
}
set {
_snapshotID = value;
}
}
public LLVector3 UserLocation {
get {
return _userLocation;
}
set {
_userLocation = value;
}
}
public LLVector3 UserLookAt {
get {
return _userLookAt;
}
set {
_userLookAt = value;
}
}
public LandData()
{
globalID = LLUUID.Random();
_globalID = LLUUID.Random();
}
public LandData Copy()
{
LandData landData = new LandData();
landData.AABBMax = AABBMax;
landData.AABBMin = AABBMin;
landData.area = area;
landData.auctionID = auctionID;
landData.authBuyerID = authBuyerID;
landData.category = category;
landData.claimDate = claimDate;
landData.claimPrice = claimPrice;
landData.globalID = globalID;
landData.groupID = groupID;
landData.groupPrims = groupPrims;
landData.otherPrims = otherPrims;
landData.ownerPrims = ownerPrims;
landData.selectedPrims = selectedPrims;
landData.isGroupOwned = isGroupOwned;
landData.localID = localID;
landData.landingType = landingType;
landData.mediaAutoScale = mediaAutoScale;
landData.mediaID = mediaID;
landData.mediaURL = mediaURL;
landData.musicURL = musicURL;
landData.ownerID = ownerID;
landData.landBitmapByteArray = (byte[]) landBitmapByteArray.Clone();
landData.landDesc = landDesc;
landData.landFlags = landFlags;
landData.landName = landName;
landData.landStatus = landStatus;
landData.passHours = passHours;
landData.passPrice = passPrice;
landData.salePrice = salePrice;
landData.snapshotID = snapshotID;
landData.userLocation = userLocation;
landData.userLookAt = userLookAt;
landData._AABBMax = _AABBMax;
landData._AABBMin = _AABBMin;
landData._area = _area;
landData._auctionID = _auctionID;
landData._authBuyerID = _authBuyerID;
landData._category = _category;
landData._claimDate = _claimDate;
landData._claimPrice = _claimPrice;
landData._globalID = _globalID;
landData._groupID = _groupID;
landData._groupPrims = _groupPrims;
landData._otherPrims = _otherPrims;
landData._ownerPrims = _ownerPrims;
landData._selectedPrims = _selectedPrims;
landData._isGroupOwned = _isGroupOwned;
landData._localID = _localID;
landData._landingType = _landingType;
landData._mediaAutoScale = _mediaAutoScale;
landData._mediaID = _mediaID;
landData._mediaURL = _mediaURL;
landData._musicURL = _musicURL;
landData._ownerID = _ownerID;
landData._bitmap = (byte[]) _bitmap.Clone();
landData._description = _description;
landData._flags = _flags;
landData._name = _name;
landData._status = _status;
landData._passHours = _passHours;
landData._passPrice = _passPrice;
landData._salePrice = _salePrice;
landData._snapshotID = _snapshotID;
landData._userLocation = _userLocation;
landData._userLookAt = _userLookAt;
landData.parcelAccessList.Clear();
foreach (ParcelManager.ParcelAccessEntry entry in parcelAccessList)
landData._parcelAccessList.Clear();
foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList)
{
ParcelManager.ParcelAccessEntry newEntry = new ParcelManager.ParcelAccessEntry();
newEntry.AgentID = entry.AgentID;
newEntry.Flags = entry.Flags;
newEntry.Time = entry.Time;
landData.parcelAccessList.Add(newEntry);
landData._parcelAccessList.Add(newEntry);
}
return landData;

View File

@ -2703,22 +2703,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updatePacket.ParcelData.AABBMax = landData.AABBMax;
updatePacket.ParcelData.AABBMin = landData.AABBMin;
updatePacket.ParcelData.Area = landData.area;
updatePacket.ParcelData.AuctionID = landData.auctionID;
updatePacket.ParcelData.AuthBuyerID = landData.authBuyerID; //unemplemented
updatePacket.ParcelData.Area = landData.Area;
updatePacket.ParcelData.AuctionID = landData.AuctionID;
updatePacket.ParcelData.AuthBuyerID = landData.AuthBuyerID; //unemplemented
updatePacket.ParcelData.Bitmap = landData.landBitmapByteArray;
updatePacket.ParcelData.Bitmap = landData.Bitmap;
updatePacket.ParcelData.Desc = Helpers.StringToField(landData.landDesc);
updatePacket.ParcelData.Category = (byte)landData.category;
updatePacket.ParcelData.ClaimDate = landData.claimDate;
updatePacket.ParcelData.ClaimPrice = landData.claimPrice;
updatePacket.ParcelData.GroupID = landData.groupID;
updatePacket.ParcelData.GroupPrims = landData.groupPrims;
updatePacket.ParcelData.IsGroupOwned = landData.isGroupOwned;
updatePacket.ParcelData.LandingType = (byte)landData.landingType;
updatePacket.ParcelData.LocalID = landData.localID;
if (landData.area > 0)
updatePacket.ParcelData.Desc = Helpers.StringToField(landData.Description);
updatePacket.ParcelData.Category = (byte)landData.Category;
updatePacket.ParcelData.ClaimDate = landData.ClaimDate;
updatePacket.ParcelData.ClaimPrice = landData.ClaimPrice;
updatePacket.ParcelData.GroupID = landData.GroupID;
updatePacket.ParcelData.GroupPrims = landData.GroupPrims;
updatePacket.ParcelData.IsGroupOwned = landData.IsGroupOwned;
updatePacket.ParcelData.LandingType = (byte)landData.LandingType;
updatePacket.ParcelData.LocalID = landData.LocalID;
if (landData.Area > 0)
{
updatePacket.ParcelData.MaxPrims = parcelObjectCapacity;
}
@ -2726,20 +2726,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
updatePacket.ParcelData.MaxPrims = 0;
}
updatePacket.ParcelData.MediaAutoScale = landData.mediaAutoScale;
updatePacket.ParcelData.MediaID = landData.mediaID;
updatePacket.ParcelData.MediaURL = Helpers.StringToField(landData.mediaURL);
updatePacket.ParcelData.MusicURL = Helpers.StringToField(landData.musicURL);
updatePacket.ParcelData.Name = Helpers.StringToField(landData.landName);
updatePacket.ParcelData.MediaAutoScale = landData.MediaAutoScale;
updatePacket.ParcelData.MediaID = landData.MediaID;
updatePacket.ParcelData.MediaURL = Helpers.StringToField(landData.MediaURL);
updatePacket.ParcelData.MusicURL = Helpers.StringToField(landData.MusicURL);
updatePacket.ParcelData.Name = Helpers.StringToField(landData.Name);
updatePacket.ParcelData.OtherCleanTime = 0; //unemplemented
updatePacket.ParcelData.OtherCount = 0; //unemplemented
updatePacket.ParcelData.OtherPrims = landData.otherPrims;
updatePacket.ParcelData.OwnerID = landData.ownerID;
updatePacket.ParcelData.OwnerPrims = landData.ownerPrims;
updatePacket.ParcelData.ParcelFlags = landData.landFlags;
updatePacket.ParcelData.OtherPrims = landData.OtherPrims;
updatePacket.ParcelData.OwnerID = landData.OwnerID;
updatePacket.ParcelData.OwnerPrims = landData.OwnerPrims;
updatePacket.ParcelData.ParcelFlags = landData.Flags;
updatePacket.ParcelData.ParcelPrimBonus = simObjectBonusFactor;
updatePacket.ParcelData.PassHours = landData.passHours;
updatePacket.ParcelData.PassPrice = landData.passPrice;
updatePacket.ParcelData.PassHours = landData.PassHours;
updatePacket.ParcelData.PassPrice = landData.PassPrice;
updatePacket.ParcelData.PublicCount = 0; //unemplemented
updatePacket.ParcelData.RegionDenyAnonymous = ((regionFlags & (uint)Simulator.RegionFlags.DenyAnonymous) >
@ -2753,11 +2753,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updatePacket.ParcelData.RentPrice = 0;
updatePacket.ParcelData.RequestResult = request_result;
updatePacket.ParcelData.SalePrice = landData.salePrice;
updatePacket.ParcelData.SelectedPrims = landData.selectedPrims;
updatePacket.ParcelData.SalePrice = landData.SalePrice;
updatePacket.ParcelData.SelectedPrims = landData.SelectedPrims;
updatePacket.ParcelData.SelfCount = 0; //unemplemented
updatePacket.ParcelData.SequenceID = sequence_id;
if (landData.simwideArea > 0)
if (landData.SimwideArea > 0)
{
updatePacket.ParcelData.SimWideMaxPrims = parcelObjectCapacity;
}
@ -2765,14 +2765,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
updatePacket.ParcelData.SimWideMaxPrims = 0;
}
updatePacket.ParcelData.SimWideTotalPrims = landData.simwidePrims;
updatePacket.ParcelData.SimWideTotalPrims = landData.SimwidePrims;
updatePacket.ParcelData.SnapSelection = snap_selection;
updatePacket.ParcelData.SnapshotID = landData.snapshotID;
updatePacket.ParcelData.Status = (byte)landData.landStatus;
updatePacket.ParcelData.TotalPrims = landData.ownerPrims + landData.groupPrims + landData.otherPrims +
landData.selectedPrims;
updatePacket.ParcelData.UserLocation = landData.userLocation;
updatePacket.ParcelData.UserLookAt = landData.userLookAt;
updatePacket.ParcelData.SnapshotID = landData.SnapshotID;
updatePacket.ParcelData.Status = (byte)landData.Status;
updatePacket.ParcelData.TotalPrims = landData.OwnerPrims + landData.GroupPrims + landData.OtherPrims +
landData.SelectedPrims;
updatePacket.ParcelData.UserLocation = landData.UserLocation;
updatePacket.ParcelData.UserLookAt = landData.UserLookAt;
updatePacket.Header.Zerocoded = true;
remote_client.OutPacket((Packet)updatePacket, ThrottleOutPacketType.Task);
}

View File

@ -142,7 +142,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
foreach (LandObject land in landList.Values)
{
LandData parcel = land.landData;
if ((parcel.landFlags & (uint)Parcel.ParcelFlags.ShowDirectory) == (uint)Parcel.ParcelFlags.ShowDirectory)
if ((parcel.Flags & (uint)Parcel.ParcelFlags.ShowDirectory) == (uint)Parcel.ParcelFlags.ShowDirectory)
{
//TODO: make better method of marshalling data from LandData to XmlNode
@ -152,7 +152,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
XmlAttribute scripts_attr = nodeFactory.CreateAttribute("scripts");
scripts_attr.Value = GetScriptsPermissions(parcel);
XmlAttribute category_attr = nodeFactory.CreateAttribute("category");
category_attr.Value = parcel.category.ToString();
category_attr.Value = parcel.Category.ToString();
//XmlAttribute entities_attr = nodeFactory.CreateAttribute("entities");
//entities_attr.Value = land.primsOverMe.Count.ToString();
xmlparcel.Attributes.Append(scripts_attr);
@ -162,24 +162,24 @@ namespace OpenSim.Region.DataSnapshot.Providers
//name, description, area, and UUID
XmlNode name = nodeFactory.CreateNode(XmlNodeType.Element, "name", "");
name.InnerText = parcel.landName;
name.InnerText = parcel.Name;
xmlparcel.AppendChild(name);
XmlNode desc = nodeFactory.CreateNode(XmlNodeType.Element, "description", "");
desc.InnerText = parcel.landDesc;
desc.InnerText = parcel.Description;
xmlparcel.AppendChild(desc);
XmlNode uuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", "");
uuid.InnerText = parcel.globalID.ToString();
uuid.InnerText = parcel.GlobalID.ToString();
xmlparcel.AppendChild(uuid);
XmlNode area = nodeFactory.CreateNode(XmlNodeType.Element, "area", "");
area.InnerText = parcel.area.ToString();
area.InnerText = parcel.Area.ToString();
xmlparcel.AppendChild(area);
//default location
XmlNode tpLocation = nodeFactory.CreateNode(XmlNodeType.Element, "location", "");
LLVector3 loc = parcel.userLocation;
LLVector3 loc = parcel.UserLocation;
if (loc.Equals(LLVector3.Zero)) // This test is mute at this point: the location is wrong by default
loc = new LLVector3((parcel.AABBMax.X - parcel.AABBMin.X) / 2, (parcel.AABBMax.Y - parcel.AABBMin.Y) / 2, (parcel.AABBMax.Y - parcel.AABBMin.Y) / 2);
tpLocation.InnerText = loc.X.ToString() + "/" + loc.Y.ToString() + "/" + loc.Z.ToString();
@ -188,19 +188,19 @@ namespace OpenSim.Region.DataSnapshot.Providers
//TODO: figure how to figure out teleport system landData.landingType
//land texture snapshot uuid
if (parcel.snapshotID != LLUUID.Zero)
if (parcel.SnapshotID != LLUUID.Zero)
{
XmlNode textureuuid = nodeFactory.CreateNode(XmlNodeType.Element, "image", "");
textureuuid.InnerText = parcel.snapshotID.ToString();
textureuuid.InnerText = parcel.SnapshotID.ToString();
xmlparcel.AppendChild(textureuuid);
}
//attached user and group
if (parcel.groupID != LLUUID.Zero)
if (parcel.GroupID != LLUUID.Zero)
{
XmlNode groupblock = nodeFactory.CreateNode(XmlNodeType.Element, "group", "");
XmlNode groupuuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", "");
groupuuid.InnerText = parcel.groupID.ToString();
groupuuid.InnerText = parcel.GroupID.ToString();
groupblock.AppendChild(groupuuid);
//No name yet, there's no way to get a group name since they don't exist yet.
@ -209,11 +209,11 @@ namespace OpenSim.Region.DataSnapshot.Providers
xmlparcel.AppendChild(groupblock);
}
if (!parcel.isGroupOwned)
if (!parcel.IsGroupOwned)
{
XmlNode userblock = nodeFactory.CreateNode(XmlNodeType.Element, "owner", "");
LLUUID userOwnerUUID = parcel.ownerID;
LLUUID userOwnerUUID = parcel.OwnerID;
XmlNode useruuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", "");
useruuid.InnerText = userOwnerUUID.ToString();
@ -278,7 +278,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
private string GetScriptsPermissions(LandData parcel)
{
if ((parcel.landFlags & (uint)Parcel.ParcelFlags.AllowOtherScripts) == (uint)Parcel.ParcelFlags.AllowOtherScripts)
if ((parcel.Flags & (uint)Parcel.ParcelFlags.AllowOtherScripts) == (uint)Parcel.ParcelFlags.AllowOtherScripts)
return "yes";
else
return "no";

View File

@ -1423,7 +1423,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
else
{
ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
if ((obj.landData.landFlags & (uint)Parcel.ParcelFlags.AllowDamage) != 0)
if ((obj.landData.Flags & (uint)Parcel.ParcelFlags.AllowDamage) != 0)
{
avatar.Invulnerable = false;
}

View File

@ -178,7 +178,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
LandData land = m_scene.GetLandData(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
LLSDParcelVoiceInfoResponse parcelVoiceInfo =
new LLSDParcelVoiceInfoResponse(regionName, land.localID, creds);
new LLSDParcelVoiceInfoResponse(regionName, land.LocalID, creds);
string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo);

View File

@ -147,7 +147,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
LandData land = m_scene.GetLandData(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
LLSDParcelVoiceInfoResponse parcelVoiceInfo =
new LLSDParcelVoiceInfoResponse(regionName, land.localID, creds);
new LLSDParcelVoiceInfoResponse(regionName, land.LocalID, creds);
string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo);
m_log.DebugFormat("[VOICE][PARCELVOICE]: {0}", r);

View File

@ -89,7 +89,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
return m_landManagementModule.GetLandObject(x_float, y_float);
}
ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene);
obj.landData.landName = "NO LAND";
obj.landData.Name = "NO LAND";
return obj;
}
@ -101,7 +101,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
return m_landManagementModule.GetLandObject(x, y);
}
ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene);
obj.landData.landName = "NO LAND";
obj.landData.Name = "NO LAND";
return obj;
}

View File

@ -162,8 +162,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land
ILandObject fullSimParcel = new LandObject(LLUUID.Zero, false, m_scene);
fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
fullSimParcel.landData.ownerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
fullSimParcel.landData.claimDate = Util.UnixTimeSinceEpoch();
fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
fullSimParcel.landData.ClaimDate = Util.UnixTimeSinceEpoch();
AddLandObject(fullSimParcel);
}
@ -279,18 +279,18 @@ namespace OpenSim.Region.Environment.Modules.World.Land
if (!avatar.IsChildAgent)
{
over.sendLandUpdateToClient(avatar.ControllingClient);
m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.localID,
m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.LocalID,
m_scene.RegionInfo.RegionID);
}
}
if (avatar.currentParcelUUID != over.landData.globalID)
if (avatar.currentParcelUUID != over.landData.GlobalID)
{
if (!avatar.IsChildAgent)
{
over.sendLandUpdateToClient(avatar.ControllingClient);
avatar.currentParcelUUID = over.landData.globalID;
m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.localID,
avatar.currentParcelUUID = over.landData.GlobalID;
m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.LocalID,
m_scene.RegionInfo.RegionID);
}
}
@ -316,7 +316,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
clientAvatar.sentMessageAboutRestrictedParcelFlyingDown)
{
handleAvatarChangingParcel(clientAvatar, parcel.landData.localID, m_scene.RegionInfo.RegionID);
handleAvatarChangingParcel(clientAvatar, parcel.landData.LocalID, m_scene.RegionInfo.RegionID);
//They are going below the safety line!
if (!parcel.isBannedFromLand(clientAvatar.UUID))
{
@ -362,7 +362,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{
if (landList.ContainsKey(landLocalID))
{
if (agentID == landList[landLocalID].landData.ownerID)
if (agentID == landList[landLocalID].landData.OwnerID)
{
landList[landLocalID].updateAccessList(flags, entries, remote_client);
}
@ -388,7 +388,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public ILandObject AddLandObject(ILandObject new_land)
{
lastLandLocalID++;
new_land.landData.localID = lastLandLocalID;
new_land.landData.LocalID = lastLandLocalID;
landList.Add(lastLandLocalID, new_land.Copy());
@ -430,7 +430,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
}
}
m_scene.EventManager.TriggerLandObjectRemoved(landList[local_id].landData.globalID);
m_scene.EventManager.TriggerLandObjectRemoved(landList[local_id].landData.GlobalID);
landList.Remove(local_id);
}
@ -445,13 +445,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{
if (landBitmapSlave[x, y])
{
landIDList[x, y] = master.landData.localID;
landIDList[x, y] = master.landData.LocalID;
}
}
}
removeLandObject(slave.landData.localID);
UpdateLandObject(master.landData.localID, master.landData);
removeLandObject(slave.landData.LocalID);
UpdateLandObject(master.landData.LocalID, master.landData);
}
public ILandObject GetLandObject(int parcelLocalID)
@ -550,15 +550,15 @@ namespace OpenSim.Region.Environment.Modules.World.Land
Dictionary<LLUUID, List<LandObject>> landOwnersAndParcels = new Dictionary<LLUUID, List<LandObject>>();
foreach (LandObject p in landList.Values)
{
if (!landOwnersAndParcels.ContainsKey(p.landData.ownerID))
if (!landOwnersAndParcels.ContainsKey(p.landData.OwnerID))
{
List<LandObject> tempList = new List<LandObject>();
tempList.Add(p);
landOwnersAndParcels.Add(p.landData.ownerID, tempList);
landOwnersAndParcels.Add(p.landData.OwnerID, tempList);
}
else
{
landOwnersAndParcels[p.landData.ownerID].Add(p);
landOwnersAndParcels[p.landData.OwnerID].Add(p);
}
}
@ -568,15 +568,15 @@ namespace OpenSim.Region.Environment.Modules.World.Land
int simPrims = 0;
foreach (LandObject p in landOwnersAndParcels[owner])
{
simArea += p.landData.area;
simPrims += p.landData.ownerPrims + p.landData.otherPrims + p.landData.groupPrims +
p.landData.selectedPrims;
simArea += p.landData.Area;
simPrims += p.landData.OwnerPrims + p.landData.OtherPrims + p.landData.GroupPrims +
p.landData.SelectedPrims;
}
foreach (LandObject p in landOwnersAndParcels[owner])
{
p.landData.simwideArea = simArea;
p.landData.simwidePrims = simPrims;
p.landData.SimwideArea = simArea;
p.landData.SimwidePrims = simPrims;
}
}
}
@ -658,13 +658,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
//Lets create a new land object with bitmap activated at that point (keeping the old land objects info)
ILandObject newLand = startLandObject.Copy();
newLand.landData.landName = "Subdivision of " + newLand.landData.landName;
newLand.landData.globalID = LLUUID.Random();
newLand.landData.Name = "Subdivision of " + newLand.landData.Name;
newLand.landData.GlobalID = LLUUID.Random();
newLand.setLandBitmap(newLand.getSquareLandBitmap(start_x, start_y, end_x, end_y));
//Now, lets set the subdivision area of the original to false
int startLandObjectIndex = startLandObject.landData.localID;
int startLandObjectIndex = startLandObject.landData.LocalID;
landList[startLandObjectIndex].setLandBitmap(
newLand.modifyLandBitmapSquare(startLandObject.getLandBitmap(), start_x, start_y, end_x, end_y, false));
landList[startLandObjectIndex].forceUpdateLandInfo();
@ -673,7 +673,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
//Now add the new land object
ILandObject result = AddLandObject(newLand);
UpdateLandObject(startLandObject.landData.localID, startLandObject.landData);
UpdateLandObject(startLandObject.landData.LocalID, startLandObject.landData);
result.sendLandUpdateToAvatarsOverMe();
@ -726,14 +726,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land
}
foreach (ILandObject p in selectedLandObjects)
{
if (p.landData.ownerID != masterLandObject.landData.ownerID)
if (p.landData.OwnerID != masterLandObject.landData.OwnerID)
{
return;
}
}
foreach (ILandObject slaveLandObject in selectedLandObjects)
{
landList[masterLandObject.landData.localID].setLandBitmap(
landList[masterLandObject.landData.LocalID].setLandBitmap(
slaveLandObject.mergeLandBitmaps(masterLandObject.getLandBitmap(), slaveLandObject.getLandBitmap()));
performFinalLandJoin(masterLandObject, slaveLandObject);
}
@ -775,19 +775,19 @@ namespace OpenSim.Region.Environment.Modules.World.Land
if (currentParcelBlock != null)
{
if (currentParcelBlock.landData.ownerID == remote_client.AgentId)
if (currentParcelBlock.landData.OwnerID == remote_client.AgentId)
{
//Owner Flag
tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER);
}
else if (currentParcelBlock.landData.salePrice > 0 &&
(currentParcelBlock.landData.authBuyerID == LLUUID.Zero ||
currentParcelBlock.landData.authBuyerID == remote_client.AgentId))
else if (currentParcelBlock.landData.SalePrice > 0 &&
(currentParcelBlock.landData.AuthBuyerID == LLUUID.Zero ||
currentParcelBlock.landData.AuthBuyerID == remote_client.AgentId))
{
//Sale Flag
tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_IS_FOR_SALE);
}
else if (currentParcelBlock.landData.ownerID == LLUUID.Zero)
else if (currentParcelBlock.landData.OwnerID == LLUUID.Zero)
{
//Public Flag
tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC);
@ -931,7 +931,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{
if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, landList[local_id]))
{
landList[local_id].landData.ownerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
m_scene.Broadcast(SendParcelOverlay);
landList[local_id].sendLandUpdateToClient(remote_client);
}
@ -945,8 +945,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{
if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id]))
{
landList[local_id].landData.ownerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
landList[local_id].landData.claimDate = Util.UnixTimeSinceEpoch();
landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
landList[local_id].landData.ClaimDate = Util.UnixTimeSinceEpoch();
m_scene.Broadcast(SendParcelOverlay);
landList[local_id].sendLandUpdateToClient(remote_client);
}
@ -992,11 +992,11 @@ namespace OpenSim.Region.Environment.Modules.World.Land
}
if (lob != null)
{
LLUUID AuthorizedID = lob.landData.authBuyerID;
int saleprice = lob.landData.salePrice;
LLUUID pOwnerID = lob.landData.ownerID;
LLUUID AuthorizedID = lob.landData.AuthBuyerID;
int saleprice = lob.landData.SalePrice;
LLUUID pOwnerID = lob.landData.OwnerID;
bool landforsale = ((lob.landData.landFlags &
bool landforsale = ((lob.landData.Flags &
(uint)(Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects)) != 0);
if ((AuthorizedID == LLUUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale)
{
@ -1034,7 +1034,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
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.setLandBitmapFromByteArray();
AddLandObject(new_land);

View File

@ -77,8 +77,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public LandObject(LLUUID owner_id, bool is_group_owned, Scene scene)
{
m_scene = scene;
landData.ownerID = owner_id;
landData.isGroupOwned = is_group_owned;
landData.OwnerID = owner_id;
landData.IsGroupOwned = is_group_owned;
}
#endregion
@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
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!
newLand.landBitmap = (bool[,]) (landBitmap.Clone());
@ -139,7 +139,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{
//Normal Calculations
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))); ;
}
}
@ -165,9 +165,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
uint regionFlags = 336723974 & ~((uint)(Simulator.RegionFlags.AllowLandmark | Simulator.RegionFlags.AllowSetHome));
if (estateModule != null)
regionFlags = estateModule.GetRegionFlags();
if ((landData.landFlags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0)
if ((landData.Flags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0)
regionFlags |= (uint)Simulator.RegionFlags.AllowLandmark;
if (landData.ownerID == remote_client.AgentId)
if (landData.OwnerID == remote_client.AgentId)
regionFlags |= (uint)Simulator.RegionFlags.AllowSetHome;
remote_client.SendLandProperties(remote_client, sequence_id,
snap_selection, request_result, landData,
@ -183,31 +183,31 @@ namespace OpenSim.Region.Environment.Modules.World.Land
//Needs later group support
LandData newData = landData.Copy();
if (args.AuthBuyerID != newData.authBuyerID || args.SalePrice != newData.salePrice)
if (args.AuthBuyerID != newData.AuthBuyerID || args.SalePrice != newData.SalePrice)
{
if (m_scene.ExternalChecks.ExternalChecksCanSellParcel(remote_client.AgentId, this))
{
newData.authBuyerID = args.AuthBuyerID;
newData.salePrice = args.SalePrice;
newData.AuthBuyerID = args.AuthBuyerID;
newData.SalePrice = args.SalePrice;
}
}
newData.category = args.Category;
newData.landDesc = args.Desc;
newData.groupID = args.GroupID;
newData.landingType = args.LandingType;
newData.mediaAutoScale = args.MediaAutoScale;
newData.mediaID = args.MediaID;
newData.mediaURL = args.MediaURL;
newData.musicURL = args.MusicURL;
newData.landName = args.Name;
newData.landFlags = args.ParcelFlags;
newData.passHours = args.PassHours;
newData.passPrice = args.PassPrice;
newData.snapshotID = args.SnapshotID;
newData.userLocation = args.UserLocation;
newData.userLookAt = args.UserLookAt;
newData.Category = args.Category;
newData.Description = args.Desc;
newData.GroupID = args.GroupID;
newData.LandingType = args.LandingType;
newData.MediaAutoScale = args.MediaAutoScale;
newData.MediaID = args.MediaID;
newData.MediaURL = args.MediaURL;
newData.MusicURL = args.MusicURL;
newData.Name = args.Name;
newData.Flags = args.ParcelFlags;
newData.PassHours = args.PassHours;
newData.PassPrice = args.PassPrice;
newData.SnapshotID = args.SnapshotID;
newData.UserLocation = args.UserLocation;
newData.UserLookAt = args.UserLookAt;
m_scene.LandChannel.UpdateLandObject(landData.localID, newData);
m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData);
sendLandUpdateToAvatarsOverMe();
}
@ -216,16 +216,16 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public void updateLandSold(LLUUID avatarID, LLUUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area)
{
LandData newData = landData.Copy();
newData.ownerID = avatarID;
newData.groupID = groupID;
newData.isGroupOwned = groupOwned;
newData.OwnerID = avatarID;
newData.GroupID = groupID;
newData.IsGroupOwned = groupOwned;
//newData.auctionID = AuctionID;
newData.claimDate = Util.UnixTimeSinceEpoch();
newData.claimPrice = claimprice;
newData.salePrice = 0;
newData.authBuyerID = LLUUID.Zero;
newData.landFlags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects);
m_scene.LandChannel.UpdateLandObject(landData.localID, newData);
newData.ClaimDate = Util.UnixTimeSinceEpoch();
newData.ClaimPrice = claimprice;
newData.SalePrice = 0;
newData.AuthBuyerID = LLUUID.Zero;
newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects);
m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData);
sendLandUpdateToAvatarsOverMe();
}
@ -245,13 +245,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public bool isBannedFromLand(LLUUID avatar)
{
if ((landData.landFlags & (uint) Parcel.ParcelFlags.UseBanList) > 0)
if ((landData.Flags & (uint) Parcel.ParcelFlags.UseBanList) > 0)
{
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = avatar;
entry.Flags = ParcelManager.AccessList.Ban;
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
return true;
@ -262,13 +262,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public bool isRestrictedFromLand(LLUUID avatar)
{
if ((landData.landFlags & (uint) Parcel.ParcelFlags.UseAccessList) > 0)
if ((landData.Flags & (uint) Parcel.ParcelFlags.UseAccessList) > 0)
{
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = avatar;
entry.Flags = ParcelManager.AccessList.Access;
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
return true;
@ -302,9 +302,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
if (over != null)
{
if (over.landData.localID == landData.localID)
if (over.landData.LocalID == landData.LocalID)
{
if (((over.landData.landFlags & (uint)Parcel.ParcelFlags.AllowDamage) != 0) && m_scene.RegionInfo.RegionSettings.AllowDamage)
if (((over.landData.Flags & (uint)Parcel.ParcelFlags.AllowDamage) != 0) && m_scene.RegionInfo.RegionSettings.AllowDamage)
avatars[i].Invulnerable = false;
else
avatars[i].Invulnerable = true;
@ -322,7 +322,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public List<LLUUID> createAccessListArrayByFlag(ParcelManager.AccessList flag)
{
List<LLUUID> list = new List<LLUUID>();
foreach (ParcelManager.ParcelAccessEntry entry in landData.parcelAccessList)
foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList)
{
if (entry.Flags == flag)
{
@ -344,13 +344,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both)
{
List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access);
remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.localID);
remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.LocalID);
}
if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both)
{
List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban);
remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.localID);
remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.LocalID);
}
}
@ -364,7 +364,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
}
List<ParcelManager.ParcelAccessEntry> toRemove = new List<ParcelManager.ParcelAccessEntry>();
foreach (ParcelManager.ParcelAccessEntry entry in newData.parcelAccessList)
foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList)
{
if (entry.Flags == (ParcelManager.AccessList) flags)
{
@ -374,7 +374,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
foreach (ParcelManager.ParcelAccessEntry entry in toRemove)
{
newData.parcelAccessList.Remove(entry);
newData.ParcelAccessList.Remove(entry);
}
foreach (ParcelManager.ParcelAccessEntry entry in entries)
{
@ -383,13 +383,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
temp.Time = new DateTime(); //Pointless? Yes.
temp.Flags = (ParcelManager.AccessList) flags;
if (!newData.parcelAccessList.Contains(temp))
if (!newData.ParcelAccessList.Contains(temp))
{
newData.parcelAccessList.Add(temp);
newData.ParcelAccessList.Add(temp);
}
}
m_scene.LandChannel.UpdateLandObject(landData.localID, newData);
m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData);
}
#endregion
@ -398,7 +398,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public void updateLandBitmapByteArray()
{
landData.landBitmapByteArray = convertLandBitmapToBytes();
landData.Bitmap = convertLandBitmapToBytes();
}
/// <summary>
@ -459,7 +459,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
landData.AABBMax =
new LLVector3((float) (max_x * 4), (float) (max_y * 4),
(float) m_scene.Heightmap[tx, ty]);
landData.area = tempArea;
landData.Area = tempArea;
}
#endregion
@ -622,7 +622,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
int x = 0, y = 0, i = 0, bitNum = 0;
for (i = 0; i < 512; i++)
{
tempByte = landData.landBitmapByteArray[i];
tempByte = landData.Bitmap[i];
for (bitNum = 0; bitNum < 8; bitNum++)
{
bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte) 1);
@ -655,7 +655,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{
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);
}
@ -798,10 +798,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public void resetLandPrimCounts()
{
landData.groupPrims = 0;
landData.ownerPrims = 0;
landData.otherPrims = 0;
landData.selectedPrims = 0;
landData.GroupPrims = 0;
landData.OwnerPrims = 0;
landData.OtherPrims = 0;
landData.SelectedPrims = 0;
lock (primsOverMe)
@ -816,17 +816,17 @@ namespace OpenSim.Region.Environment.Modules.World.Land
if (obj.IsSelected)
{
landData.selectedPrims += prim_count;
landData.SelectedPrims += prim_count;
}
else
{
if (prim_owner == landData.ownerID)
if (prim_owner == landData.OwnerID)
{
landData.ownerPrims += prim_count;
landData.OwnerPrims += prim_count;
}
else
{
landData.otherPrims += prim_count;
landData.OtherPrims += prim_count;
}
}
@ -843,17 +843,17 @@ namespace OpenSim.Region.Environment.Modules.World.Land
LLUUID prim_owner = obj.OwnerID;
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 (prim_owner == landData.groupID)
else if (prim_owner == landData.GroupID)
{
landData.groupPrims -= prim_count;
landData.GroupPrims -= prim_count;
}
else
{
landData.otherPrims -= prim_count;
landData.OtherPrims -= prim_count;
}
primsOverMe.Remove(obj);

View File

@ -331,7 +331,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
// Users should be able to edit what is over their land.
ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
if (parcel != null && parcel.landData.ownerID == user)
if (parcel != null && parcel.landData.OwnerID == user)
return objectOwnerMask;
// Admin objects should not be editable by the above
@ -423,7 +423,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
// Users should be able to edit what is over their land.
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;
}
@ -492,12 +492,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
{
bool permission = false;
if (parcel.landData.ownerID == user)
if (parcel.landData.OwnerID == user)
{
permission = true;
}
if (parcel.landData.isGroupOwned)
if (parcel.landData.IsGroupOwned)
{
// TODO: Need to do some extra checks here. Requires group code.
}
@ -723,7 +723,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
return false;
}
if ((land.landData.landFlags & ((int)Parcel.ParcelFlags.AllowAllObjectEntry)) != 0)
if ((land.landData.Flags & ((int)Parcel.ParcelFlags.AllowAllObjectEntry)) != 0)
{
return true;
}
@ -770,7 +770,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
ILandObject land = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y);
if (land == null) return false;
if ((land.landData.landFlags & ((int)Parcel.ParcelFlags.CreateObjects)) ==
if ((land.landData.Flags & ((int)Parcel.ParcelFlags.CreateObjects)) ==
(int)Parcel.ParcelFlags.CreateObjects)
permission = true;

View File

@ -2444,9 +2444,9 @@ namespace OpenSim.Region.Environment.Scenes
ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
if (land != null)
{
if (land.landData.landingType == (byte)1 && land.landData.userLocation != LLVector3.Zero)
if (land.landData.LandingType == (byte)1 && land.landData.UserLocation != LLVector3.Zero)
{
agent.startpos = land.landData.userLocation;
agent.startpos = land.landData.UserLocation;
}
}
}
@ -3311,7 +3311,7 @@ namespace OpenSim.Region.Environment.Scenes
}
else
{
return land.landData.ownerID;
return land.landData.OwnerID;
}
}
@ -3329,7 +3329,7 @@ namespace OpenSim.Region.Environment.Scenes
}
else
{
land.landData.musicURL = url;
land.landData.MusicURL = url;
return;
}
}
@ -3345,7 +3345,7 @@ namespace OpenSim.Region.Environment.Scenes
else
{
land.landData.mediaURL = url;
land.landData.MediaURL = url;
return;
}
}
@ -3394,13 +3394,13 @@ namespace OpenSim.Region.Environment.Scenes
{
if (parcel != null)
{
if ((parcel.landData.landFlags & (uint)Parcel.ParcelFlags.AllowOtherScripts) != 0)
if ((parcel.landData.Flags & (uint)Parcel.ParcelFlags.AllowOtherScripts) != 0)
{
return true;
}
else if ((parcel.landData.landFlags & (uint)Parcel.ParcelFlags.AllowGroupScripts) != 0)
else if ((parcel.landData.Flags & (uint)Parcel.ParcelFlags.AllowGroupScripts) != 0)
{
if (part.OwnerID == parcel.landData.ownerID || (parcel.landData.isGroupOwned && part.GroupID == parcel.landData.groupID) || ExternalChecks.ExternalChecksCanBeGodLike(part.OwnerID))
if (part.OwnerID == parcel.landData.OwnerID || (parcel.landData.IsGroupOwned && part.GroupID == parcel.landData.GroupID) || ExternalChecks.ExternalChecksCanBeGodLike(part.OwnerID))
{
return true;
}
@ -3411,7 +3411,7 @@ namespace OpenSim.Region.Environment.Scenes
}
else
{
if (part.OwnerID == parcel.landData.ownerID)
if (part.OwnerID == parcel.landData.OwnerID)
{
return true;
}

View File

@ -4334,9 +4334,9 @@ namespace OpenSim.Region.ScriptEngine.Common
ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y);
if (parcel != null)
{
if (m_host.ObjectOwner == parcel.landData.ownerID ||
(m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.groupID
&& parcel.landData.isGroupOwned) || World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID))
if (m_host.ObjectOwner == parcel.landData.OwnerID ||
(m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.GroupID
&& parcel.landData.IsGroupOwned) || World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID))
{
av.StandUp();
}
@ -4702,7 +4702,7 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.AddScriptLPS(1);
LLUUID key;
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();
if (LLUUID.TryParse(avatar, out key))
@ -4710,7 +4710,7 @@ namespace OpenSim.Region.ScriptEngine.Common
entry.AgentID = key;
entry.Flags = ParcelManager.AccessList.Access;
entry.Time = DateTime.Now.AddHours(hours);
land.parcelAccessList.Add(entry);
land.ParcelAccessList.Add(entry);
}
}
}
@ -6852,7 +6852,7 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.AddScriptLPS(1);
LLUUID key;
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();
if (LLUUID.TryParse(avatar, out key))
@ -6860,7 +6860,7 @@ namespace OpenSim.Region.ScriptEngine.Common
entry.AgentID = key;
entry.Flags = ParcelManager.AccessList.Ban;
entry.Time = DateTime.Now.AddHours(hours);
land.parcelAccessList.Add(entry);
land.ParcelAccessList.Add(entry);
}
}
}
@ -6870,15 +6870,15 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.AddScriptLPS(1);
LLUUID key;
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 (LLUUID.TryParse(avatar, out key))
{
foreach (ParcelManager.ParcelAccessEntry entry in land.parcelAccessList)
foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
{
if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Access)
{
land.parcelAccessList.Remove(entry);
land.ParcelAccessList.Remove(entry);
break;
}
}
@ -6891,15 +6891,15 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.AddScriptLPS(1);
LLUUID key;
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 (LLUUID.TryParse(avatar, out key))
{
foreach (ParcelManager.ParcelAccessEntry entry in land.parcelAccessList)
foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
{
if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Ban)
{
land.parcelAccessList.Remove(entry);
land.ParcelAccessList.Remove(entry);
break;
}
}
@ -6961,7 +6961,7 @@ namespace OpenSim.Region.ScriptEngine.Common
public LSL_Types.LSLInteger llGetParcelFlags(LSL_Types.Vector3 pos)
{
m_host.AddScriptLPS(1);
return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.landFlags;
return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.Flags;
}
public LSL_Types.LSLInteger llGetRegionFlags()
@ -7038,13 +7038,13 @@ namespace OpenSim.Region.ScriptEngine.Common
{
m_host.AddScriptLPS(1);
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)
{
if (entry.Flags == ParcelManager.AccessList.Ban)
{
land.parcelAccessList.Remove(entry);
land.ParcelAccessList.Remove(entry);
}
}
}
@ -7054,13 +7054,13 @@ namespace OpenSim.Region.ScriptEngine.Common
{
m_host.AddScriptLPS(1);
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)
{
if (entry.Flags == ParcelManager.AccessList.Access)
{
land.parcelAccessList.Remove(entry);
land.ParcelAccessList.Remove(entry);
}
}
}
@ -7083,7 +7083,7 @@ namespace OpenSim.Region.ScriptEngine.Common
{
if (category == 0)
{
return land.simwidePrims;
return land.SimwidePrims;
}
else
@ -7102,22 +7102,22 @@ namespace OpenSim.Region.ScriptEngine.Common
else if (category == 1)//Owner Prims
{
return land.ownerPrims;
return land.OwnerPrims;
}
else if (category == 2)//Group Prims
{
return land.groupPrims;
return land.GroupPrims;
}
else if (category == 3)//Other Prims
{
return land.otherPrims;
return land.OtherPrims;
}
else if (category == 4)//Selected
{
return land.selectedPrims;
return land.SelectedPrims;
}
else if (category == 5)//Temp
@ -7175,14 +7175,14 @@ namespace OpenSim.Region.ScriptEngine.Common
if (sim_wide == 1)
{
decimal v = land.simwideArea * (decimal)(0.22) * (decimal)bonusfactor;
decimal v = land.SimwideArea * (decimal)(0.22) * (decimal)bonusfactor;
return (int)v;
}
else
{
decimal v = land.area * (decimal)(0.22) * (decimal)bonusfactor;
decimal v = land.Area * (decimal)(0.22) * (decimal)bonusfactor;
return (int)v;
}
@ -7203,19 +7203,19 @@ namespace OpenSim.Region.ScriptEngine.Common
switch (o.ToString())
{
case "0":
ret = ret + new LSL_Types.list(land.landName);
ret = ret + new LSL_Types.list(land.Name);
break;
case "1":
ret = ret + new LSL_Types.list(land.landDesc);
ret = ret + new LSL_Types.list(land.Description);
break;
case "2":
ret = ret + new LSL_Types.list(land.ownerID.ToString());
ret = ret + new LSL_Types.list(land.OwnerID.ToString());
break;
case "3":
ret = ret + new LSL_Types.list(land.groupID.ToString());
ret = ret + new LSL_Types.list(land.GroupID.ToString());
break;
case "4":
ret = ret + new LSL_Types.list(land.area);
ret = ret + new LSL_Types.list(land.Area);
break;
default:
ret = ret + new LSL_Types.list(0);

View File

@ -4198,9 +4198,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y);
if (parcel != null)
{
if (m_host.ObjectOwner == parcel.landData.ownerID ||
(m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.groupID
&& parcel.landData.isGroupOwned) || World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID))
if (m_host.ObjectOwner == parcel.landData.OwnerID ||
(m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.GroupID
&& parcel.landData.IsGroupOwned) || World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID))
{
av.StandUp();
}
@ -4566,7 +4566,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
LLUUID key;
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();
if (LLUUID.TryParse(avatar, out key))
@ -4574,7 +4574,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
entry.AgentID = key;
entry.Flags = ParcelManager.AccessList.Access;
entry.Time = DateTime.Now.AddHours(hours);
land.parcelAccessList.Add(entry);
land.ParcelAccessList.Add(entry);
}
}
}
@ -6632,7 +6632,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
LLUUID key;
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();
if (LLUUID.TryParse(avatar, out key))
@ -6640,7 +6640,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
entry.AgentID = key;
entry.Flags = ParcelManager.AccessList.Ban;
entry.Time = DateTime.Now.AddHours(hours);
land.parcelAccessList.Add(entry);
land.ParcelAccessList.Add(entry);
}
}
}
@ -6650,15 +6650,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
LLUUID key;
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 (LLUUID.TryParse(avatar, out key))
{
foreach (ParcelManager.ParcelAccessEntry entry in land.parcelAccessList)
foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
{
if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Access)
{
land.parcelAccessList.Remove(entry);
land.ParcelAccessList.Remove(entry);
break;
}
}
@ -6671,15 +6671,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
LLUUID key;
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 (LLUUID.TryParse(avatar, out key))
{
foreach (ParcelManager.ParcelAccessEntry entry in land.parcelAccessList)
foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
{
if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Ban)
{
land.parcelAccessList.Remove(entry);
land.ParcelAccessList.Remove(entry);
break;
}
}
@ -6741,7 +6741,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Types.LSLInteger llGetParcelFlags(LSL_Types.Vector3 pos)
{
m_host.AddScriptLPS(1);
return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.landFlags;
return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.Flags;
}
public LSL_Types.LSLInteger llGetRegionFlags()
@ -6818,13 +6818,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
m_host.AddScriptLPS(1);
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)
{
if (entry.Flags == ParcelManager.AccessList.Ban)
{
land.parcelAccessList.Remove(entry);
land.ParcelAccessList.Remove(entry);
}
}
}
@ -6834,13 +6834,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
m_host.AddScriptLPS(1);
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)
{
if (entry.Flags == ParcelManager.AccessList.Access)
{
land.parcelAccessList.Remove(entry);
land.ParcelAccessList.Remove(entry);
}
}
}
@ -6863,7 +6863,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
if (category == 0)
{
return land.simwidePrims;
return land.SimwidePrims;
}
else
@ -6882,22 +6882,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
else if (category == 1)//Owner Prims
{
return land.ownerPrims;
return land.OwnerPrims;
}
else if (category == 2)//Group Prims
{
return land.groupPrims;
return land.GroupPrims;
}
else if (category == 3)//Other Prims
{
return land.otherPrims;
return land.OtherPrims;
}
else if (category == 4)//Selected
{
return land.selectedPrims;
return land.SelectedPrims;
}
else if (category == 5)//Temp
@ -6955,14 +6955,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (sim_wide == 1)
{
decimal v = land.simwideArea * (decimal)(0.22) * (decimal)bonusfactor;
decimal v = land.SimwideArea * (decimal)(0.22) * (decimal)bonusfactor;
return (int)v;
}
else
{
decimal v = land.area * (decimal)(0.22) * (decimal)bonusfactor;
decimal v = land.Area * (decimal)(0.22) * (decimal)bonusfactor;
return (int)v;
}
@ -6983,19 +6983,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
switch (o.ToString())
{
case "0":
ret = ret + new LSL_Types.list(land.landName);
ret = ret + new LSL_Types.list(land.Name);
break;
case "1":
ret = ret + new LSL_Types.list(land.landDesc);
ret = ret + new LSL_Types.list(land.Description);
break;
case "2":
ret = ret + new LSL_Types.list(land.ownerID.ToString());
ret = ret + new LSL_Types.list(land.OwnerID.ToString());
break;
case "3":
ret = ret + new LSL_Types.list(land.groupID.ToString());
ret = ret + new LSL_Types.list(land.GroupID.ToString());
break;
case "4":
ret = ret + new LSL_Types.list(land.area);
ret = ret + new LSL_Types.list(land.Area);
break;
default:
ret = ret + new LSL_Types.list(0);