diff options
author | Melanie Thielker | 2008-07-18 02:40:47 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-07-18 02:40:47 +0000 |
commit | 263633e274082135b21b8183b92280b768d18883 (patch) | |
tree | f6104eef3633a8b454a4e8ac09d15182970c6bae /OpenSim/Region/Environment/Modules | |
parent | added region port number to output of "show regions" command (diff) | |
download | opensim-SC_OLD-263633e274082135b21b8183b92280b768d18883.zip opensim-SC_OLD-263633e274082135b21b8183b92280b768d18883.tar.gz opensim-SC_OLD-263633e274082135b21b8183b92280b768d18883.tar.bz2 opensim-SC_OLD-263633e274082135b21b8183b92280b768d18883.tar.xz |
Patch #9151
Makes the estate dialog fully functional. Implements all client facing functionality. Moves estate data from estate_settings.xml, which is used to provide defaults, to the region data store. Creates one estate for each region, and places the region in it. Converts all region bans to estate bans.
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
4 files changed, 180 insertions, 79 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs index ac6a075..c5c0370 100644 --- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs | |||
@@ -49,9 +49,26 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
49 | 49 | ||
50 | private void sendDetailedEstateData(IClientAPI remote_client, LLUUID invoice) | 50 | private void sendDetailedEstateData(IClientAPI remote_client, LLUUID invoice) |
51 | { | 51 | { |
52 | remote_client.SendDetailedEstateData(invoice,m_scene.RegionInfo.EstateSettings.estateName,m_scene.RegionInfo.EstateSettings.estateID); | 52 | //SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant) |
53 | remote_client.SendEstateManagersList(invoice,m_scene.RegionInfo.EstateSettings.estateManagers,m_scene.RegionInfo.EstateSettings.estateID); | 53 | |
54 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.regionBanlist, m_scene.RegionInfo.EstateSettings.estateID); | 54 | uint sun = 0; |
55 | if(!m_scene.RegionInfo.EstateSettings.UseGlobalTime) | ||
56 | sun=(uint)(m_scene.RegionInfo.EstateSettings.SunPosition*1024.0) + 0x1800; | ||
57 | remote_client.SendDetailedEstateData(invoice, | ||
58 | m_scene.RegionInfo.EstateSettings.EstateName, | ||
59 | m_scene.RegionInfo.EstateSettings.EstateID, | ||
60 | m_scene.RegionInfo.EstateSettings.ParentEstateID, | ||
61 | GetEstateFlags(), | ||
62 | sun, | ||
63 | m_scene.RegionInfo.RegionSettings.Covenant); | ||
64 | |||
65 | remote_client.SendEstateManagersList(invoice, | ||
66 | m_scene.RegionInfo.EstateSettings.EstateManagers, | ||
67 | m_scene.RegionInfo.EstateSettings.EstateID); | ||
68 | |||
69 | remote_client.SendBannedUserList(invoice, | ||
70 | m_scene.RegionInfo.EstateSettings.EstateBans, | ||
71 | m_scene.RegionInfo.EstateSettings.EstateID); | ||
55 | } | 72 | } |
56 | 73 | ||
57 | private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, | 74 | private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, |
@@ -150,8 +167,10 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
150 | sendRegionHandshakeToAll(); | 167 | sendRegionHandshakeToAll(); |
151 | } | 168 | } |
152 | 169 | ||
153 | public void setRegionTerrainSettings(float WaterHeight, float TerrainRaiseLimit, float TerrainLowerLimit, | 170 | public void setRegionTerrainSettings(float WaterHeight, |
154 | bool UseFixedSun, float SunHour) | 171 | float TerrainRaiseLimit, float TerrainLowerLimit, |
172 | bool UseEstateSun, bool UseFixedSun, float SunHour, | ||
173 | bool UseGlobal, bool EstateFixedSun, float EstateSunHour) | ||
155 | { | 174 | { |
156 | // Water Height | 175 | // Water Height |
157 | m_scene.RegionInfo.RegionSettings.WaterHeight = WaterHeight; | 176 | m_scene.RegionInfo.RegionSettings.WaterHeight = WaterHeight; |
@@ -161,10 +180,11 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
161 | m_scene.RegionInfo.RegionSettings.TerrainLowerLimit = TerrainLowerLimit; | 180 | m_scene.RegionInfo.RegionSettings.TerrainLowerLimit = TerrainLowerLimit; |
162 | 181 | ||
163 | // Time of day / fixed sun | 182 | // Time of day / fixed sun |
183 | m_scene.RegionInfo.RegionSettings.UseEstateSun = UseEstateSun; | ||
164 | m_scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun; | 184 | m_scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun; |
165 | m_scene.RegionInfo.RegionSettings.SunPosition = SunHour; | 185 | m_scene.RegionInfo.RegionSettings.SunPosition = SunHour; |
166 | 186 | ||
167 | m_scene.EventManager.TriggerEstateToolsTimeUpdate(m_scene.RegionInfo.RegionHandle, UseFixedSun, UseFixedSun, SunHour); | 187 | m_scene.EventManager.TriggerEstateToolsTimeUpdate(m_scene.RegionInfo.RegionHandle, UseFixedSun, UseEstateSun, SunHour); |
168 | 188 | ||
169 | //m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString()); | 189 | //m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString()); |
170 | //m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString()); | 190 | //m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString()); |
@@ -180,20 +200,23 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
180 | 200 | ||
181 | private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, LLUUID estateCovenantID) | 201 | private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, LLUUID estateCovenantID) |
182 | { | 202 | { |
183 | m_scene.RegionInfo.CovenantID = estateCovenantID; | 203 | m_scene.RegionInfo.RegionSettings.Covenant = estateCovenantID; |
184 | m_scene.RegionInfo.SaveEstatecovenantUUID(estateCovenantID); | 204 | m_scene.RegionInfo.RegionSettings.Save(); |
185 | } | 205 | } |
186 | 206 | ||
187 | private void handleEstateAccessDeltaRequest(IClientAPI remote_client, LLUUID invoice, int estateAccessType, LLUUID user) | 207 | private void handleEstateAccessDeltaRequest(IClientAPI remote_client, LLUUID invoice, int estateAccessType, LLUUID user) |
188 | { | 208 | { |
189 | // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc. | 209 | // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc. |
190 | 210 | ||
211 | if (user == m_scene.RegionInfo.MasterAvatarAssignedUUID) | ||
212 | return; // never process owner | ||
213 | |||
191 | switch (estateAccessType) | 214 | switch (estateAccessType) |
192 | { | 215 | { |
193 | case 64: | 216 | case 64: |
194 | if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId) || m_scene.ExternalChecks.ExternalChecksBypassPermissions()) | 217 | if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId) || m_scene.ExternalChecks.ExternalChecksBypassPermissions()) |
195 | { | 218 | { |
196 | RegionBanListItem[] banlistcheck = m_scene.RegionInfo.regionBanlist.ToArray(); | 219 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; |
197 | 220 | ||
198 | bool alreadyInList = false; | 221 | bool alreadyInList = false; |
199 | 222 | ||
@@ -209,15 +232,15 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
209 | if (!alreadyInList) | 232 | if (!alreadyInList) |
210 | { | 233 | { |
211 | 234 | ||
212 | RegionBanListItem item = new RegionBanListItem(); | 235 | EstateBan item = new EstateBan(); |
213 | 236 | ||
214 | item.bannedUUID = user; | 237 | item.bannedUUID = user; |
215 | item.regionUUID = m_scene.RegionInfo.RegionID; | 238 | item.estateID = m_scene.RegionInfo.EstateSettings.EstateID; |
216 | item.bannedIP = "0.0.0.0"; | 239 | item.bannedIP = "0.0.0.0"; |
217 | item.bannedIPHostMask = "0.0.0.0"; | 240 | item.bannedIPHostMask = "0.0.0.0"; |
218 | 241 | ||
219 | m_scene.RegionInfo.regionBanlist.Add(item); | 242 | m_scene.RegionInfo.EstateSettings.AddBan(item); |
220 | m_scene.AddToRegionBanlist(item); | 243 | m_scene.RegionInfo.EstateSettings.Save(); |
221 | 244 | ||
222 | ScenePresence s = m_scene.GetScenePresence(user); | 245 | ScenePresence s = m_scene.GetScenePresence(user); |
223 | if (s != null) | 246 | if (s != null) |
@@ -231,7 +254,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
231 | remote_client.SendAlertMessage("User is already on the region ban list"); | 254 | remote_client.SendAlertMessage("User is already on the region ban list"); |
232 | } | 255 | } |
233 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); | 256 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); |
234 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.regionBanlist, m_scene.RegionInfo.EstateSettings.estateID); | 257 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); |
235 | } | 258 | } |
236 | else | 259 | else |
237 | { | 260 | { |
@@ -241,10 +264,10 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
241 | case 128: | 264 | case 128: |
242 | if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId) || m_scene.ExternalChecks.ExternalChecksBypassPermissions()) | 265 | if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId) || m_scene.ExternalChecks.ExternalChecksBypassPermissions()) |
243 | { | 266 | { |
244 | RegionBanListItem[] banlistcheck = m_scene.RegionInfo.regionBanlist.ToArray(); | 267 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; |
245 | 268 | ||
246 | bool alreadyInList = false; | 269 | bool alreadyInList = false; |
247 | RegionBanListItem listitem = null; | 270 | EstateBan listitem = null; |
248 | 271 | ||
249 | for (int i = 0; i < banlistcheck.Length; i++) | 272 | for (int i = 0; i < banlistcheck.Length; i++) |
250 | { | 273 | { |
@@ -258,15 +281,15 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
258 | } | 281 | } |
259 | if (alreadyInList && listitem != null) | 282 | if (alreadyInList && listitem != null) |
260 | { | 283 | { |
261 | m_scene.RegionInfo.regionBanlist.Remove(listitem); | 284 | m_scene.RegionInfo.EstateSettings.RemoveBan(listitem.bannedUUID); |
262 | m_scene.RemoveFromRegionBanlist(listitem); | 285 | m_scene.RegionInfo.EstateSettings.Save(); |
263 | } | 286 | } |
264 | else | 287 | else |
265 | { | 288 | { |
266 | remote_client.SendAlertMessage("User is not on the region ban list"); | 289 | remote_client.SendAlertMessage("User is not on the region ban list"); |
267 | } | 290 | } |
268 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); | 291 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); |
269 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.regionBanlist, m_scene.RegionInfo.EstateSettings.estateID); | 292 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); |
270 | } | 293 | } |
271 | else | 294 | else |
272 | { | 295 | { |
@@ -280,7 +303,8 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
280 | if (remote_client.AgentId == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.ExternalChecks.ExternalChecksBypassPermissions()) | 303 | if (remote_client.AgentId == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.ExternalChecks.ExternalChecksBypassPermissions()) |
281 | { | 304 | { |
282 | m_scene.RegionInfo.EstateSettings.AddEstateManager(user); | 305 | m_scene.RegionInfo.EstateSettings.AddEstateManager(user); |
283 | remote_client.SendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.estateManagers, m_scene.RegionInfo.EstateSettings.estateID); | 306 | m_scene.RegionInfo.EstateSettings.Save(); |
307 | remote_client.SendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); | ||
284 | } | 308 | } |
285 | else | 309 | else |
286 | { | 310 | { |
@@ -294,7 +318,9 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
294 | if (remote_client.AgentId == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.ExternalChecks.ExternalChecksBypassPermissions()) | 318 | if (remote_client.AgentId == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.ExternalChecks.ExternalChecksBypassPermissions()) |
295 | { | 319 | { |
296 | m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user); | 320 | m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user); |
297 | remote_client.SendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.estateManagers, m_scene.RegionInfo.EstateSettings.estateID); | 321 | m_scene.RegionInfo.EstateSettings.Save(); |
322 | |||
323 | remote_client.SendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); | ||
298 | } | 324 | } |
299 | else | 325 | else |
300 | { | 326 | { |
@@ -358,28 +384,24 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
358 | { | 384 | { |
359 | 385 | ||
360 | RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs(); | 386 | RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs(); |
361 | args.billableFactor = m_scene.RegionInfo.EstateSettings.billableFactor; | 387 | args.billableFactor = m_scene.RegionInfo.EstateSettings.BillableFactor; |
362 | args.estateID = m_scene.RegionInfo.EstateSettings.estateID; | 388 | args.estateID = m_scene.RegionInfo.EstateSettings.EstateID; |
363 | args.maxAgents = (byte)m_scene.RegionInfo.RegionSettings.AgentLimit; | 389 | args.maxAgents = (byte)m_scene.RegionInfo.RegionSettings.AgentLimit; |
364 | args.objectBonusFactor = (float)m_scene.RegionInfo.RegionSettings.ObjectBonus; | 390 | args.objectBonusFactor = (float)m_scene.RegionInfo.RegionSettings.ObjectBonus; |
365 | args.parentEstateID = m_scene.RegionInfo.EstateSettings.parentEstateID; | 391 | args.parentEstateID = m_scene.RegionInfo.EstateSettings.ParentEstateID; |
366 | args.pricePerMeter = m_scene.RegionInfo.EstateSettings.pricePerMeter; | 392 | args.pricePerMeter = m_scene.RegionInfo.EstateSettings.PricePerMeter; |
367 | args.redirectGridX = m_scene.RegionInfo.EstateSettings.redirectGridX; | 393 | args.redirectGridX = m_scene.RegionInfo.EstateSettings.RedirectGridX; |
368 | args.redirectGridY = m_scene.RegionInfo.EstateSettings.redirectGridY; | 394 | args.redirectGridY = m_scene.RegionInfo.EstateSettings.RedirectGridY; |
369 | args.regionFlags = GetRegionFlags(); | 395 | args.regionFlags = GetRegionFlags(); |
370 | byte mature = 13; | 396 | byte mature = 13; |
371 | if(m_scene.RegionInfo.RegionSettings.Maturity == 1) | 397 | if(m_scene.RegionInfo.RegionSettings.Maturity == 1) |
372 | mature = 21; | 398 | mature = 21; |
373 | args.simAccess = mature; | 399 | args.simAccess = mature; |
374 | 400 | ||
375 | if (m_scene.RegionInfo.RegionSettings.FixedSun) | 401 | args.sunHour = (float)m_scene.RegionInfo.RegionSettings.SunPosition; |
376 | args.sunHour = (float)m_scene.RegionInfo.RegionSettings.SunPosition; | ||
377 | else | ||
378 | args.sunHour = m_scene.EventManager.GetSunLindenHour(); | ||
379 | |||
380 | args.terrainLowerLimit = (float)m_scene.RegionInfo.RegionSettings.TerrainLowerLimit; | 402 | args.terrainLowerLimit = (float)m_scene.RegionInfo.RegionSettings.TerrainLowerLimit; |
381 | args.terrainRaiseLimit = (float)m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit; | 403 | args.terrainRaiseLimit = (float)m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit; |
382 | args.useEstateSun = !m_scene.RegionInfo.RegionSettings.FixedSun; | 404 | args.useEstateSun = m_scene.RegionInfo.RegionSettings.UseEstateSun; |
383 | args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight; | 405 | args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight; |
384 | args.simName = m_scene.RegionInfo.RegionName; | 406 | args.simName = m_scene.RegionInfo.RegionName; |
385 | 407 | ||
@@ -387,9 +409,9 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
387 | remote_client.SendRegionInfoToEstateMenu(args); | 409 | remote_client.SendRegionInfoToEstateMenu(args); |
388 | } | 410 | } |
389 | 411 | ||
390 | private static void HandleEstateCovenantRequest(IClientAPI remote_client) | 412 | private void HandleEstateCovenantRequest(IClientAPI remote_client) |
391 | { | 413 | { |
392 | remote_client.SendEstateCovenantInformation(); | 414 | remote_client.SendEstateCovenantInformation(m_scene.RegionInfo.RegionSettings.Covenant); |
393 | } | 415 | } |
394 | private void HandleLandStatRequest(int parcelID, uint reportType, uint requestFlags, string filter, IClientAPI remoteClient) | 416 | private void HandleLandStatRequest(int parcelID, uint reportType, uint requestFlags, string filter, IClientAPI remoteClient) |
395 | { | 417 | { |
@@ -508,7 +530,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
508 | { | 530 | { |
509 | RegionHandshakeArgs args = new RegionHandshakeArgs(); | 531 | RegionHandshakeArgs args = new RegionHandshakeArgs(); |
510 | bool estatemanager = false; | 532 | bool estatemanager = false; |
511 | LLUUID[] EstateManagers = m_scene.RegionInfo.EstateSettings.estateManagers; | 533 | LLUUID[] EstateManagers = m_scene.RegionInfo.EstateSettings.EstateManagers; |
512 | for (int i = 0; i < EstateManagers.Length; i++) | 534 | for (int i = 0; i < EstateManagers.Length; i++) |
513 | { | 535 | { |
514 | if (EstateManagers[i] == remoteClient.AgentId) | 536 | if (EstateManagers[i] == remoteClient.AgentId) |
@@ -517,7 +539,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
517 | 539 | ||
518 | args.isEstateManager = estatemanager; | 540 | args.isEstateManager = estatemanager; |
519 | 541 | ||
520 | args.billableFactor = m_scene.RegionInfo.EstateSettings.billableFactor; | 542 | args.billableFactor = m_scene.RegionInfo.EstateSettings.BillableFactor; |
521 | args.terrainStartHeight0 = (float)m_scene.RegionInfo.RegionSettings.Elevation1SW; | 543 | args.terrainStartHeight0 = (float)m_scene.RegionInfo.RegionSettings.Elevation1SW; |
522 | args.terrainHeightRange0 = (float)m_scene.RegionInfo.RegionSettings.Elevation2SW; | 544 | args.terrainHeightRange0 = (float)m_scene.RegionInfo.RegionSettings.Elevation2SW; |
523 | args.terrainStartHeight1 = (float)m_scene.RegionInfo.RegionSettings.Elevation1NW; | 545 | args.terrainStartHeight1 = (float)m_scene.RegionInfo.RegionSettings.Elevation1NW; |
@@ -554,6 +576,73 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
554 | ); | 576 | ); |
555 | } | 577 | } |
556 | 578 | ||
579 | public void handleEstateChangeInfo(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, UInt32 parms1, UInt32 parms2) | ||
580 | { | ||
581 | if(parms2 == 0) | ||
582 | { | ||
583 | m_scene.RegionInfo.EstateSettings.UseGlobalTime = true; | ||
584 | m_scene.RegionInfo.EstateSettings.SunPosition = 0.0; | ||
585 | } | ||
586 | else | ||
587 | { | ||
588 | m_scene.RegionInfo.EstateSettings.UseGlobalTime = false; | ||
589 | m_scene.RegionInfo.EstateSettings.SunPosition = (double)(parms2 - 0x1800)/1024.0; | ||
590 | } | ||
591 | |||
592 | if((parms1 & 0x00000010) != 0) | ||
593 | m_scene.RegionInfo.EstateSettings.FixedSun = true; | ||
594 | else | ||
595 | m_scene.RegionInfo.EstateSettings.FixedSun = false; | ||
596 | |||
597 | if((parms1 & 0x00008000) != 0) | ||
598 | m_scene.RegionInfo.EstateSettings.PublicAccess = true; | ||
599 | else | ||
600 | m_scene.RegionInfo.EstateSettings.PublicAccess = false; | ||
601 | |||
602 | if((parms1 & 0x10000000) != 0) | ||
603 | m_scene.RegionInfo.EstateSettings.AllowVoice = true; | ||
604 | else | ||
605 | m_scene.RegionInfo.EstateSettings.AllowVoice = false; | ||
606 | |||
607 | if((parms1 & 0x00100000) != 0) | ||
608 | m_scene.RegionInfo.EstateSettings.AllowDirectTeleport = true; | ||
609 | else | ||
610 | m_scene.RegionInfo.EstateSettings.AllowDirectTeleport = false; | ||
611 | |||
612 | if((parms1 & 0x00800000) != 0) | ||
613 | m_scene.RegionInfo.EstateSettings.DenyAnonymous = true; | ||
614 | else | ||
615 | m_scene.RegionInfo.EstateSettings.DenyAnonymous = false; | ||
616 | |||
617 | if((parms1 & 0x01000000) != 0) | ||
618 | m_scene.RegionInfo.EstateSettings.DenyIdentified = true; | ||
619 | else | ||
620 | m_scene.RegionInfo.EstateSettings.DenyIdentified = false; | ||
621 | |||
622 | if((parms1 & 0x02000000) != 0) | ||
623 | m_scene.RegionInfo.EstateSettings.DenyTransacted = true; | ||
624 | else | ||
625 | m_scene.RegionInfo.EstateSettings.DenyTransacted = false; | ||
626 | |||
627 | m_scene.RegionInfo.EstateSettings.Save(); | ||
628 | |||
629 | float sun = (float)m_scene.RegionInfo.RegionSettings.SunPosition; | ||
630 | if(m_scene.RegionInfo.RegionSettings.UseEstateSun) | ||
631 | { | ||
632 | sun = (float)m_scene.RegionInfo.EstateSettings.SunPosition; | ||
633 | if(m_scene.RegionInfo.EstateSettings.UseGlobalTime) | ||
634 | sun = m_scene.EventManager.GetSunLindenHour(); | ||
635 | } | ||
636 | |||
637 | m_scene.EventManager.TriggerEstateToolsTimeUpdate( | ||
638 | m_scene.RegionInfo.RegionHandle, | ||
639 | m_scene.RegionInfo.EstateSettings.FixedSun || | ||
640 | m_scene.RegionInfo.RegionSettings.FixedSun, | ||
641 | m_scene.RegionInfo.RegionSettings.UseEstateSun, sun); | ||
642 | |||
643 | sendDetailedEstateData(remoteClient, invoice); | ||
644 | } | ||
645 | |||
557 | #endregion | 646 | #endregion |
558 | 647 | ||
559 | #region IRegionModule Members | 648 | #region IRegionModule Members |
@@ -594,8 +683,12 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
594 | setRegionTerrainSettings(height, | 683 | setRegionTerrainSettings(height, |
595 | (float)m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit, | 684 | (float)m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit, |
596 | (float)m_scene.RegionInfo.RegionSettings.TerrainLowerLimit, | 685 | (float)m_scene.RegionInfo.RegionSettings.TerrainLowerLimit, |
686 | m_scene.RegionInfo.RegionSettings.UseEstateSun, | ||
597 | m_scene.RegionInfo.RegionSettings.FixedSun, | 687 | m_scene.RegionInfo.RegionSettings.FixedSun, |
598 | (float)m_scene.RegionInfo.RegionSettings.SunPosition); | 688 | (float)m_scene.RegionInfo.RegionSettings.SunPosition, |
689 | m_scene.RegionInfo.EstateSettings.UseGlobalTime, | ||
690 | m_scene.RegionInfo.EstateSettings.FixedSun, | ||
691 | (float)m_scene.RegionInfo.EstateSettings.SunPosition); | ||
599 | 692 | ||
600 | sendRegionInfoPacketToAll(); | 693 | sendRegionInfoPacketToAll(); |
601 | } | 694 | } |
@@ -613,6 +706,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
613 | client.OnSetRegionTerrainSettings += setRegionTerrainSettings; | 706 | client.OnSetRegionTerrainSettings += setRegionTerrainSettings; |
614 | client.OnEstateRestartSimRequest += handleEstateRestartSimRequest; | 707 | client.OnEstateRestartSimRequest += handleEstateRestartSimRequest; |
615 | client.OnEstateChangeCovenantRequest += handleChangeEstateCovenantRequest; | 708 | client.OnEstateChangeCovenantRequest += handleChangeEstateCovenantRequest; |
709 | client.OnEstateChangeInfo += handleEstateChangeInfo; | ||
616 | client.OnUpdateEstateAccessDeltaRequest += handleEstateAccessDeltaRequest; | 710 | client.OnUpdateEstateAccessDeltaRequest += handleEstateAccessDeltaRequest; |
617 | client.OnSimulatorBlueBoxMessageRequest += SendSimulatorBlueBoxMessage; | 711 | client.OnSimulatorBlueBoxMessageRequest += SendSimulatorBlueBoxMessage; |
618 | client.OnEstateBlueBoxMessageRequest += SendEstateBlueBoxMessage; | 712 | client.OnEstateBlueBoxMessageRequest += SendEstateBlueBoxMessage; |
@@ -652,41 +746,53 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
652 | if(m_scene.RegionInfo.RegionSettings.BlockShowInSearch) | 746 | if(m_scene.RegionInfo.RegionSettings.BlockShowInSearch) |
653 | flags |= (Simulator.RegionFlags)(1 << 29); | 747 | flags |= (Simulator.RegionFlags)(1 << 29); |
654 | 748 | ||
655 | // Partially implemented | ||
656 | // | ||
657 | if(m_scene.RegionInfo.RegionSettings.FixedSun) | 749 | if(m_scene.RegionInfo.RegionSettings.FixedSun) |
658 | flags |= Simulator.RegionFlags.SunFixed; | 750 | flags |= Simulator.RegionFlags.SunFixed; |
751 | if(m_scene.RegionInfo.RegionSettings.Sandbox) | ||
752 | flags |= Simulator.RegionFlags.Sandbox; | ||
753 | |||
754 | // Handled in LandObject.cs: AllowLandmark | ||
755 | // Handled in LandObject.cs: AllowSetHome | ||
659 | 756 | ||
660 | // Not implemented | ||
661 | // | ||
662 | // TODO: ExternallyVisible | ||
663 | flags |= Simulator.RegionFlags.ExternallyVisible; | ||
664 | // TODO: PublicAllowed | ||
665 | flags |= Simulator.RegionFlags.PublicAllowed; | ||
666 | // TODO: AllowDirectTeleport | ||
667 | flags |= Simulator.RegionFlags.AllowDirectTeleport; | ||
668 | // TODO: AllowVoice | ||
669 | flags |= Simulator.RegionFlags.AllowVoice; | ||
670 | |||
671 | // TDOD: AllowLandmark | ||
672 | // TDOD: AllowSetHome | ||
673 | // TODO: ResetHomeOnTeleport | ||
674 | // TODO: TaxFree ? (Linden-ism) | ||
675 | // TODO: Sandbox ? | ||
676 | // TODO: SkipUpdateInterestList | 757 | // TODO: SkipUpdateInterestList |
677 | // TODO: ExternallyVisible | ||
678 | // TODO: DenyAnonymous | ||
679 | // TODO: DenyIdentified | ||
680 | // TODO: DenyTransacted | ||
681 | // TODO: AbuseEmailToEstateOwner | ||
682 | // TODO: BlockDwell | ||
683 | // TODO: EstateSkipScripts | ||
684 | 758 | ||
685 | // Omitted | 759 | // Omitted |
686 | // | 760 | // |
687 | // Omitted: NullLayer (what is that?) | 761 | // Omitted: NullLayer (what is that?) |
688 | // Omitted: SkipAgentAction (what does it do?) | 762 | // Omitted: SkipAgentAction (what does it do?) |
689 | // Omitted: MainlandVisible (Do we need it) | 763 | |
764 | return (uint)flags; | ||
765 | } | ||
766 | |||
767 | public uint GetEstateFlags() | ||
768 | { | ||
769 | Simulator.RegionFlags flags = Simulator.RegionFlags.None; | ||
770 | |||
771 | if(m_scene.RegionInfo.EstateSettings.FixedSun) | ||
772 | flags |= Simulator.RegionFlags.SunFixed; | ||
773 | if(m_scene.RegionInfo.EstateSettings.PublicAccess) | ||
774 | flags |= (Simulator.RegionFlags.PublicAllowed | | ||
775 | Simulator.RegionFlags.ExternallyVisible); | ||
776 | if(m_scene.RegionInfo.EstateSettings.AllowVoice) | ||
777 | flags |= Simulator.RegionFlags.AllowVoice; | ||
778 | if(m_scene.RegionInfo.EstateSettings.AllowDirectTeleport) | ||
779 | flags |= Simulator.RegionFlags.AllowDirectTeleport; | ||
780 | if(m_scene.RegionInfo.EstateSettings.DenyAnonymous) | ||
781 | flags |= Simulator.RegionFlags.DenyAnonymous; | ||
782 | if(m_scene.RegionInfo.EstateSettings.DenyIdentified) | ||
783 | flags |= Simulator.RegionFlags.DenyIdentified; | ||
784 | if(m_scene.RegionInfo.EstateSettings.DenyTransacted) | ||
785 | flags |= Simulator.RegionFlags.DenyTransacted; | ||
786 | if(m_scene.RegionInfo.EstateSettings.AbuseEmailToEstateOwner) | ||
787 | flags |= Simulator.RegionFlags.AbuseEmailToEstateOwner; | ||
788 | if(m_scene.RegionInfo.EstateSettings.BlockDwell) | ||
789 | flags |= Simulator.RegionFlags.BlockDwell; | ||
790 | if(m_scene.RegionInfo.EstateSettings.EstateSkipScripts) | ||
791 | flags |= Simulator.RegionFlags.EstateSkipScripts; | ||
792 | if(m_scene.RegionInfo.EstateSettings.ResetHomeOnTeleport) | ||
793 | flags |= Simulator.RegionFlags.ResetHomeOnTeleport; | ||
794 | if(m_scene.RegionInfo.EstateSettings.TaxFree) | ||
795 | flags |= Simulator.RegionFlags.TaxFree; | ||
690 | 796 | ||
691 | return (uint)flags; | 797 | return (uint)flags; |
692 | } | 798 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index e52896a..5aed2a7 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | |||
@@ -162,9 +162,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
162 | public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) | 162 | public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) |
163 | { | 163 | { |
164 | IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>(); | 164 | IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>(); |
165 | uint regionFlags = 67108864; | 165 | uint regionFlags = 336723974 & ~((uint)(Simulator.RegionFlags.AllowLandmark | Simulator.RegionFlags.AllowSetHome)); |
166 | if(estateModule != null) | 166 | if(estateModule != null) |
167 | regionFlags = estateModule.GetRegionFlags(); | 167 | regionFlags = estateModule.GetRegionFlags(); |
168 | if((landData.landFlags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0) | ||
169 | regionFlags |= (uint)Simulator.RegionFlags.AllowLandmark; | ||
170 | if(landData.ownerID == remote_client.AgentId) | ||
171 | regionFlags |= (uint)Simulator.RegionFlags.AllowSetHome; | ||
168 | remote_client.SendLandProperties(remote_client, sequence_id, | 172 | remote_client.SendLandProperties(remote_client, sequence_id, |
169 | snap_selection, request_result, landData, | 173 | snap_selection, request_result, landData, |
170 | (float)m_scene.RegionInfo.RegionSettings.ObjectBonus, | 174 | (float)m_scene.RegionInfo.RegionSettings.ObjectBonus, |
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index 10971db..040b9b7 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | |||
@@ -291,6 +291,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
291 | public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; | 291 | public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; |
292 | public event EstateDebugRegionRequest OnEstateDebugRegionRequest; | 292 | public event EstateDebugRegionRequest OnEstateDebugRegionRequest; |
293 | public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; | 293 | public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; |
294 | public event EstateChangeInfo OnEstateChangeInfo; | ||
294 | public event ScriptReset OnScriptReset; | 295 | public event ScriptReset OnScriptReset; |
295 | public event GetScriptRunning OnGetScriptRunning; | 296 | public event GetScriptRunning OnGetScriptRunning; |
296 | public event SetScriptRunning OnSetScriptRunning; | 297 | public event SetScriptRunning OnSetScriptRunning; |
@@ -752,17 +753,17 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
752 | { | 753 | { |
753 | } | 754 | } |
754 | 755 | ||
755 | public void SendBannedUserList(LLUUID invoice, List<RegionBanListItem> banlist, uint estateID) | 756 | public void SendBannedUserList(LLUUID invoice, EstateBan[] banlist, uint estateID) |
756 | { | 757 | { |
757 | } | 758 | } |
758 | 759 | ||
759 | public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) | 760 | public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) |
760 | { | 761 | { |
761 | } | 762 | } |
762 | public void SendEstateCovenantInformation() | 763 | public void SendEstateCovenantInformation(LLUUID covenant) |
763 | { | 764 | { |
764 | } | 765 | } |
765 | public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID) | 766 | public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant) |
766 | { | 767 | { |
767 | } | 768 | } |
768 | 769 | ||
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index 41bb610..b0d9a26 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs | |||
@@ -246,17 +246,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
246 | 246 | ||
247 | protected bool IsEstateManager(LLUUID user) | 247 | protected bool IsEstateManager(LLUUID user) |
248 | { | 248 | { |
249 | if (user != LLUUID.Zero) | 249 | return m_scene.RegionInfo.EstateSettings.IsEstateManager(user); |
250 | { | ||
251 | LLUUID[] estatemanagers = m_scene.RegionInfo.EstateSettings.estateManagers; | ||
252 | foreach (LLUUID estatemanager in estatemanagers) | ||
253 | { | ||
254 | if (estatemanager == user) | ||
255 | return true; | ||
256 | } | ||
257 | } | ||
258 | |||
259 | return false; | ||
260 | } | 250 | } |
261 | #endregion | 251 | #endregion |
262 | 252 | ||