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
parent
ecd296ad67
commit
090159defc
|
@ -470,7 +470,7 @@ namespace OpenSim.Data.MSSQL
|
||||||
DataTable land = m_landTable;
|
DataTable land = m_landTable;
|
||||||
DataTable landaccesslist = m_landAccessListTable;
|
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)
|
if (landRow == null)
|
||||||
{
|
{
|
||||||
landRow = land.NewRow();
|
landRow = land.NewRow();
|
||||||
|
@ -486,14 +486,14 @@ namespace OpenSim.Data.MSSQL
|
||||||
SqlCommand cmd =
|
SqlCommand cmd =
|
||||||
new SqlCommand("delete from landaccesslist where LandUUID=@LandUUID", m_connection))
|
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();
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -518,11 +518,11 @@ namespace OpenSim.Data.MSSQL
|
||||||
foreach (DataRow rawDataLand in rawDataForRegion)
|
foreach (DataRow rawDataLand in rawDataForRegion)
|
||||||
{
|
{
|
||||||
LandData newLand = buildLandData(rawDataLand);
|
LandData newLand = buildLandData(rawDataLand);
|
||||||
string accessListSearchExp = "LandUUID = '" + newLand.globalID.UUID + "'";
|
string accessListSearchExp = "LandUUID = '" + newLand.GlobalID.UUID + "'";
|
||||||
DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp);
|
DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp);
|
||||||
foreach (DataRow rawDataLandAccess in rawDataForLandAccessList)
|
foreach (DataRow rawDataLandAccess in rawDataForLandAccessList)
|
||||||
{
|
{
|
||||||
newLand.parcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
|
newLand.ParcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
|
||||||
}
|
}
|
||||||
|
|
||||||
landDataForRegion.Add(newLand);
|
landDataForRegion.Add(newLand);
|
||||||
|
@ -992,43 +992,43 @@ namespace OpenSim.Data.MSSQL
|
||||||
{
|
{
|
||||||
LandData newData = new LandData();
|
LandData newData = new LandData();
|
||||||
|
|
||||||
newData.globalID = new LLUUID((String)row["UUID"]);
|
newData.GlobalID = new LLUUID((String)row["UUID"]);
|
||||||
newData.localID = Convert.ToInt32(row["LocalLandID"]);
|
newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
|
||||||
|
|
||||||
// Bitmap is a byte[512]
|
// Bitmap is a byte[512]
|
||||||
newData.landBitmapByteArray = (Byte[])row["Bitmap"];
|
newData.Bitmap = (Byte[])row["Bitmap"];
|
||||||
|
|
||||||
newData.landName = (String)row["Name"];
|
newData.Name = (String)row["Name"];
|
||||||
newData.landDesc = (String)row["Description"];
|
newData.Description = (String)row["Description"];
|
||||||
newData.ownerID = (String)row["OwnerUUID"];
|
newData.OwnerID = (String)row["OwnerUUID"];
|
||||||
newData.isGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
|
newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
|
||||||
newData.area = Convert.ToInt32(row["Area"]);
|
newData.Area = Convert.ToInt32(row["Area"]);
|
||||||
newData.auctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
|
newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
|
||||||
newData.category = (Parcel.ParcelCategory)Convert.ToInt32(row["Category"]);
|
newData.Category = (Parcel.ParcelCategory)Convert.ToInt32(row["Category"]);
|
||||||
//Enum libsecondlife.Parcel.ParcelCategory
|
//Enum libsecondlife.Parcel.ParcelCategory
|
||||||
newData.claimDate = Convert.ToInt32(row["ClaimDate"]);
|
newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
|
||||||
newData.claimPrice = Convert.ToInt32(row["ClaimPrice"]);
|
newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]);
|
||||||
newData.groupID = new LLUUID((String)row["GroupUUID"]);
|
newData.GroupID = new LLUUID((String)row["GroupUUID"]);
|
||||||
newData.salePrice = Convert.ToInt32(row["SalePrice"]);
|
newData.SalePrice = Convert.ToInt32(row["SalePrice"]);
|
||||||
newData.landStatus = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]);
|
newData.Status = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]);
|
||||||
//Enum. libsecondlife.Parcel.ParcelStatus
|
//Enum. libsecondlife.Parcel.ParcelStatus
|
||||||
newData.landFlags = Convert.ToUInt32(row["LandFlags"]);
|
newData.Flags = Convert.ToUInt32(row["LandFlags"]);
|
||||||
newData.landingType = Convert.ToByte(row["LandingType"]);
|
newData.LandingType = Convert.ToByte(row["LandingType"]);
|
||||||
newData.mediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
|
newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
|
||||||
newData.mediaID = new LLUUID((String)row["MediaTextureUUID"]);
|
newData.MediaID = new LLUUID((String)row["MediaTextureUUID"]);
|
||||||
newData.mediaURL = (String)row["MediaURL"];
|
newData.MediaURL = (String)row["MediaURL"];
|
||||||
newData.musicURL = (String)row["MusicURL"];
|
newData.MusicURL = (String)row["MusicURL"];
|
||||||
newData.passHours = Convert.ToSingle(row["PassHours"]);
|
newData.PassHours = Convert.ToSingle(row["PassHours"]);
|
||||||
newData.passPrice = Convert.ToInt32(row["PassPrice"]);
|
newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
|
||||||
newData.snapshotID = (String)row["SnapshotUUID"];
|
newData.SnapshotID = (String)row["SnapshotUUID"];
|
||||||
|
|
||||||
newData.userLocation =
|
newData.UserLocation =
|
||||||
new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
|
new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
|
||||||
Convert.ToSingle(row["UserLocationZ"]));
|
Convert.ToSingle(row["UserLocationZ"]));
|
||||||
newData.userLookAt =
|
newData.UserLookAt =
|
||||||
new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
|
new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
|
||||||
Convert.ToSingle(row["UserLookAtZ"]));
|
Convert.ToSingle(row["UserLookAtZ"]));
|
||||||
newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
|
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
|
||||||
|
|
||||||
return newData;
|
return newData;
|
||||||
}
|
}
|
||||||
|
@ -1186,40 +1186,40 @@ namespace OpenSim.Data.MSSQL
|
||||||
/// <param name="regionUUID"></param>
|
/// <param name="regionUUID"></param>
|
||||||
private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
|
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["RegionUUID"] = regionUUID.UUID;
|
||||||
row["LocalLandID"] = land.localID;
|
row["LocalLandID"] = land.LocalID;
|
||||||
|
|
||||||
// Bitmap is a byte[512]
|
// Bitmap is a byte[512]
|
||||||
row["Bitmap"] = land.landBitmapByteArray;
|
row["Bitmap"] = land.Bitmap;
|
||||||
|
|
||||||
row["Name"] = land.landName;
|
row["Name"] = land.Name;
|
||||||
row["Description"] = land.landDesc;
|
row["Description"] = land.Description;
|
||||||
row["OwnerUUID"] = land.ownerID.UUID;
|
row["OwnerUUID"] = land.OwnerID.UUID;
|
||||||
row["IsGroupOwned"] = land.isGroupOwned;
|
row["IsGroupOwned"] = land.IsGroupOwned;
|
||||||
row["Area"] = land.area;
|
row["Area"] = land.Area;
|
||||||
row["AuctionID"] = land.auctionID; //Unemplemented
|
row["AuctionID"] = land.AuctionID; //Unemplemented
|
||||||
row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory
|
row["Category"] = land.Category; //Enum libsecondlife.Parcel.ParcelCategory
|
||||||
row["ClaimDate"] = land.claimDate;
|
row["ClaimDate"] = land.ClaimDate;
|
||||||
row["ClaimPrice"] = land.claimPrice;
|
row["ClaimPrice"] = land.ClaimPrice;
|
||||||
row["GroupUUID"] = land.groupID.UUID;
|
row["GroupUUID"] = land.GroupID.UUID;
|
||||||
row["SalePrice"] = land.salePrice;
|
row["SalePrice"] = land.SalePrice;
|
||||||
row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus
|
row["LandStatus"] = land.Status; //Enum. libsecondlife.Parcel.ParcelStatus
|
||||||
row["LandFlags"] = land.landFlags;
|
row["LandFlags"] = land.Flags;
|
||||||
row["LandingType"] = land.landingType;
|
row["LandingType"] = land.LandingType;
|
||||||
row["MediaAutoScale"] = land.mediaAutoScale;
|
row["MediaAutoScale"] = land.MediaAutoScale;
|
||||||
row["MediaTextureUUID"] = land.mediaID.UUID;
|
row["MediaTextureUUID"] = land.MediaID.UUID;
|
||||||
row["MediaURL"] = land.mediaURL;
|
row["MediaURL"] = land.MediaURL;
|
||||||
row["MusicURL"] = land.musicURL;
|
row["MusicURL"] = land.MusicURL;
|
||||||
row["PassHours"] = land.passHours;
|
row["PassHours"] = land.PassHours;
|
||||||
row["PassPrice"] = land.passPrice;
|
row["PassPrice"] = land.PassPrice;
|
||||||
row["SnapshotUUID"] = land.snapshotID.UUID;
|
row["SnapshotUUID"] = land.SnapshotID.UUID;
|
||||||
row["UserLocationX"] = land.userLocation.X;
|
row["UserLocationX"] = land.UserLocation.X;
|
||||||
row["UserLocationY"] = land.userLocation.Y;
|
row["UserLocationY"] = land.UserLocation.Y;
|
||||||
row["UserLocationZ"] = land.userLocation.Z;
|
row["UserLocationZ"] = land.UserLocation.Z;
|
||||||
row["UserLookAtX"] = land.userLookAt.X;
|
row["UserLookAtX"] = land.UserLookAt.X;
|
||||||
row["UserLookAtY"] = land.userLookAt.Y;
|
row["UserLookAtY"] = land.UserLookAt.Y;
|
||||||
row["UserLookAtZ"] = land.userLookAt.Z;
|
row["UserLookAtZ"] = land.UserLookAt.Z;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -692,7 +692,7 @@ namespace OpenSim.Data.MySQL
|
||||||
DataTable land = m_landTable;
|
DataTable land = m_landTable;
|
||||||
DataTable landaccesslist = m_landAccessListTable;
|
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)
|
if (landRow == null)
|
||||||
{
|
{
|
||||||
landRow = land.NewRow();
|
landRow = land.NewRow();
|
||||||
|
@ -708,14 +708,14 @@ namespace OpenSim.Data.MySQL
|
||||||
MySqlCommand cmd =
|
MySqlCommand cmd =
|
||||||
new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection))
|
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();
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -787,11 +787,11 @@ namespace OpenSim.Data.MySQL
|
||||||
foreach (DataRow rawDataLand in rawDataForRegion)
|
foreach (DataRow rawDataLand in rawDataForRegion)
|
||||||
{
|
{
|
||||||
LandData newLand = buildLandData(rawDataLand);
|
LandData newLand = buildLandData(rawDataLand);
|
||||||
string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.globalID) + "'";
|
string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.GlobalID) + "'";
|
||||||
DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp);
|
DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp);
|
||||||
foreach (DataRow rawDataLandAccess in rawDataForLandAccessList)
|
foreach (DataRow rawDataLandAccess in rawDataForLandAccessList)
|
||||||
{
|
{
|
||||||
newLand.parcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
|
newLand.ParcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
|
||||||
}
|
}
|
||||||
|
|
||||||
landDataForRegion.Add(newLand);
|
landDataForRegion.Add(newLand);
|
||||||
|
@ -1319,59 +1319,59 @@ namespace OpenSim.Data.MySQL
|
||||||
{
|
{
|
||||||
LandData newData = new LandData();
|
LandData newData = new LandData();
|
||||||
|
|
||||||
newData.globalID = new LLUUID((String) row["UUID"]);
|
newData.GlobalID = new LLUUID((String) row["UUID"]);
|
||||||
newData.localID = Convert.ToInt32(row["LocalLandID"]);
|
newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
|
||||||
|
|
||||||
// Bitmap is a byte[512]
|
// Bitmap is a byte[512]
|
||||||
newData.landBitmapByteArray = (Byte[]) row["Bitmap"];
|
newData.Bitmap = (Byte[]) row["Bitmap"];
|
||||||
|
|
||||||
newData.landName = (String) row["Name"];
|
newData.Name = (String) row["Name"];
|
||||||
newData.landDesc = (String) row["Description"];
|
newData.Description = (String) row["Description"];
|
||||||
newData.ownerID = (String) row["OwnerUUID"];
|
newData.OwnerID = (String) row["OwnerUUID"];
|
||||||
newData.isGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
|
newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
|
||||||
newData.area = Convert.ToInt32(row["Area"]);
|
newData.Area = Convert.ToInt32(row["Area"]);
|
||||||
newData.auctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
|
newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
|
||||||
newData.category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]);
|
newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]);
|
||||||
//Enum libsecondlife.Parcel.ParcelCategory
|
//Enum libsecondlife.Parcel.ParcelCategory
|
||||||
newData.claimDate = Convert.ToInt32(row["ClaimDate"]);
|
newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
|
||||||
newData.claimPrice = Convert.ToInt32(row["ClaimPrice"]);
|
newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]);
|
||||||
newData.groupID = new LLUUID((String) row["GroupUUID"]);
|
newData.GroupID = new LLUUID((String) row["GroupUUID"]);
|
||||||
newData.salePrice = Convert.ToInt32(row["SalePrice"]);
|
newData.SalePrice = Convert.ToInt32(row["SalePrice"]);
|
||||||
newData.landStatus = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
|
newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
|
||||||
//Enum. libsecondlife.Parcel.ParcelStatus
|
//Enum. libsecondlife.Parcel.ParcelStatus
|
||||||
newData.landFlags = Convert.ToUInt32(row["LandFlags"]);
|
newData.Flags = Convert.ToUInt32(row["LandFlags"]);
|
||||||
newData.landingType = Convert.ToByte(row["LandingType"]);
|
newData.LandingType = Convert.ToByte(row["LandingType"]);
|
||||||
newData.mediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
|
newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
|
||||||
newData.mediaID = new LLUUID((String) row["MediaTextureUUID"]);
|
newData.MediaID = new LLUUID((String) row["MediaTextureUUID"]);
|
||||||
newData.mediaURL = (String) row["MediaURL"];
|
newData.MediaURL = (String) row["MediaURL"];
|
||||||
newData.musicURL = (String) row["MusicURL"];
|
newData.MusicURL = (String) row["MusicURL"];
|
||||||
newData.passHours = Convert.ToSingle(row["PassHours"]);
|
newData.PassHours = Convert.ToSingle(row["PassHours"]);
|
||||||
newData.passPrice = Convert.ToInt32(row["PassPrice"]);
|
newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
|
||||||
LLUUID authedbuyer = LLUUID.Zero;
|
LLUUID authedbuyer = LLUUID.Zero;
|
||||||
LLUUID snapshotID = LLUUID.Zero;
|
LLUUID snapshotID = LLUUID.Zero;
|
||||||
|
|
||||||
Helpers.TryParse((string)row["AuthBuyerID"], out authedbuyer);
|
Helpers.TryParse((string)row["AuthBuyerID"], out authedbuyer);
|
||||||
Helpers.TryParse((string)row["SnapshotUUID"], out snapshotID);
|
Helpers.TryParse((string)row["SnapshotUUID"], out snapshotID);
|
||||||
|
|
||||||
newData.authBuyerID = authedbuyer;
|
newData.AuthBuyerID = authedbuyer;
|
||||||
newData.snapshotID = snapshotID;
|
newData.SnapshotID = snapshotID;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
newData.userLocation =
|
newData.UserLocation =
|
||||||
new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
|
new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
|
||||||
Convert.ToSingle(row["UserLocationZ"]));
|
Convert.ToSingle(row["UserLocationZ"]));
|
||||||
newData.userLookAt =
|
newData.UserLookAt =
|
||||||
new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
|
new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
|
||||||
Convert.ToSingle(row["UserLookAtZ"]));
|
Convert.ToSingle(row["UserLookAtZ"]));
|
||||||
}
|
}
|
||||||
catch (InvalidCastException)
|
catch (InvalidCastException)
|
||||||
{
|
{
|
||||||
newData.userLocation = LLVector3.Zero;
|
newData.UserLocation = LLVector3.Zero;
|
||||||
newData.userLookAt = LLVector3.Zero;
|
newData.UserLookAt = LLVector3.Zero;
|
||||||
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.landName);
|
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;
|
return newData;
|
||||||
}
|
}
|
||||||
|
@ -1576,41 +1576,41 @@ namespace OpenSim.Data.MySQL
|
||||||
/// <param name="regionUUID"></param>
|
/// <param name="regionUUID"></param>
|
||||||
private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
|
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["RegionUUID"] = Util.ToRawUuidString(regionUUID);
|
||||||
row["LocalLandID"] = land.localID;
|
row["LocalLandID"] = land.LocalID;
|
||||||
|
|
||||||
// Bitmap is a byte[512]
|
// Bitmap is a byte[512]
|
||||||
row["Bitmap"] = land.landBitmapByteArray;
|
row["Bitmap"] = land.Bitmap;
|
||||||
|
|
||||||
row["Name"] = land.landName;
|
row["Name"] = land.Name;
|
||||||
row["Description"] = land.landDesc;
|
row["Description"] = land.Description;
|
||||||
row["OwnerUUID"] = Util.ToRawUuidString(land.ownerID);
|
row["OwnerUUID"] = Util.ToRawUuidString(land.OwnerID);
|
||||||
row["IsGroupOwned"] = land.isGroupOwned;
|
row["IsGroupOwned"] = land.IsGroupOwned;
|
||||||
row["Area"] = land.area;
|
row["Area"] = land.Area;
|
||||||
row["AuctionID"] = land.auctionID; //Unemplemented
|
row["AuctionID"] = land.AuctionID; //Unemplemented
|
||||||
row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory
|
row["Category"] = land.Category; //Enum libsecondlife.Parcel.ParcelCategory
|
||||||
row["ClaimDate"] = land.claimDate;
|
row["ClaimDate"] = land.ClaimDate;
|
||||||
row["ClaimPrice"] = land.claimPrice;
|
row["ClaimPrice"] = land.ClaimPrice;
|
||||||
row["GroupUUID"] = Util.ToRawUuidString(land.groupID);
|
row["GroupUUID"] = Util.ToRawUuidString(land.GroupID);
|
||||||
row["SalePrice"] = land.salePrice;
|
row["SalePrice"] = land.SalePrice;
|
||||||
row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus
|
row["LandStatus"] = land.Status; //Enum. libsecondlife.Parcel.ParcelStatus
|
||||||
row["LandFlags"] = land.landFlags;
|
row["LandFlags"] = land.Flags;
|
||||||
row["LandingType"] = land.landingType;
|
row["LandingType"] = land.LandingType;
|
||||||
row["MediaAutoScale"] = land.mediaAutoScale;
|
row["MediaAutoScale"] = land.MediaAutoScale;
|
||||||
row["MediaTextureUUID"] = Util.ToRawUuidString(land.mediaID);
|
row["MediaTextureUUID"] = Util.ToRawUuidString(land.MediaID);
|
||||||
row["MediaURL"] = land.mediaURL;
|
row["MediaURL"] = land.MediaURL;
|
||||||
row["MusicURL"] = land.musicURL;
|
row["MusicURL"] = land.MusicURL;
|
||||||
row["PassHours"] = land.passHours;
|
row["PassHours"] = land.PassHours;
|
||||||
row["PassPrice"] = land.passPrice;
|
row["PassPrice"] = land.PassPrice;
|
||||||
row["SnapshotUUID"] = Util.ToRawUuidString(land.snapshotID);
|
row["SnapshotUUID"] = Util.ToRawUuidString(land.SnapshotID);
|
||||||
row["UserLocationX"] = land.userLocation.X;
|
row["UserLocationX"] = land.UserLocation.X;
|
||||||
row["UserLocationY"] = land.userLocation.Y;
|
row["UserLocationY"] = land.UserLocation.Y;
|
||||||
row["UserLocationZ"] = land.userLocation.Z;
|
row["UserLocationZ"] = land.UserLocation.Z;
|
||||||
row["UserLookAtX"] = land.userLookAt.X;
|
row["UserLookAtX"] = land.UserLookAt.X;
|
||||||
row["UserLookAtY"] = land.userLookAt.Y;
|
row["UserLookAtY"] = land.UserLookAt.Y;
|
||||||
row["UserLookAtZ"] = land.userLookAt.Z;
|
row["UserLookAtZ"] = land.UserLookAt.Z;
|
||||||
row["AuthBuyerID"] = land.authBuyerID;
|
row["AuthBuyerID"] = land.AuthBuyerID;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -533,7 +533,7 @@ 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(Util.ToRawUuidString(parcel.landData.globalID));
|
DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.GlobalID));
|
||||||
if (landRow == null)
|
if (landRow == null)
|
||||||
{
|
{
|
||||||
landRow = land.NewRow();
|
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
|
// 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", Util.ToRawUuidString(parcel.landData.globalID)));
|
cmd.Parameters.Add(new SqliteParameter(":LandUUID", Util.ToRawUuidString(parcel.landData.GlobalID)));
|
||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -580,11 +580,11 @@ namespace OpenSim.Data.SQLite
|
||||||
foreach (DataRow rawDataLand in rawDataForRegion)
|
foreach (DataRow rawDataLand in rawDataForRegion)
|
||||||
{
|
{
|
||||||
LandData newLand = buildLandData(rawDataLand);
|
LandData newLand = buildLandData(rawDataLand);
|
||||||
string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.globalID) + "'";
|
string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.GlobalID) + "'";
|
||||||
DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp);
|
DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp);
|
||||||
foreach (DataRow rawDataLandAccess in rawDataForLandAccessList)
|
foreach (DataRow rawDataLandAccess in rawDataForLandAccessList)
|
||||||
{
|
{
|
||||||
newLand.parcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
|
newLand.ParcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
|
||||||
}
|
}
|
||||||
|
|
||||||
landDataForRegion.Add(newLand);
|
landDataForRegion.Add(newLand);
|
||||||
|
@ -1033,53 +1033,53 @@ namespace OpenSim.Data.SQLite
|
||||||
{
|
{
|
||||||
LandData newData = new LandData();
|
LandData newData = new LandData();
|
||||||
|
|
||||||
newData.globalID = new LLUUID((String) row["UUID"]);
|
newData.GlobalID = new LLUUID((String) row["UUID"]);
|
||||||
newData.localID = Convert.ToInt32(row["LocalLandID"]);
|
newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
|
||||||
|
|
||||||
// Bitmap is a byte[512]
|
// Bitmap is a byte[512]
|
||||||
newData.landBitmapByteArray = (Byte[]) row["Bitmap"];
|
newData.Bitmap = (Byte[]) row["Bitmap"];
|
||||||
|
|
||||||
newData.landName = (String) row["Name"];
|
newData.Name = (String) row["Name"];
|
||||||
newData.landDesc = (String) row["Desc"];
|
newData.Description = (String) row["Desc"];
|
||||||
newData.ownerID = (String) row["OwnerUUID"];
|
newData.OwnerID = (String) row["OwnerUUID"];
|
||||||
newData.isGroupOwned = (Boolean) row["IsGroupOwned"];
|
newData.IsGroupOwned = (Boolean) row["IsGroupOwned"];
|
||||||
newData.area = Convert.ToInt32(row["Area"]);
|
newData.Area = Convert.ToInt32(row["Area"]);
|
||||||
newData.auctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
|
newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
|
||||||
newData.category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]);
|
newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]);
|
||||||
//Enum libsecondlife.Parcel.ParcelCategory
|
//Enum libsecondlife.Parcel.ParcelCategory
|
||||||
newData.claimDate = Convert.ToInt32(row["ClaimDate"]);
|
newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
|
||||||
newData.claimPrice = Convert.ToInt32(row["ClaimPrice"]);
|
newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]);
|
||||||
newData.groupID = new LLUUID((String) row["GroupUUID"]);
|
newData.GroupID = new LLUUID((String) row["GroupUUID"]);
|
||||||
newData.salePrice = Convert.ToInt32(row["SalePrice"]);
|
newData.SalePrice = Convert.ToInt32(row["SalePrice"]);
|
||||||
newData.landStatus = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
|
newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
|
||||||
//Enum. libsecondlife.Parcel.ParcelStatus
|
//Enum. libsecondlife.Parcel.ParcelStatus
|
||||||
newData.landFlags = Convert.ToUInt32(row["LandFlags"]);
|
newData.Flags = Convert.ToUInt32(row["LandFlags"]);
|
||||||
newData.landingType = (Byte) row["LandingType"];
|
newData.LandingType = (Byte) row["LandingType"];
|
||||||
newData.mediaAutoScale = (Byte) row["MediaAutoScale"];
|
newData.MediaAutoScale = (Byte) row["MediaAutoScale"];
|
||||||
newData.mediaID = new LLUUID((String) row["MediaTextureUUID"]);
|
newData.MediaID = new LLUUID((String) row["MediaTextureUUID"]);
|
||||||
newData.mediaURL = (String) row["MediaURL"];
|
newData.MediaURL = (String) row["MediaURL"];
|
||||||
newData.musicURL = (String) row["MusicURL"];
|
newData.MusicURL = (String) row["MusicURL"];
|
||||||
newData.passHours = Convert.ToSingle(row["PassHours"]);
|
newData.PassHours = Convert.ToSingle(row["PassHours"]);
|
||||||
newData.passPrice = Convert.ToInt32(row["PassPrice"]);
|
newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
|
||||||
newData.snapshotID = (String) row["SnapshotUUID"];
|
newData.SnapshotID = (String) row["SnapshotUUID"];
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
newData.userLocation =
|
newData.UserLocation =
|
||||||
new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
|
new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
|
||||||
Convert.ToSingle(row["UserLocationZ"]));
|
Convert.ToSingle(row["UserLocationZ"]));
|
||||||
newData.userLookAt =
|
newData.UserLookAt =
|
||||||
new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
|
new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
|
||||||
Convert.ToSingle(row["UserLookAtZ"]));
|
Convert.ToSingle(row["UserLookAtZ"]));
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (InvalidCastException)
|
catch (InvalidCastException)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.landName);
|
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
|
||||||
newData.userLocation = LLVector3.Zero;
|
newData.UserLocation = LLVector3.Zero;
|
||||||
newData.userLookAt = LLVector3.Zero;
|
newData.UserLookAt = LLVector3.Zero;
|
||||||
}
|
}
|
||||||
newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
|
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
|
||||||
LLUUID authBuyerID = LLUUID.Zero;
|
LLUUID authBuyerID = LLUUID.Zero;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -1270,41 +1270,41 @@ namespace OpenSim.Data.SQLite
|
||||||
/// <param name="regionUUID"></param>
|
/// <param name="regionUUID"></param>
|
||||||
private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
|
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["RegionUUID"] = Util.ToRawUuidString(regionUUID);
|
||||||
row["LocalLandID"] = land.localID;
|
row["LocalLandID"] = land.LocalID;
|
||||||
|
|
||||||
// Bitmap is a byte[512]
|
// Bitmap is a byte[512]
|
||||||
row["Bitmap"] = land.landBitmapByteArray;
|
row["Bitmap"] = land.Bitmap;
|
||||||
|
|
||||||
row["Name"] = land.landName;
|
row["Name"] = land.Name;
|
||||||
row["Desc"] = land.landDesc;
|
row["Desc"] = land.Description;
|
||||||
row["OwnerUUID"] = Util.ToRawUuidString(land.ownerID);
|
row["OwnerUUID"] = Util.ToRawUuidString(land.OwnerID);
|
||||||
row["IsGroupOwned"] = land.isGroupOwned;
|
row["IsGroupOwned"] = land.IsGroupOwned;
|
||||||
row["Area"] = land.area;
|
row["Area"] = land.Area;
|
||||||
row["AuctionID"] = land.auctionID; //Unemplemented
|
row["AuctionID"] = land.AuctionID; //Unemplemented
|
||||||
row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory
|
row["Category"] = land.Category; //Enum libsecondlife.Parcel.ParcelCategory
|
||||||
row["ClaimDate"] = land.claimDate;
|
row["ClaimDate"] = land.ClaimDate;
|
||||||
row["ClaimPrice"] = land.claimPrice;
|
row["ClaimPrice"] = land.ClaimPrice;
|
||||||
row["GroupUUID"] = Util.ToRawUuidString(land.groupID);
|
row["GroupUUID"] = Util.ToRawUuidString(land.GroupID);
|
||||||
row["SalePrice"] = land.salePrice;
|
row["SalePrice"] = land.SalePrice;
|
||||||
row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus
|
row["LandStatus"] = land.Status; //Enum. libsecondlife.Parcel.ParcelStatus
|
||||||
row["LandFlags"] = land.landFlags;
|
row["LandFlags"] = land.Flags;
|
||||||
row["LandingType"] = land.landingType;
|
row["LandingType"] = land.LandingType;
|
||||||
row["MediaAutoScale"] = land.mediaAutoScale;
|
row["MediaAutoScale"] = land.MediaAutoScale;
|
||||||
row["MediaTextureUUID"] = Util.ToRawUuidString(land.mediaID);
|
row["MediaTextureUUID"] = Util.ToRawUuidString(land.MediaID);
|
||||||
row["MediaURL"] = land.mediaURL;
|
row["MediaURL"] = land.MediaURL;
|
||||||
row["MusicURL"] = land.musicURL;
|
row["MusicURL"] = land.MusicURL;
|
||||||
row["PassHours"] = land.passHours;
|
row["PassHours"] = land.PassHours;
|
||||||
row["PassPrice"] = land.passPrice;
|
row["PassPrice"] = land.PassPrice;
|
||||||
row["SnapshotUUID"] = Util.ToRawUuidString(land.snapshotID);
|
row["SnapshotUUID"] = Util.ToRawUuidString(land.SnapshotID);
|
||||||
row["UserLocationX"] = land.userLocation.X;
|
row["UserLocationX"] = land.UserLocation.X;
|
||||||
row["UserLocationY"] = land.userLocation.Y;
|
row["UserLocationY"] = land.UserLocation.Y;
|
||||||
row["UserLocationZ"] = land.userLocation.Z;
|
row["UserLocationZ"] = land.UserLocation.Z;
|
||||||
row["UserLookAtX"] = land.userLookAt.X;
|
row["UserLookAtX"] = land.UserLookAt.X;
|
||||||
row["UserLookAtY"] = land.userLookAt.Y;
|
row["UserLookAtY"] = land.UserLookAt.Y;
|
||||||
row["UserLookAtZ"] = land.userLookAt.Z;
|
row["UserLookAtZ"] = land.UserLookAt.Z;
|
||||||
row["AuthbuyerID"] = Util.ToRawUuidString(land.authBuyerID);
|
row["AuthbuyerID"] = Util.ToRawUuidString(land.AuthBuyerID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -33,103 +33,427 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public class LandData
|
public class LandData
|
||||||
{
|
{
|
||||||
public LLVector3 AABBMax = new LLVector3();
|
public LLVector3 _AABBMax = new LLVector3();
|
||||||
public LLVector3 AABBMin = new LLVector3();
|
public LLVector3 _AABBMin = new LLVector3();
|
||||||
public int area = 0;
|
public int _area = 0;
|
||||||
public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned
|
public uint _auctionID = 0; //Unemplemented. If set to 0, not being auctioned
|
||||||
public LLUUID authBuyerID = LLUUID.Zero; //Unemplemented. Authorized Buyer's UUID
|
public LLUUID _authBuyerID = LLUUID.Zero; //Unemplemented. Authorized Buyer's UUID
|
||||||
public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category
|
public Parcel.ParcelCategory _category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category
|
||||||
public int claimDate = 0;
|
public int _claimDate = 0;
|
||||||
public int claimPrice = 0; //Unemplemented
|
public int _claimPrice = 0; //Unemplemented
|
||||||
public LLUUID globalID = LLUUID.Zero;
|
public LLUUID _globalID = LLUUID.Zero;
|
||||||
public LLUUID groupID = LLUUID.Zero; //Unemplemented
|
public LLUUID _groupID = LLUUID.Zero; //Unemplemented
|
||||||
public int groupPrims = 0;
|
public int _groupPrims = 0;
|
||||||
public bool isGroupOwned = false;
|
public bool _isGroupOwned = false;
|
||||||
public byte[] landBitmapByteArray = new byte[512];
|
public byte[] _bitmap = new byte[512];
|
||||||
public string landDesc = String.Empty;
|
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.AllowAllObjectEntry |
|
||||||
(uint) Parcel.ParcelFlags.AllowDeedToGroup | (uint) Parcel.ParcelFlags.AllowTerraform |
|
(uint) Parcel.ParcelFlags.AllowDeedToGroup | (uint) Parcel.ParcelFlags.AllowTerraform |
|
||||||
(uint) Parcel.ParcelFlags.CreateObjects | (uint) Parcel.ParcelFlags.AllowOtherScripts |
|
(uint) Parcel.ParcelFlags.CreateObjects | (uint) Parcel.ParcelFlags.AllowOtherScripts |
|
||||||
(uint) Parcel.ParcelFlags.SoundLocal;
|
(uint) Parcel.ParcelFlags.SoundLocal;
|
||||||
|
|
||||||
public byte landingType = 0;
|
public byte _landingType = 0;
|
||||||
public string landName = "Your Parcel";
|
public string _name = "Your Parcel";
|
||||||
public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased;
|
public Parcel.ParcelStatus _status = Parcel.ParcelStatus.Leased;
|
||||||
public int localID = 0;
|
public int _localID = 0;
|
||||||
public byte mediaAutoScale = 0;
|
public byte _mediaAutoScale = 0;
|
||||||
public LLUUID mediaID = LLUUID.Zero;
|
public LLUUID _mediaID = LLUUID.Zero;
|
||||||
|
|
||||||
public string mediaURL = String.Empty;
|
public string _mediaURL = String.Empty;
|
||||||
public string musicURL = String.Empty;
|
public string _musicURL = String.Empty;
|
||||||
public int otherPrims = 0;
|
public int _otherPrims = 0;
|
||||||
public LLUUID ownerID = LLUUID.Zero;
|
public LLUUID _ownerID = LLUUID.Zero;
|
||||||
public int ownerPrims = 0;
|
public int _ownerPrims = 0;
|
||||||
public List<ParcelManager.ParcelAccessEntry> parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
|
public List<ParcelManager.ParcelAccessEntry> _parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
|
||||||
public float passHours = 0;
|
public float _passHours = 0;
|
||||||
public int passPrice = 0;
|
public int _passPrice = 0;
|
||||||
public int salePrice = 0; //Unemeplemented. Parcels price.
|
public int _salePrice = 0; //Unemeplemented. Parcels price.
|
||||||
public int selectedPrims = 0;
|
public int _selectedPrims = 0;
|
||||||
public int simwideArea = 0;
|
public int _simwideArea = 0;
|
||||||
public int simwidePrims = 0;
|
public int _simwidePrims = 0;
|
||||||
public LLUUID snapshotID = LLUUID.Zero;
|
public LLUUID _snapshotID = LLUUID.Zero;
|
||||||
public LLVector3 userLocation = new LLVector3();
|
public LLVector3 _userLocation = new LLVector3();
|
||||||
public LLVector3 userLookAt = 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()
|
public LandData()
|
||||||
{
|
{
|
||||||
globalID = LLUUID.Random();
|
_globalID = LLUUID.Random();
|
||||||
}
|
}
|
||||||
|
|
||||||
public LandData Copy()
|
public LandData Copy()
|
||||||
{
|
{
|
||||||
LandData landData = new LandData();
|
LandData landData = new LandData();
|
||||||
|
|
||||||
landData.AABBMax = AABBMax;
|
landData._AABBMax = _AABBMax;
|
||||||
landData.AABBMin = AABBMin;
|
landData._AABBMin = _AABBMin;
|
||||||
landData.area = area;
|
landData._area = _area;
|
||||||
landData.auctionID = auctionID;
|
landData._auctionID = _auctionID;
|
||||||
landData.authBuyerID = authBuyerID;
|
landData._authBuyerID = _authBuyerID;
|
||||||
landData.category = category;
|
landData._category = _category;
|
||||||
landData.claimDate = claimDate;
|
landData._claimDate = _claimDate;
|
||||||
landData.claimPrice = claimPrice;
|
landData._claimPrice = _claimPrice;
|
||||||
landData.globalID = globalID;
|
landData._globalID = _globalID;
|
||||||
landData.groupID = groupID;
|
landData._groupID = _groupID;
|
||||||
landData.groupPrims = groupPrims;
|
landData._groupPrims = _groupPrims;
|
||||||
landData.otherPrims = otherPrims;
|
landData._otherPrims = _otherPrims;
|
||||||
landData.ownerPrims = ownerPrims;
|
landData._ownerPrims = _ownerPrims;
|
||||||
landData.selectedPrims = selectedPrims;
|
landData._selectedPrims = _selectedPrims;
|
||||||
landData.isGroupOwned = isGroupOwned;
|
landData._isGroupOwned = _isGroupOwned;
|
||||||
landData.localID = localID;
|
landData._localID = _localID;
|
||||||
landData.landingType = landingType;
|
landData._landingType = _landingType;
|
||||||
landData.mediaAutoScale = mediaAutoScale;
|
landData._mediaAutoScale = _mediaAutoScale;
|
||||||
landData.mediaID = mediaID;
|
landData._mediaID = _mediaID;
|
||||||
landData.mediaURL = mediaURL;
|
landData._mediaURL = _mediaURL;
|
||||||
landData.musicURL = musicURL;
|
landData._musicURL = _musicURL;
|
||||||
landData.ownerID = ownerID;
|
landData._ownerID = _ownerID;
|
||||||
landData.landBitmapByteArray = (byte[]) landBitmapByteArray.Clone();
|
landData._bitmap = (byte[]) _bitmap.Clone();
|
||||||
landData.landDesc = landDesc;
|
landData._description = _description;
|
||||||
landData.landFlags = landFlags;
|
landData._flags = _flags;
|
||||||
landData.landName = landName;
|
landData._name = _name;
|
||||||
landData.landStatus = landStatus;
|
landData._status = _status;
|
||||||
landData.passHours = passHours;
|
landData._passHours = _passHours;
|
||||||
landData.passPrice = passPrice;
|
landData._passPrice = _passPrice;
|
||||||
landData.salePrice = salePrice;
|
landData._salePrice = _salePrice;
|
||||||
landData.snapshotID = snapshotID;
|
landData._snapshotID = _snapshotID;
|
||||||
landData.userLocation = userLocation;
|
landData._userLocation = _userLocation;
|
||||||
landData.userLookAt = userLookAt;
|
landData._userLookAt = _userLookAt;
|
||||||
|
|
||||||
landData.parcelAccessList.Clear();
|
landData._parcelAccessList.Clear();
|
||||||
foreach (ParcelManager.ParcelAccessEntry entry in parcelAccessList)
|
foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList)
|
||||||
{
|
{
|
||||||
ParcelManager.ParcelAccessEntry newEntry = new ParcelManager.ParcelAccessEntry();
|
ParcelManager.ParcelAccessEntry newEntry = new ParcelManager.ParcelAccessEntry();
|
||||||
newEntry.AgentID = entry.AgentID;
|
newEntry.AgentID = entry.AgentID;
|
||||||
newEntry.Flags = entry.Flags;
|
newEntry.Flags = entry.Flags;
|
||||||
newEntry.Time = entry.Time;
|
newEntry.Time = entry.Time;
|
||||||
|
|
||||||
landData.parcelAccessList.Add(newEntry);
|
landData._parcelAccessList.Add(newEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
return landData;
|
return landData;
|
||||||
|
|
|
@ -2703,22 +2703,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
updatePacket.ParcelData.AABBMax = landData.AABBMax;
|
updatePacket.ParcelData.AABBMax = landData.AABBMax;
|
||||||
updatePacket.ParcelData.AABBMin = landData.AABBMin;
|
updatePacket.ParcelData.AABBMin = landData.AABBMin;
|
||||||
updatePacket.ParcelData.Area = landData.area;
|
updatePacket.ParcelData.Area = landData.Area;
|
||||||
updatePacket.ParcelData.AuctionID = landData.auctionID;
|
updatePacket.ParcelData.AuctionID = landData.AuctionID;
|
||||||
updatePacket.ParcelData.AuthBuyerID = landData.authBuyerID; //unemplemented
|
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.Desc = Helpers.StringToField(landData.Description);
|
||||||
updatePacket.ParcelData.Category = (byte)landData.category;
|
updatePacket.ParcelData.Category = (byte)landData.Category;
|
||||||
updatePacket.ParcelData.ClaimDate = landData.claimDate;
|
updatePacket.ParcelData.ClaimDate = landData.ClaimDate;
|
||||||
updatePacket.ParcelData.ClaimPrice = landData.claimPrice;
|
updatePacket.ParcelData.ClaimPrice = landData.ClaimPrice;
|
||||||
updatePacket.ParcelData.GroupID = landData.groupID;
|
updatePacket.ParcelData.GroupID = landData.GroupID;
|
||||||
updatePacket.ParcelData.GroupPrims = landData.groupPrims;
|
updatePacket.ParcelData.GroupPrims = landData.GroupPrims;
|
||||||
updatePacket.ParcelData.IsGroupOwned = landData.isGroupOwned;
|
updatePacket.ParcelData.IsGroupOwned = landData.IsGroupOwned;
|
||||||
updatePacket.ParcelData.LandingType = (byte)landData.landingType;
|
updatePacket.ParcelData.LandingType = (byte)landData.LandingType;
|
||||||
updatePacket.ParcelData.LocalID = landData.localID;
|
updatePacket.ParcelData.LocalID = landData.LocalID;
|
||||||
if (landData.area > 0)
|
if (landData.Area > 0)
|
||||||
{
|
{
|
||||||
updatePacket.ParcelData.MaxPrims = parcelObjectCapacity;
|
updatePacket.ParcelData.MaxPrims = parcelObjectCapacity;
|
||||||
}
|
}
|
||||||
|
@ -2726,20 +2726,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
updatePacket.ParcelData.MaxPrims = 0;
|
updatePacket.ParcelData.MaxPrims = 0;
|
||||||
}
|
}
|
||||||
updatePacket.ParcelData.MediaAutoScale = landData.mediaAutoScale;
|
updatePacket.ParcelData.MediaAutoScale = landData.MediaAutoScale;
|
||||||
updatePacket.ParcelData.MediaID = landData.mediaID;
|
updatePacket.ParcelData.MediaID = landData.MediaID;
|
||||||
updatePacket.ParcelData.MediaURL = Helpers.StringToField(landData.mediaURL);
|
updatePacket.ParcelData.MediaURL = Helpers.StringToField(landData.MediaURL);
|
||||||
updatePacket.ParcelData.MusicURL = Helpers.StringToField(landData.musicURL);
|
updatePacket.ParcelData.MusicURL = Helpers.StringToField(landData.MusicURL);
|
||||||
updatePacket.ParcelData.Name = Helpers.StringToField(landData.landName);
|
updatePacket.ParcelData.Name = Helpers.StringToField(landData.Name);
|
||||||
updatePacket.ParcelData.OtherCleanTime = 0; //unemplemented
|
updatePacket.ParcelData.OtherCleanTime = 0; //unemplemented
|
||||||
updatePacket.ParcelData.OtherCount = 0; //unemplemented
|
updatePacket.ParcelData.OtherCount = 0; //unemplemented
|
||||||
updatePacket.ParcelData.OtherPrims = landData.otherPrims;
|
updatePacket.ParcelData.OtherPrims = landData.OtherPrims;
|
||||||
updatePacket.ParcelData.OwnerID = landData.ownerID;
|
updatePacket.ParcelData.OwnerID = landData.OwnerID;
|
||||||
updatePacket.ParcelData.OwnerPrims = landData.ownerPrims;
|
updatePacket.ParcelData.OwnerPrims = landData.OwnerPrims;
|
||||||
updatePacket.ParcelData.ParcelFlags = landData.landFlags;
|
updatePacket.ParcelData.ParcelFlags = landData.Flags;
|
||||||
updatePacket.ParcelData.ParcelPrimBonus = simObjectBonusFactor;
|
updatePacket.ParcelData.ParcelPrimBonus = simObjectBonusFactor;
|
||||||
updatePacket.ParcelData.PassHours = landData.passHours;
|
updatePacket.ParcelData.PassHours = landData.PassHours;
|
||||||
updatePacket.ParcelData.PassPrice = landData.passPrice;
|
updatePacket.ParcelData.PassPrice = landData.PassPrice;
|
||||||
updatePacket.ParcelData.PublicCount = 0; //unemplemented
|
updatePacket.ParcelData.PublicCount = 0; //unemplemented
|
||||||
|
|
||||||
updatePacket.ParcelData.RegionDenyAnonymous = ((regionFlags & (uint)Simulator.RegionFlags.DenyAnonymous) >
|
updatePacket.ParcelData.RegionDenyAnonymous = ((regionFlags & (uint)Simulator.RegionFlags.DenyAnonymous) >
|
||||||
|
@ -2753,11 +2753,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
updatePacket.ParcelData.RentPrice = 0;
|
updatePacket.ParcelData.RentPrice = 0;
|
||||||
updatePacket.ParcelData.RequestResult = request_result;
|
updatePacket.ParcelData.RequestResult = request_result;
|
||||||
updatePacket.ParcelData.SalePrice = landData.salePrice;
|
updatePacket.ParcelData.SalePrice = landData.SalePrice;
|
||||||
updatePacket.ParcelData.SelectedPrims = landData.selectedPrims;
|
updatePacket.ParcelData.SelectedPrims = landData.SelectedPrims;
|
||||||
updatePacket.ParcelData.SelfCount = 0; //unemplemented
|
updatePacket.ParcelData.SelfCount = 0; //unemplemented
|
||||||
updatePacket.ParcelData.SequenceID = sequence_id;
|
updatePacket.ParcelData.SequenceID = sequence_id;
|
||||||
if (landData.simwideArea > 0)
|
if (landData.SimwideArea > 0)
|
||||||
{
|
{
|
||||||
updatePacket.ParcelData.SimWideMaxPrims = parcelObjectCapacity;
|
updatePacket.ParcelData.SimWideMaxPrims = parcelObjectCapacity;
|
||||||
}
|
}
|
||||||
|
@ -2765,14 +2765,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
updatePacket.ParcelData.SimWideMaxPrims = 0;
|
updatePacket.ParcelData.SimWideMaxPrims = 0;
|
||||||
}
|
}
|
||||||
updatePacket.ParcelData.SimWideTotalPrims = landData.simwidePrims;
|
updatePacket.ParcelData.SimWideTotalPrims = landData.SimwidePrims;
|
||||||
updatePacket.ParcelData.SnapSelection = snap_selection;
|
updatePacket.ParcelData.SnapSelection = snap_selection;
|
||||||
updatePacket.ParcelData.SnapshotID = landData.snapshotID;
|
updatePacket.ParcelData.SnapshotID = landData.SnapshotID;
|
||||||
updatePacket.ParcelData.Status = (byte)landData.landStatus;
|
updatePacket.ParcelData.Status = (byte)landData.Status;
|
||||||
updatePacket.ParcelData.TotalPrims = landData.ownerPrims + landData.groupPrims + landData.otherPrims +
|
updatePacket.ParcelData.TotalPrims = landData.OwnerPrims + landData.GroupPrims + landData.OtherPrims +
|
||||||
landData.selectedPrims;
|
landData.SelectedPrims;
|
||||||
updatePacket.ParcelData.UserLocation = landData.userLocation;
|
updatePacket.ParcelData.UserLocation = landData.UserLocation;
|
||||||
updatePacket.ParcelData.UserLookAt = landData.userLookAt;
|
updatePacket.ParcelData.UserLookAt = landData.UserLookAt;
|
||||||
updatePacket.Header.Zerocoded = true;
|
updatePacket.Header.Zerocoded = true;
|
||||||
remote_client.OutPacket((Packet)updatePacket, ThrottleOutPacketType.Task);
|
remote_client.OutPacket((Packet)updatePacket, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
||||||
foreach (LandObject land in landList.Values)
|
foreach (LandObject land in landList.Values)
|
||||||
{
|
{
|
||||||
LandData parcel = land.landData;
|
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
|
//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");
|
XmlAttribute scripts_attr = nodeFactory.CreateAttribute("scripts");
|
||||||
scripts_attr.Value = GetScriptsPermissions(parcel);
|
scripts_attr.Value = GetScriptsPermissions(parcel);
|
||||||
XmlAttribute category_attr = nodeFactory.CreateAttribute("category");
|
XmlAttribute category_attr = nodeFactory.CreateAttribute("category");
|
||||||
category_attr.Value = parcel.category.ToString();
|
category_attr.Value = parcel.Category.ToString();
|
||||||
//XmlAttribute entities_attr = nodeFactory.CreateAttribute("entities");
|
//XmlAttribute entities_attr = nodeFactory.CreateAttribute("entities");
|
||||||
//entities_attr.Value = land.primsOverMe.Count.ToString();
|
//entities_attr.Value = land.primsOverMe.Count.ToString();
|
||||||
xmlparcel.Attributes.Append(scripts_attr);
|
xmlparcel.Attributes.Append(scripts_attr);
|
||||||
|
@ -162,24 +162,24 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
||||||
|
|
||||||
//name, description, area, and UUID
|
//name, description, area, and UUID
|
||||||
XmlNode name = nodeFactory.CreateNode(XmlNodeType.Element, "name", "");
|
XmlNode name = nodeFactory.CreateNode(XmlNodeType.Element, "name", "");
|
||||||
name.InnerText = parcel.landName;
|
name.InnerText = parcel.Name;
|
||||||
xmlparcel.AppendChild(name);
|
xmlparcel.AppendChild(name);
|
||||||
|
|
||||||
XmlNode desc = nodeFactory.CreateNode(XmlNodeType.Element, "description", "");
|
XmlNode desc = nodeFactory.CreateNode(XmlNodeType.Element, "description", "");
|
||||||
desc.InnerText = parcel.landDesc;
|
desc.InnerText = parcel.Description;
|
||||||
xmlparcel.AppendChild(desc);
|
xmlparcel.AppendChild(desc);
|
||||||
|
|
||||||
XmlNode uuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", "");
|
XmlNode uuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", "");
|
||||||
uuid.InnerText = parcel.globalID.ToString();
|
uuid.InnerText = parcel.GlobalID.ToString();
|
||||||
xmlparcel.AppendChild(uuid);
|
xmlparcel.AppendChild(uuid);
|
||||||
|
|
||||||
XmlNode area = nodeFactory.CreateNode(XmlNodeType.Element, "area", "");
|
XmlNode area = nodeFactory.CreateNode(XmlNodeType.Element, "area", "");
|
||||||
area.InnerText = parcel.area.ToString();
|
area.InnerText = parcel.Area.ToString();
|
||||||
xmlparcel.AppendChild(area);
|
xmlparcel.AppendChild(area);
|
||||||
|
|
||||||
//default location
|
//default location
|
||||||
XmlNode tpLocation = nodeFactory.CreateNode(XmlNodeType.Element, "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
|
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);
|
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();
|
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
|
//TODO: figure how to figure out teleport system landData.landingType
|
||||||
|
|
||||||
//land texture snapshot uuid
|
//land texture snapshot uuid
|
||||||
if (parcel.snapshotID != LLUUID.Zero)
|
if (parcel.SnapshotID != LLUUID.Zero)
|
||||||
{
|
{
|
||||||
XmlNode textureuuid = nodeFactory.CreateNode(XmlNodeType.Element, "image", "");
|
XmlNode textureuuid = nodeFactory.CreateNode(XmlNodeType.Element, "image", "");
|
||||||
textureuuid.InnerText = parcel.snapshotID.ToString();
|
textureuuid.InnerText = parcel.SnapshotID.ToString();
|
||||||
xmlparcel.AppendChild(textureuuid);
|
xmlparcel.AppendChild(textureuuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
//attached user and group
|
//attached user and group
|
||||||
if (parcel.groupID != LLUUID.Zero)
|
if (parcel.GroupID != LLUUID.Zero)
|
||||||
{
|
{
|
||||||
XmlNode groupblock = nodeFactory.CreateNode(XmlNodeType.Element, "group", "");
|
XmlNode groupblock = nodeFactory.CreateNode(XmlNodeType.Element, "group", "");
|
||||||
XmlNode groupuuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", "");
|
XmlNode groupuuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", "");
|
||||||
groupuuid.InnerText = parcel.groupID.ToString();
|
groupuuid.InnerText = parcel.GroupID.ToString();
|
||||||
groupblock.AppendChild(groupuuid);
|
groupblock.AppendChild(groupuuid);
|
||||||
|
|
||||||
//No name yet, there's no way to get a group name since they don't exist yet.
|
//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);
|
xmlparcel.AppendChild(groupblock);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!parcel.isGroupOwned)
|
if (!parcel.IsGroupOwned)
|
||||||
{
|
{
|
||||||
XmlNode userblock = nodeFactory.CreateNode(XmlNodeType.Element, "owner", "");
|
XmlNode userblock = nodeFactory.CreateNode(XmlNodeType.Element, "owner", "");
|
||||||
|
|
||||||
LLUUID userOwnerUUID = parcel.ownerID;
|
LLUUID userOwnerUUID = parcel.OwnerID;
|
||||||
|
|
||||||
XmlNode useruuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", "");
|
XmlNode useruuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", "");
|
||||||
useruuid.InnerText = userOwnerUUID.ToString();
|
useruuid.InnerText = userOwnerUUID.ToString();
|
||||||
|
@ -278,7 +278,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
||||||
|
|
||||||
private string GetScriptsPermissions(LandData parcel)
|
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";
|
return "yes";
|
||||||
else
|
else
|
||||||
return "no";
|
return "no";
|
||||||
|
|
|
@ -1423,7 +1423,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
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.landFlags & (uint)Parcel.ParcelFlags.AllowDamage) != 0)
|
if ((obj.landData.Flags & (uint)Parcel.ParcelFlags.AllowDamage) != 0)
|
||||||
{
|
{
|
||||||
avatar.Invulnerable = false;
|
avatar.Invulnerable = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,7 +178,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
|
||||||
LandData land = m_scene.GetLandData(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
LandData land = m_scene.GetLandData(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
||||||
|
|
||||||
LLSDParcelVoiceInfoResponse parcelVoiceInfo =
|
LLSDParcelVoiceInfoResponse parcelVoiceInfo =
|
||||||
new LLSDParcelVoiceInfoResponse(regionName, land.localID, creds);
|
new LLSDParcelVoiceInfoResponse(regionName, land.LocalID, creds);
|
||||||
|
|
||||||
string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo);
|
string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo);
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
|
||||||
LandData land = m_scene.GetLandData(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
LandData land = m_scene.GetLandData(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
||||||
|
|
||||||
LLSDParcelVoiceInfoResponse parcelVoiceInfo =
|
LLSDParcelVoiceInfoResponse parcelVoiceInfo =
|
||||||
new LLSDParcelVoiceInfoResponse(regionName, land.localID, creds);
|
new LLSDParcelVoiceInfoResponse(regionName, land.LocalID, creds);
|
||||||
|
|
||||||
string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo);
|
string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo);
|
||||||
m_log.DebugFormat("[VOICE][PARCELVOICE]: {0}", r);
|
m_log.DebugFormat("[VOICE][PARCELVOICE]: {0}", r);
|
||||||
|
|
|
@ -89,7 +89,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
return m_landManagementModule.GetLandObject(x_float, y_float);
|
return m_landManagementModule.GetLandObject(x_float, y_float);
|
||||||
}
|
}
|
||||||
ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene);
|
ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene);
|
||||||
obj.landData.landName = "NO LAND";
|
obj.landData.Name = "NO LAND";
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
return m_landManagementModule.GetLandObject(x, y);
|
return m_landManagementModule.GetLandObject(x, y);
|
||||||
}
|
}
|
||||||
ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene);
|
ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene);
|
||||||
obj.landData.landName = "NO LAND";
|
obj.landData.Name = "NO LAND";
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -162,8 +162,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
ILandObject fullSimParcel = new LandObject(LLUUID.Zero, false, m_scene);
|
ILandObject fullSimParcel = new LandObject(LLUUID.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));
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,18 +279,18 @@ namespace OpenSim.Region.Environment.Modules.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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -316,7 +316,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
|
if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
|
||||||
clientAvatar.sentMessageAboutRestrictedParcelFlyingDown)
|
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!
|
//They are going below the safety line!
|
||||||
if (!parcel.isBannedFromLand(clientAvatar.UUID))
|
if (!parcel.isBannedFromLand(clientAvatar.UUID))
|
||||||
{
|
{
|
||||||
|
@ -362,7 +362,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
{
|
{
|
||||||
if (landList.ContainsKey(landLocalID))
|
if (landList.ContainsKey(landLocalID))
|
||||||
{
|
{
|
||||||
if (agentID == landList[landLocalID].landData.ownerID)
|
if (agentID == landList[landLocalID].landData.OwnerID)
|
||||||
{
|
{
|
||||||
landList[landLocalID].updateAccessList(flags, entries, remote_client);
|
landList[landLocalID].updateAccessList(flags, entries, remote_client);
|
||||||
}
|
}
|
||||||
|
@ -388,7 +388,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
public ILandObject AddLandObject(ILandObject new_land)
|
public ILandObject AddLandObject(ILandObject new_land)
|
||||||
{
|
{
|
||||||
lastLandLocalID++;
|
lastLandLocalID++;
|
||||||
new_land.landData.localID = lastLandLocalID;
|
new_land.landData.LocalID = lastLandLocalID;
|
||||||
landList.Add(lastLandLocalID, new_land.Copy());
|
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);
|
landList.Remove(local_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,13 +445,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
{
|
{
|
||||||
if (landBitmapSlave[x, y])
|
if (landBitmapSlave[x, y])
|
||||||
{
|
{
|
||||||
landIDList[x, y] = master.landData.localID;
|
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)
|
||||||
|
@ -550,15 +550,15 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
Dictionary<LLUUID, List<LandObject>> landOwnersAndParcels = new Dictionary<LLUUID, List<LandObject>>();
|
Dictionary<LLUUID, List<LandObject>> landOwnersAndParcels = new Dictionary<LLUUID, List<LandObject>>();
|
||||||
foreach (LandObject p in landList.Values)
|
foreach (LandObject p in 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -568,15 +568,15 @@ namespace OpenSim.Region.Environment.Modules.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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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)
|
//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.landName = "Subdivision of " + newLand.landData.landName;
|
newLand.landData.Name = "Subdivision of " + newLand.landData.Name;
|
||||||
newLand.landData.globalID = LLUUID.Random();
|
newLand.landData.GlobalID = LLUUID.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;
|
||||||
landList[startLandObjectIndex].setLandBitmap(
|
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));
|
||||||
landList[startLandObjectIndex].forceUpdateLandInfo();
|
landList[startLandObjectIndex].forceUpdateLandInfo();
|
||||||
|
@ -673,7 +673,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
|
|
||||||
//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();
|
||||||
|
|
||||||
|
|
||||||
|
@ -726,14 +726,14 @@ namespace OpenSim.Region.Environment.Modules.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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach (ILandObject slaveLandObject in selectedLandObjects)
|
foreach (ILandObject slaveLandObject in selectedLandObjects)
|
||||||
{
|
{
|
||||||
landList[masterLandObject.landData.localID].setLandBitmap(
|
landList[masterLandObject.landData.LocalID].setLandBitmap(
|
||||||
slaveLandObject.mergeLandBitmaps(masterLandObject.getLandBitmap(), slaveLandObject.getLandBitmap()));
|
slaveLandObject.mergeLandBitmaps(masterLandObject.getLandBitmap(), slaveLandObject.getLandBitmap()));
|
||||||
performFinalLandJoin(masterLandObject, slaveLandObject);
|
performFinalLandJoin(masterLandObject, slaveLandObject);
|
||||||
}
|
}
|
||||||
|
@ -775,19 +775,19 @@ namespace OpenSim.Region.Environment.Modules.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 == LLUUID.Zero ||
|
(currentParcelBlock.landData.AuthBuyerID == LLUUID.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 == LLUUID.Zero)
|
else if (currentParcelBlock.landData.OwnerID == LLUUID.Zero)
|
||||||
{
|
{
|
||||||
//Public Flag
|
//Public Flag
|
||||||
tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC);
|
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]))
|
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);
|
m_scene.Broadcast(SendParcelOverlay);
|
||||||
landList[local_id].sendLandUpdateToClient(remote_client);
|
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]))
|
if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id]))
|
||||||
{
|
{
|
||||||
landList[local_id].landData.ownerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||||
landList[local_id].landData.claimDate = Util.UnixTimeSinceEpoch();
|
landList[local_id].landData.ClaimDate = Util.UnixTimeSinceEpoch();
|
||||||
m_scene.Broadcast(SendParcelOverlay);
|
m_scene.Broadcast(SendParcelOverlay);
|
||||||
landList[local_id].sendLandUpdateToClient(remote_client);
|
landList[local_id].sendLandUpdateToClient(remote_client);
|
||||||
}
|
}
|
||||||
|
@ -992,11 +992,11 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
}
|
}
|
||||||
if (lob != null)
|
if (lob != null)
|
||||||
{
|
{
|
||||||
LLUUID AuthorizedID = lob.landData.authBuyerID;
|
LLUUID AuthorizedID = lob.landData.AuthBuyerID;
|
||||||
int saleprice = lob.landData.salePrice;
|
int saleprice = lob.landData.SalePrice;
|
||||||
LLUUID pOwnerID = lob.landData.ownerID;
|
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);
|
(uint)(Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects)) != 0);
|
||||||
if ((AuthorizedID == LLUUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale)
|
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)
|
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);
|
||||||
|
|
|
@ -77,8 +77,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
public LandObject(LLUUID owner_id, bool is_group_owned, Scene scene)
|
public LandObject(LLUUID 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
|
||||||
|
@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Modules.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());
|
||||||
|
@ -139,7 +139,7 @@ namespace OpenSim.Region.Environment.Modules.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))); ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -165,9 +165,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
uint regionFlags = 336723974 & ~((uint)(Simulator.RegionFlags.AllowLandmark | Simulator.RegionFlags.AllowSetHome));
|
uint regionFlags = 336723974 & ~((uint)(Simulator.RegionFlags.AllowLandmark | Simulator.RegionFlags.AllowSetHome));
|
||||||
if (estateModule != null)
|
if (estateModule != null)
|
||||||
regionFlags = estateModule.GetRegionFlags();
|
regionFlags = estateModule.GetRegionFlags();
|
||||||
if ((landData.landFlags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0)
|
if ((landData.Flags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0)
|
||||||
regionFlags |= (uint)Simulator.RegionFlags.AllowLandmark;
|
regionFlags |= (uint)Simulator.RegionFlags.AllowLandmark;
|
||||||
if (landData.ownerID == remote_client.AgentId)
|
if (landData.OwnerID == remote_client.AgentId)
|
||||||
regionFlags |= (uint)Simulator.RegionFlags.AllowSetHome;
|
regionFlags |= (uint)Simulator.RegionFlags.AllowSetHome;
|
||||||
remote_client.SendLandProperties(remote_client, sequence_id,
|
remote_client.SendLandProperties(remote_client, sequence_id,
|
||||||
snap_selection, request_result, landData,
|
snap_selection, request_result, landData,
|
||||||
|
@ -183,31 +183,31 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
//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)
|
||||||
{
|
{
|
||||||
if (m_scene.ExternalChecks.ExternalChecksCanSellParcel(remote_client.AgentId, this))
|
if (m_scene.ExternalChecks.ExternalChecksCanSellParcel(remote_client.AgentId, this))
|
||||||
{
|
{
|
||||||
newData.authBuyerID = args.AuthBuyerID;
|
newData.AuthBuyerID = args.AuthBuyerID;
|
||||||
newData.salePrice = args.SalePrice;
|
newData.SalePrice = args.SalePrice;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newData.category = args.Category;
|
newData.Category = args.Category;
|
||||||
newData.landDesc = args.Desc;
|
newData.Description = args.Desc;
|
||||||
newData.groupID = args.GroupID;
|
newData.GroupID = args.GroupID;
|
||||||
newData.landingType = args.LandingType;
|
newData.LandingType = args.LandingType;
|
||||||
newData.mediaAutoScale = args.MediaAutoScale;
|
newData.MediaAutoScale = args.MediaAutoScale;
|
||||||
newData.mediaID = args.MediaID;
|
newData.MediaID = args.MediaID;
|
||||||
newData.mediaURL = args.MediaURL;
|
newData.MediaURL = args.MediaURL;
|
||||||
newData.musicURL = args.MusicURL;
|
newData.MusicURL = args.MusicURL;
|
||||||
newData.landName = args.Name;
|
newData.Name = args.Name;
|
||||||
newData.landFlags = args.ParcelFlags;
|
newData.Flags = args.ParcelFlags;
|
||||||
newData.passHours = args.PassHours;
|
newData.PassHours = args.PassHours;
|
||||||
newData.passPrice = args.PassPrice;
|
newData.PassPrice = args.PassPrice;
|
||||||
newData.snapshotID = args.SnapshotID;
|
newData.SnapshotID = args.SnapshotID;
|
||||||
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();
|
||||||
}
|
}
|
||||||
|
@ -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)
|
public void updateLandSold(LLUUID avatarID, LLUUID 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;
|
||||||
//newData.auctionID = AuctionID;
|
//newData.auctionID = AuctionID;
|
||||||
newData.claimDate = Util.UnixTimeSinceEpoch();
|
newData.ClaimDate = Util.UnixTimeSinceEpoch();
|
||||||
newData.claimPrice = claimprice;
|
newData.ClaimPrice = claimprice;
|
||||||
newData.salePrice = 0;
|
newData.SalePrice = 0;
|
||||||
newData.authBuyerID = LLUUID.Zero;
|
newData.AuthBuyerID = LLUUID.Zero;
|
||||||
newData.landFlags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects);
|
newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects);
|
||||||
m_scene.LandChannel.UpdateLandObject(landData.localID, newData);
|
m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData);
|
||||||
|
|
||||||
sendLandUpdateToAvatarsOverMe();
|
sendLandUpdateToAvatarsOverMe();
|
||||||
}
|
}
|
||||||
|
@ -245,13 +245,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
|
|
||||||
public bool isBannedFromLand(LLUUID avatar)
|
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();
|
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
||||||
entry.AgentID = avatar;
|
entry.AgentID = avatar;
|
||||||
entry.Flags = ParcelManager.AccessList.Ban;
|
entry.Flags = ParcelManager.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;
|
||||||
|
@ -262,13 +262,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
|
|
||||||
public bool isRestrictedFromLand(LLUUID avatar)
|
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();
|
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
||||||
entry.AgentID = avatar;
|
entry.AgentID = avatar;
|
||||||
entry.Flags = ParcelManager.AccessList.Access;
|
entry.Flags = ParcelManager.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;
|
||||||
|
@ -302,9 +302,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
|
|
||||||
if (over != null)
|
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;
|
avatars[i].Invulnerable = false;
|
||||||
else
|
else
|
||||||
avatars[i].Invulnerable = true;
|
avatars[i].Invulnerable = true;
|
||||||
|
@ -322,7 +322,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
public List<LLUUID> createAccessListArrayByFlag(ParcelManager.AccessList flag)
|
public List<LLUUID> createAccessListArrayByFlag(ParcelManager.AccessList flag)
|
||||||
{
|
{
|
||||||
List<LLUUID> list = new List<LLUUID>();
|
List<LLUUID> list = new List<LLUUID>();
|
||||||
foreach (ParcelManager.ParcelAccessEntry entry in landData.parcelAccessList)
|
foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList)
|
||||||
{
|
{
|
||||||
if (entry.Flags == flag)
|
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)
|
if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both)
|
||||||
{
|
{
|
||||||
List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access);
|
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)
|
if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both)
|
||||||
{
|
{
|
||||||
List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban);
|
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>();
|
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)
|
if (entry.Flags == (ParcelManager.AccessList) flags)
|
||||||
{
|
{
|
||||||
|
@ -374,7 +374,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
|
|
||||||
foreach (ParcelManager.ParcelAccessEntry entry in toRemove)
|
foreach (ParcelManager.ParcelAccessEntry entry in toRemove)
|
||||||
{
|
{
|
||||||
newData.parcelAccessList.Remove(entry);
|
newData.ParcelAccessList.Remove(entry);
|
||||||
}
|
}
|
||||||
foreach (ParcelManager.ParcelAccessEntry entry in entries)
|
foreach (ParcelManager.ParcelAccessEntry entry in entries)
|
||||||
{
|
{
|
||||||
|
@ -383,13 +383,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
temp.Time = new DateTime(); //Pointless? Yes.
|
temp.Time = new DateTime(); //Pointless? Yes.
|
||||||
temp.Flags = (ParcelManager.AccessList) flags;
|
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
|
#endregion
|
||||||
|
@ -398,7 +398,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
|
|
||||||
public void updateLandBitmapByteArray()
|
public void updateLandBitmapByteArray()
|
||||||
{
|
{
|
||||||
landData.landBitmapByteArray = convertLandBitmapToBytes();
|
landData.Bitmap = convertLandBitmapToBytes();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -459,7 +459,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
landData.AABBMax =
|
landData.AABBMax =
|
||||||
new LLVector3((float) (max_x * 4), (float) (max_y * 4),
|
new LLVector3((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
|
||||||
|
@ -622,7 +622,7 @@ namespace OpenSim.Region.Environment.Modules.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.landBitmapByteArray[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);
|
||||||
|
@ -655,7 +655,7 @@ namespace OpenSim.Region.Environment.Modules.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);
|
||||||
}
|
}
|
||||||
|
@ -798,10 +798,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
|
|
||||||
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)
|
||||||
|
@ -816,17 +816,17 @@ namespace OpenSim.Region.Environment.Modules.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
|
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;
|
LLUUID 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 (prim_owner == landData.groupID)
|
else if (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);
|
||||||
|
|
|
@ -331,7 +331,7 @@ namespace OpenSim.Region.Environment.Modules.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)
|
if (parcel != null && parcel.landData.OwnerID == user)
|
||||||
return objectOwnerMask;
|
return objectOwnerMask;
|
||||||
|
|
||||||
// Admin objects should not be editable by the above
|
// 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.
|
// 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;
|
||||||
}
|
}
|
||||||
|
@ -492,12 +492,12 @@ namespace OpenSim.Region.Environment.Modules.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)
|
if (parcel.landData.IsGroupOwned)
|
||||||
{
|
{
|
||||||
// TODO: Need to do some extra checks here. Requires group code.
|
// TODO: Need to do some extra checks here. Requires group code.
|
||||||
}
|
}
|
||||||
|
@ -723,7 +723,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((land.landData.landFlags & ((int)Parcel.ParcelFlags.AllowAllObjectEntry)) != 0)
|
if ((land.landData.Flags & ((int)Parcel.ParcelFlags.AllowAllObjectEntry)) != 0)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -770,7 +770,7 @@ namespace OpenSim.Region.Environment.Modules.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.landFlags & ((int)Parcel.ParcelFlags.CreateObjects)) ==
|
if ((land.landData.Flags & ((int)Parcel.ParcelFlags.CreateObjects)) ==
|
||||||
(int)Parcel.ParcelFlags.CreateObjects)
|
(int)Parcel.ParcelFlags.CreateObjects)
|
||||||
permission = true;
|
permission = true;
|
||||||
|
|
||||||
|
|
|
@ -2444,9 +2444,9 @@ namespace OpenSim.Region.Environment.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 != 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
|
else
|
||||||
{
|
{
|
||||||
return land.landData.ownerID;
|
return land.landData.OwnerID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3329,7 +3329,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
land.landData.musicURL = url;
|
land.landData.MusicURL = url;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3345,7 +3345,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
land.landData.mediaURL = url;
|
land.landData.MediaURL = url;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3394,13 +3394,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
if (parcel != null)
|
if (parcel != null)
|
||||||
{
|
{
|
||||||
if ((parcel.landData.landFlags & (uint)Parcel.ParcelFlags.AllowOtherScripts) != 0)
|
if ((parcel.landData.Flags & (uint)Parcel.ParcelFlags.AllowOtherScripts) != 0)
|
||||||
{
|
{
|
||||||
return true;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -3411,7 +3411,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (part.OwnerID == parcel.landData.ownerID)
|
if (part.OwnerID == parcel.landData.OwnerID)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4334,9 +4334,9 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
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.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID))
|
&& parcel.landData.IsGroupOwned) || World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID))
|
||||||
{
|
{
|
||||||
av.StandUp();
|
av.StandUp();
|
||||||
}
|
}
|
||||||
|
@ -4702,7 +4702,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
LLUUID key;
|
LLUUID 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();
|
||||||
if (LLUUID.TryParse(avatar, out key))
|
if (LLUUID.TryParse(avatar, out key))
|
||||||
|
@ -4710,7 +4710,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
entry.AgentID = key;
|
entry.AgentID = key;
|
||||||
entry.Flags = ParcelManager.AccessList.Access;
|
entry.Flags = ParcelManager.AccessList.Access;
|
||||||
entry.Time = DateTime.Now.AddHours(hours);
|
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);
|
m_host.AddScriptLPS(1);
|
||||||
LLUUID key;
|
LLUUID 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();
|
||||||
if (LLUUID.TryParse(avatar, out key))
|
if (LLUUID.TryParse(avatar, out key))
|
||||||
|
@ -6860,7 +6860,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
entry.AgentID = key;
|
entry.AgentID = key;
|
||||||
entry.Flags = ParcelManager.AccessList.Ban;
|
entry.Flags = ParcelManager.AccessList.Ban;
|
||||||
entry.Time = DateTime.Now.AddHours(hours);
|
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);
|
m_host.AddScriptLPS(1);
|
||||||
LLUUID key;
|
LLUUID 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 (LLUUID.TryParse(avatar, out key))
|
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)
|
if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Access)
|
||||||
{
|
{
|
||||||
land.parcelAccessList.Remove(entry);
|
land.ParcelAccessList.Remove(entry);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6891,15 +6891,15 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
LLUUID key;
|
LLUUID 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 (LLUUID.TryParse(avatar, out key))
|
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)
|
if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Ban)
|
||||||
{
|
{
|
||||||
land.parcelAccessList.Remove(entry);
|
land.ParcelAccessList.Remove(entry);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6961,7 +6961,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
public LSL_Types.LSLInteger llGetParcelFlags(LSL_Types.Vector3 pos)
|
public LSL_Types.LSLInteger llGetParcelFlags(LSL_Types.Vector3 pos)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
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()
|
public LSL_Types.LSLInteger llGetRegionFlags()
|
||||||
|
@ -7038,13 +7038,13 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
{
|
{
|
||||||
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)
|
||||||
{
|
{
|
||||||
if (entry.Flags == ParcelManager.AccessList.Ban)
|
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);
|
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)
|
||||||
{
|
{
|
||||||
if (entry.Flags == ParcelManager.AccessList.Access)
|
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)
|
if (category == 0)
|
||||||
{
|
{
|
||||||
return land.simwidePrims;
|
return land.SimwidePrims;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -7102,22 +7102,22 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
|
|
||||||
else if (category == 1)//Owner Prims
|
else if (category == 1)//Owner Prims
|
||||||
{
|
{
|
||||||
return land.ownerPrims;
|
return land.OwnerPrims;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (category == 2)//Group Prims
|
else if (category == 2)//Group Prims
|
||||||
{
|
{
|
||||||
return land.groupPrims;
|
return land.GroupPrims;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (category == 3)//Other Prims
|
else if (category == 3)//Other Prims
|
||||||
{
|
{
|
||||||
return land.otherPrims;
|
return land.OtherPrims;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (category == 4)//Selected
|
else if (category == 4)//Selected
|
||||||
{
|
{
|
||||||
return land.selectedPrims;
|
return land.SelectedPrims;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (category == 5)//Temp
|
else if (category == 5)//Temp
|
||||||
|
@ -7175,14 +7175,14 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
|
|
||||||
if (sim_wide == 1)
|
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;
|
return (int)v;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
decimal v = land.area * (decimal)(0.22) * (decimal)bonusfactor;
|
decimal v = land.Area * (decimal)(0.22) * (decimal)bonusfactor;
|
||||||
|
|
||||||
return (int)v;
|
return (int)v;
|
||||||
}
|
}
|
||||||
|
@ -7203,19 +7203,19 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
switch (o.ToString())
|
switch (o.ToString())
|
||||||
{
|
{
|
||||||
case "0":
|
case "0":
|
||||||
ret = ret + new LSL_Types.list(land.landName);
|
ret = ret + new LSL_Types.list(land.Name);
|
||||||
break;
|
break;
|
||||||
case "1":
|
case "1":
|
||||||
ret = ret + new LSL_Types.list(land.landDesc);
|
ret = ret + new LSL_Types.list(land.Description);
|
||||||
break;
|
break;
|
||||||
case "2":
|
case "2":
|
||||||
ret = ret + new LSL_Types.list(land.ownerID.ToString());
|
ret = ret + new LSL_Types.list(land.OwnerID.ToString());
|
||||||
break;
|
break;
|
||||||
case "3":
|
case "3":
|
||||||
ret = ret + new LSL_Types.list(land.groupID.ToString());
|
ret = ret + new LSL_Types.list(land.GroupID.ToString());
|
||||||
break;
|
break;
|
||||||
case "4":
|
case "4":
|
||||||
ret = ret + new LSL_Types.list(land.area);
|
ret = ret + new LSL_Types.list(land.Area);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret = ret + new LSL_Types.list(0);
|
ret = ret + new LSL_Types.list(0);
|
||||||
|
|
|
@ -4198,9 +4198,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.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID))
|
&& parcel.landData.IsGroupOwned) || World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID))
|
||||||
{
|
{
|
||||||
av.StandUp();
|
av.StandUp();
|
||||||
}
|
}
|
||||||
|
@ -4566,7 +4566,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
LLUUID key;
|
LLUUID 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();
|
||||||
if (LLUUID.TryParse(avatar, out key))
|
if (LLUUID.TryParse(avatar, out key))
|
||||||
|
@ -4574,7 +4574,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
entry.AgentID = key;
|
entry.AgentID = key;
|
||||||
entry.Flags = ParcelManager.AccessList.Access;
|
entry.Flags = ParcelManager.AccessList.Access;
|
||||||
entry.Time = DateTime.Now.AddHours(hours);
|
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);
|
m_host.AddScriptLPS(1);
|
||||||
LLUUID key;
|
LLUUID 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();
|
||||||
if (LLUUID.TryParse(avatar, out key))
|
if (LLUUID.TryParse(avatar, out key))
|
||||||
|
@ -6640,7 +6640,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
entry.AgentID = key;
|
entry.AgentID = key;
|
||||||
entry.Flags = ParcelManager.AccessList.Ban;
|
entry.Flags = ParcelManager.AccessList.Ban;
|
||||||
entry.Time = DateTime.Now.AddHours(hours);
|
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);
|
m_host.AddScriptLPS(1);
|
||||||
LLUUID key;
|
LLUUID 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 (LLUUID.TryParse(avatar, out key))
|
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)
|
if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Access)
|
||||||
{
|
{
|
||||||
land.parcelAccessList.Remove(entry);
|
land.ParcelAccessList.Remove(entry);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6671,15 +6671,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
LLUUID key;
|
LLUUID 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 (LLUUID.TryParse(avatar, out key))
|
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)
|
if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Ban)
|
||||||
{
|
{
|
||||||
land.parcelAccessList.Remove(entry);
|
land.ParcelAccessList.Remove(entry);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6741,7 +6741,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public LSL_Types.LSLInteger llGetParcelFlags(LSL_Types.Vector3 pos)
|
public LSL_Types.LSLInteger llGetParcelFlags(LSL_Types.Vector3 pos)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
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()
|
public LSL_Types.LSLInteger llGetRegionFlags()
|
||||||
|
@ -6818,13 +6818,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
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)
|
||||||
{
|
{
|
||||||
if (entry.Flags == ParcelManager.AccessList.Ban)
|
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);
|
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)
|
||||||
{
|
{
|
||||||
if (entry.Flags == ParcelManager.AccessList.Access)
|
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)
|
if (category == 0)
|
||||||
{
|
{
|
||||||
return land.simwidePrims;
|
return land.SimwidePrims;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -6882,22 +6882,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
else if (category == 1)//Owner Prims
|
else if (category == 1)//Owner Prims
|
||||||
{
|
{
|
||||||
return land.ownerPrims;
|
return land.OwnerPrims;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (category == 2)//Group Prims
|
else if (category == 2)//Group Prims
|
||||||
{
|
{
|
||||||
return land.groupPrims;
|
return land.GroupPrims;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (category == 3)//Other Prims
|
else if (category == 3)//Other Prims
|
||||||
{
|
{
|
||||||
return land.otherPrims;
|
return land.OtherPrims;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (category == 4)//Selected
|
else if (category == 4)//Selected
|
||||||
{
|
{
|
||||||
return land.selectedPrims;
|
return land.SelectedPrims;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (category == 5)//Temp
|
else if (category == 5)//Temp
|
||||||
|
@ -6955,14 +6955,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
if (sim_wide == 1)
|
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;
|
return (int)v;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
decimal v = land.area * (decimal)(0.22) * (decimal)bonusfactor;
|
decimal v = land.Area * (decimal)(0.22) * (decimal)bonusfactor;
|
||||||
|
|
||||||
return (int)v;
|
return (int)v;
|
||||||
}
|
}
|
||||||
|
@ -6983,19 +6983,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
switch (o.ToString())
|
switch (o.ToString())
|
||||||
{
|
{
|
||||||
case "0":
|
case "0":
|
||||||
ret = ret + new LSL_Types.list(land.landName);
|
ret = ret + new LSL_Types.list(land.Name);
|
||||||
break;
|
break;
|
||||||
case "1":
|
case "1":
|
||||||
ret = ret + new LSL_Types.list(land.landDesc);
|
ret = ret + new LSL_Types.list(land.Description);
|
||||||
break;
|
break;
|
||||||
case "2":
|
case "2":
|
||||||
ret = ret + new LSL_Types.list(land.ownerID.ToString());
|
ret = ret + new LSL_Types.list(land.OwnerID.ToString());
|
||||||
break;
|
break;
|
||||||
case "3":
|
case "3":
|
||||||
ret = ret + new LSL_Types.list(land.groupID.ToString());
|
ret = ret + new LSL_Types.list(land.GroupID.ToString());
|
||||||
break;
|
break;
|
||||||
case "4":
|
case "4":
|
||||||
ret = ret + new LSL_Types.list(land.area);
|
ret = ret + new LSL_Types.list(land.Area);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret = ret + new LSL_Types.list(0);
|
ret = ret + new LSL_Types.list(0);
|
||||||
|
|
Loading…
Reference in New Issue