Fix some wrong handling of booleans for SeeAVs, AnyAVSounds and GroupAVSounds fields in sqlite3-database

Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
LSLKeyTest
tglion 2016-09-05 07:58:22 +02:00 committed by UbitUmarov
parent b5e7816b77
commit 0e68742afc
2 changed files with 12 additions and 3 deletions

View File

@ -1354,7 +1354,7 @@ namespace OpenSim.Data.SQLite
createCol(land, "Name", typeof(String));
createCol(land, "Desc", typeof(String));
createCol(land, "OwnerUUID", typeof(String));
createCol(land, "IsGroupOwned", typeof(Boolean));
createCol(land, "IsGroupOwned", typeof(String));
createCol(land, "Area", typeof(Int32));
createCol(land, "AuctionID", typeof(Int32)); //Unemplemented
createCol(land, "Category", typeof(Int32)); //Enum OpenMetaverse.Parcel.ParcelCategory
@ -1387,6 +1387,9 @@ namespace OpenSim.Data.SQLite
createCol(land, "MediaLoop", typeof(Boolean));
createCol(land, "ObscureMedia", typeof(Boolean));
createCol(land, "ObscureMusic", typeof(Boolean));
createCol(land, "SeeAVs", typeof(Boolean));
createCol(land, "AnyAVSounds", typeof(Boolean));
createCol(land, "GroupAVSounds", typeof(Boolean));
land.PrimaryKey = new DataColumn[] { land.Columns["UUID"] };
@ -1829,7 +1832,7 @@ namespace OpenSim.Data.SQLite
newData.Name = (String)row["Name"];
newData.Description = (String)row["Desc"];
newData.OwnerID = (UUID)(String)row["OwnerUUID"];
newData.IsGroupOwned = (Boolean)row["IsGroupOwned"];
newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
newData.Area = Convert.ToInt32(row["Area"]);
newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
newData.Category = (ParcelCategory)Convert.ToInt32(row["Category"]);
@ -2245,7 +2248,7 @@ namespace OpenSim.Data.SQLite
row["Name"] = land.Name;
row["Desc"] = land.Description;
row["OwnerUUID"] = land.OwnerID.ToString();
row["IsGroupOwned"] = land.IsGroupOwned;
row["IsGroupOwned"] = land.IsGroupOwned.ToString();
row["Area"] = land.Area;
row["AuctionID"] = land.AuctionID; //Unemplemented
row["Category"] = land.Category; //Enum OpenMetaverse.Parcel.ParcelCategory
@ -2939,6 +2942,9 @@ namespace OpenSim.Data.SQLite
{
return DbType.Binary;
}
else if (type == typeof(Boolean)) {
return DbType.Boolean;
}
else
{
return DbType.String;

View File

@ -1435,6 +1435,9 @@ namespace OpenSim.Region.CoreModules.World.Land
land.LandData.IsGroupOwned = false;
land.LandData.SalePrice = 0;
land.LandData.AuthBuyerID = UUID.Zero;
land.LandData.SeeAVs = true;
land.LandData.AnyAVSounds = true;
land.LandData.GroupAVSounds = true;
land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory);
m_scene.ForEachClient(SendParcelOverlay);
land.SendLandUpdateToClient(true, remote_client);