Patch from Snoopy2. Fixes Mantis #4342
fixes problems when group owned land was abandoned by the land owner or reclaimed by the estate manager or by god. Beside that this new patch makes it possible, that users can buy land directly for a group, if the buyer has the required permissions.0.6.8-post-fixes
parent
5300e8506d
commit
81c439bcaa
|
@ -1059,9 +1059,11 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
if (m_scene.Permissions.IsGod(remote_client.AgentId))
|
||||
{
|
||||
land.LandData.OwnerID = ownerID;
|
||||
land.LandData.GroupID = UUID.Zero;
|
||||
land.LandData.IsGroupOwned = false;
|
||||
|
||||
m_scene.ForEachClient(SendParcelOverlay);
|
||||
land.SendLandUpdateToClient(remote_client);
|
||||
land.SendLandUpdateToClient(true, remote_client);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1082,8 +1084,10 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
land.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
|
||||
else
|
||||
land.LandData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||
land.LandData.GroupID = UUID.Zero;
|
||||
land.LandData.IsGroupOwned = false;
|
||||
m_scene.ForEachClient(SendParcelOverlay);
|
||||
land.SendLandUpdateToClient(remote_client);
|
||||
land.SendLandUpdateToClient(true, remote_client);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1105,9 +1109,10 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
else
|
||||
land.LandData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||
land.LandData.ClaimDate = Util.UnixTimeSinceEpoch();
|
||||
land.LandData.GroupID = UUID.Zero;
|
||||
land.LandData.IsGroupOwned = false;
|
||||
m_scene.ForEachClient(SendParcelOverlay);
|
||||
land.SendLandUpdateToClient(remote_client);
|
||||
land.SendLandUpdateToClient(true, remote_client);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,8 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
#pragma warning restore 0429
|
||||
private bool[,] m_landBitmap = new bool[landArrayMax,landArrayMax];
|
||||
|
||||
private int m_lastSeqId = 0;
|
||||
|
||||
protected LandData m_landData = new LandData();
|
||||
protected Scene m_scene;
|
||||
protected List<SceneObjectGroup> primsOverMe = new List<SceneObjectGroup>();
|
||||
|
@ -81,6 +83,10 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
{
|
||||
m_scene = scene;
|
||||
LandData.OwnerID = owner_id;
|
||||
if (is_group_owned)
|
||||
LandData.GroupID = owner_id;
|
||||
else
|
||||
LandData.GroupID = UUID.Zero;
|
||||
LandData.IsGroupOwned = is_group_owned;
|
||||
}
|
||||
|
||||
|
@ -172,7 +178,19 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
// regionFlags |= (uint)RegionFlags.AllowLandmark;
|
||||
// if (landData.OwnerID == remote_client.AgentId)
|
||||
// regionFlags |= (uint)RegionFlags.AllowSetHome;
|
||||
remote_client.SendLandProperties(sequence_id,
|
||||
|
||||
int seq_id;
|
||||
if (snap_selection && (sequence_id == 0))
|
||||
{
|
||||
seq_id = m_lastSeqId;
|
||||
}
|
||||
else
|
||||
{
|
||||
seq_id = sequence_id;
|
||||
m_lastSeqId = seq_id;
|
||||
}
|
||||
|
||||
remote_client.SendLandProperties(seq_id,
|
||||
snap_selection, request_result, LandData,
|
||||
(float)m_scene.RegionInfo.RegionSettings.ObjectBonus,
|
||||
GetParcelMaxPrimCount(this),
|
||||
|
@ -184,6 +202,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
if (m_scene.Permissions.CanEditParcel(remote_client.AgentId,this))
|
||||
{
|
||||
//Needs later group support
|
||||
bool snap_selection = false;
|
||||
LandData newData = LandData.Copy();
|
||||
|
||||
if (args.AuthBuyerID != newData.AuthBuyerID || args.SalePrice != newData.SalePrice)
|
||||
|
@ -192,6 +211,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
{
|
||||
newData.AuthBuyerID = args.AuthBuyerID;
|
||||
newData.SalePrice = args.SalePrice;
|
||||
snap_selection = true;
|
||||
}
|
||||
}
|
||||
newData.Category = args.Category;
|
||||
|
@ -212,7 +232,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
|
||||
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
|
||||
|
||||
SendLandUpdateToAvatarsOverMe();
|
||||
SendLandUpdateToAvatarsOverMe(snap_selection);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -230,7 +250,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
newData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects);
|
||||
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
|
||||
|
||||
SendLandUpdateToAvatarsOverMe();
|
||||
SendLandUpdateToAvatarsOverMe(true);
|
||||
}
|
||||
|
||||
public void DeedToGroup(UUID groupID)
|
||||
|
@ -242,7 +262,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
|
||||
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
|
||||
|
||||
SendLandUpdateToAvatarsOverMe();
|
||||
SendLandUpdateToAvatarsOverMe(true);
|
||||
}
|
||||
|
||||
public bool IsEitherBannedOrRestricted(UUID avatar)
|
||||
|
@ -297,7 +317,17 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
SendLandProperties(0, false, 0, remote_client);
|
||||
}
|
||||
|
||||
public void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client)
|
||||
{
|
||||
SendLandProperties(0, snap_selection, 0, remote_client);
|
||||
}
|
||||
|
||||
public void SendLandUpdateToAvatarsOverMe()
|
||||
{
|
||||
SendLandUpdateToAvatarsOverMe(false);
|
||||
}
|
||||
|
||||
public void SendLandUpdateToAvatarsOverMe(bool snap_selection)
|
||||
{
|
||||
List<ScenePresence> avatars = m_scene.GetAvatars();
|
||||
ILandObject over = null;
|
||||
|
@ -325,7 +355,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
else
|
||||
avatars[i].Invulnerable = true;
|
||||
|
||||
SendLandUpdateToClient(avatars[i].ControllingClient);
|
||||
SendLandUpdateToClient(snap_selection, avatars[i].ControllingClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
bool IsBannedFromLand(UUID avatar);
|
||||
bool IsRestrictedFromLand(UUID avatar);
|
||||
void SendLandUpdateToClient(IClientAPI remote_client);
|
||||
void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client);
|
||||
List<UUID> CreateAccessListArrayByFlag(AccessList flag);
|
||||
void SendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client);
|
||||
void UpdateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client);
|
||||
|
|
Loading…
Reference in New Issue