diff options
author | Charles Krinke | 2009-04-19 00:11:14 +0000 |
---|---|---|
committer | Charles Krinke | 2009-04-19 00:11:14 +0000 |
commit | a416e75ddba9de7448c00ecb88cb2f1a1949dac2 (patch) | |
tree | 32b39c6cc4f82689b0b0ffb5ed0b8f875c534a03 /OpenSim/Region/CoreModules | |
parent | Bug fix in HG asset posts. Get the inner assets not just from mem cache but f... (diff) | |
download | opensim-SC_OLD-a416e75ddba9de7448c00ecb88cb2f1a1949dac2.zip opensim-SC_OLD-a416e75ddba9de7448c00ecb88cb2f1a1949dac2.tar.gz opensim-SC_OLD-a416e75ddba9de7448c00ecb88cb2f1a1949dac2.tar.bz2 opensim-SC_OLD-a416e75ddba9de7448c00ecb88cb2f1a1949dac2.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 23 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 12 |
2 files changed, 34 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 4ae617d..d7bd78b 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -121,7 +121,9 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
121 | client.OnParcelReclaim += new ParcelReclaim(handleParcelReclaim); | 121 | client.OnParcelReclaim += new ParcelReclaim(handleParcelReclaim); |
122 | client.OnParcelInfoRequest += new ParcelInfoRequest(handleParcelInfo); | 122 | client.OnParcelInfoRequest += new ParcelInfoRequest(handleParcelInfo); |
123 | client.OnParcelDwellRequest += new ParcelDwellRequest(handleParcelDwell); | 123 | client.OnParcelDwellRequest += new ParcelDwellRequest(handleParcelDwell); |
124 | 124 | ||
125 | client.OnParcelDeedToGroup += new ParcelDeedToGroup(handleParcelDeedToGroup); | ||
126 | |||
125 | if (m_scene.Entities.ContainsKey(client.AgentId)) | 127 | if (m_scene.Entities.ContainsKey(client.AgentId)) |
126 | { | 128 | { |
127 | SendLandUpdate((ScenePresence)m_scene.Entities[client.AgentId], true); | 129 | SendLandUpdate((ScenePresence)m_scene.Entities[client.AgentId], true); |
@@ -129,6 +131,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
129 | } | 131 | } |
130 | } | 132 | } |
131 | 133 | ||
134 | |||
132 | public void PostInitialise() | 135 | public void PostInitialise() |
133 | { | 136 | { |
134 | } | 137 | } |
@@ -1125,6 +1128,24 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1125 | } | 1128 | } |
1126 | } | 1129 | } |
1127 | 1130 | ||
1131 | |||
1132 | void handleParcelDeedToGroup(int parcelLocalID, UUID groupID, IClientAPI remote_client) | ||
1133 | { | ||
1134 | // TODO: May want to validate that the group id is valid and that the remote client has the right to deed | ||
1135 | ILandObject land; | ||
1136 | lock (m_landList) | ||
1137 | { | ||
1138 | m_landList.TryGetValue(parcelLocalID, out land); | ||
1139 | } | ||
1140 | |||
1141 | if (land != null) | ||
1142 | { | ||
1143 | land.deedToGroup(groupID); | ||
1144 | } | ||
1145 | |||
1146 | } | ||
1147 | |||
1148 | |||
1128 | #region Land Object From Storage Functions | 1149 | #region Land Object From Storage Functions |
1129 | 1150 | ||
1130 | public void IncomingLandObjectsFromStorage(List<LandData> data) | 1151 | public void IncomingLandObjectsFromStorage(List<LandData> data) |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 2cf739b..ce66e46 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -232,6 +232,18 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
232 | sendLandUpdateToAvatarsOverMe(); | 232 | sendLandUpdateToAvatarsOverMe(); |
233 | } | 233 | } |
234 | 234 | ||
235 | public void deedToGroup(UUID groupID) | ||
236 | { | ||
237 | LandData newData = landData.Copy(); | ||
238 | newData.OwnerID = groupID; | ||
239 | newData.GroupID = groupID; | ||
240 | newData.IsGroupOwned = true; | ||
241 | |||
242 | m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); | ||
243 | |||
244 | sendLandUpdateToAvatarsOverMe(); | ||
245 | } | ||
246 | |||
235 | public bool isEitherBannedOrRestricted(UUID avatar) | 247 | public bool isEitherBannedOrRestricted(UUID avatar) |
236 | { | 248 | { |
237 | if (isBannedFromLand(avatar)) | 249 | if (isBannedFromLand(avatar)) |