From adc34c712967e1d90aaa11e2bd9ff538da1641c0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 6 May 2010 16:07:15 +0100 Subject: [PATCH] Ensure the show in search flag is cleared on ownership change. Also, when land is reclaimed, reset it's for sale flags so it can't be bought again right away. --- .../Region/CoreModules/World/Land/LandManagementModule.cs | 4 ++++ OpenSim/Region/CoreModules/World/Land/LandObject.cs | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 5750aa42fc..a691acd566 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -1188,6 +1188,10 @@ namespace OpenSim.Region.CoreModules.World.Land land.LandData.ClaimDate = Util.UnixTimeSinceEpoch(); land.LandData.GroupID = UUID.Zero; land.LandData.IsGroupOwned = false; + land.LandData.SalePrice = 0; + land.LandData.AuthBuyerID = UUID.Zero; + land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory); + m_scene.ForEachClient(SendParcelOverlay); land.SendLandUpdateToClient(true, remote_client); } diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index aca551479f..39451421c3 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -247,7 +247,7 @@ namespace OpenSim.Region.CoreModules.World.Land newData.ClaimPrice = claimprice; newData.SalePrice = 0; newData.AuthBuyerID = UUID.Zero; - newData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects); + newData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory); m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); SendLandUpdateToAvatarsOverMe(true); @@ -260,6 +260,9 @@ namespace OpenSim.Region.CoreModules.World.Land newData.GroupID = groupID; newData.IsGroupOwned = true; + // Reset show in directory flag on deed + newData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory); + m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); SendLandUpdateToAvatarsOverMe(true);