Thank you kindly, MCortez, for a patch that:

This hooks up the LandManagementModule to handle the DeedParcelToGroup 
packet. Now people can start testing land assigned to and owned by groups.
Also fixes a viewer crash issue when searching for and then joining a group 
with an agent that is not already being tracked by groups server.
0.6.5-rc1
Charles Krinke 2009-04-19 00:11:14 +00:00
parent 06f0515d14
commit a416e75ddb
4 changed files with 40 additions and 2 deletions

View File

@ -122,6 +122,8 @@ namespace OpenSim.Region.CoreModules.World.Land
client.OnParcelInfoRequest += new ParcelInfoRequest(handleParcelInfo);
client.OnParcelDwellRequest += new ParcelDwellRequest(handleParcelDwell);
client.OnParcelDeedToGroup += new ParcelDeedToGroup(handleParcelDeedToGroup);
if (m_scene.Entities.ContainsKey(client.AgentId))
{
SendLandUpdate((ScenePresence)m_scene.Entities[client.AgentId], true);
@ -129,6 +131,7 @@ namespace OpenSim.Region.CoreModules.World.Land
}
}
public void PostInitialise()
{
}
@ -1125,6 +1128,24 @@ namespace OpenSim.Region.CoreModules.World.Land
}
}
void handleParcelDeedToGroup(int parcelLocalID, UUID groupID, IClientAPI remote_client)
{
// TODO: May want to validate that the group id is valid and that the remote client has the right to deed
ILandObject land;
lock (m_landList)
{
m_landList.TryGetValue(parcelLocalID, out land);
}
if (land != null)
{
land.deedToGroup(groupID);
}
}
#region Land Object From Storage Functions
public void IncomingLandObjectsFromStorage(List<LandData> data)

View File

@ -232,6 +232,18 @@ namespace OpenSim.Region.CoreModules.World.Land
sendLandUpdateToAvatarsOverMe();
}
public void deedToGroup(UUID groupID)
{
LandData newData = landData.Copy();
newData.OwnerID = groupID;
newData.GroupID = groupID;
newData.IsGroupOwned = true;
m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData);
sendLandUpdateToAvatarsOverMe();
}
public bool isEitherBannedOrRestricted(UUID avatar)
{
if (isBannedFromLand(avatar))

View File

@ -76,6 +76,8 @@ namespace OpenSim.Region.Framework.Interfaces
void removePrimFromCount(SceneObjectGroup obj);
void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area);
void deedToGroup(UUID groupID);
void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel);
void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel);

View File

@ -552,7 +552,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
{
GroupTitlesData title = new GroupTitlesData();
title.Name = role.Name;
if (agentMembership != null)
{
title.Selected = agentMembership.ActiveRole == role.RoleID;
}
title.UUID = role.RoleID;
}