aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/EstateManager.cs
diff options
context:
space:
mode:
authorTeravus Ovares2007-12-18 12:08:34 +0000
committerTeravus Ovares2007-12-18 12:08:34 +0000
commitccc8ffaaec915f0561d9aded6cc4b32b911f473c (patch)
treee07135474e1986cd09177db8e62787b4f74c114a /OpenSim/Region/Environment/EstateManager.cs
parent* Removed redundant code in RestService.cs (diff)
downloadopensim-SC_OLD-ccc8ffaaec915f0561d9aded6cc4b32b911f473c.zip
opensim-SC_OLD-ccc8ffaaec915f0561d9aded6cc4b32b911f473c.tar.gz
opensim-SC_OLD-ccc8ffaaec915f0561d9aded6cc4b32b911f473c.tar.bz2
opensim-SC_OLD-ccc8ffaaec915f0561d9aded6cc4b32b911f473c.tar.xz
* Added Incomplete Handling of the RegionInfoRequest packet
* Added Incomplete Handling of the EstateCovenantRequest packet * Added Incomplete Handling of the EstateOwnerMessageRequest.ChangeEstateCovenantid method * Fixed a race condition with avatar animations
Diffstat (limited to 'OpenSim/Region/Environment/EstateManager.cs')
-rw-r--r--OpenSim/Region/Environment/EstateManager.cs52
1 files changed, 52 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs
index e1bb4d8..081a8cd 100644
--- a/OpenSim/Region/Environment/EstateManager.cs
+++ b/OpenSim/Region/Environment/EstateManager.cs
@@ -177,6 +177,12 @@ namespace OpenSim.Region.Environment
177 estateRestartSim(packet); 177 estateRestartSim(packet);
178 } 178 }
179 break; 179 break;
180 case "estatechangecovenantid":
181 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId))
182 {
183 EstateChangeCovenant(packet);
184 }
185 break;
180 default: 186 default:
181 MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); 187 MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
182 break; 188 break;
@@ -340,8 +346,54 @@ namespace OpenSim.Region.Environment
340 346
341 } 347 }
342 } 348 }
349 private void EstateChangeCovenant(EstateOwnerMessagePacket packet)
350 {
351 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
352 {
353 LLUUID newCovenantID = new LLUUID(Helpers.FieldToUTF8String(block.Parameter));
354 m_regInfo.CovenantID = newCovenantID;
343 355
356 }
357
358 }
359 public void HandleRegionInfoRequest(IClientAPI client, LLUUID sessionID)
360 {
361 RegionInfoPacket rinfopack = new RegionInfoPacket();
362 RegionInfoPacket.RegionInfoBlock rinfoblk = new RegionInfoPacket.RegionInfoBlock();
363
364 rinfoblk.BillableFactor = 0;
365 rinfoblk.EstateID = 02;
366 rinfoblk.MaxAgents = 100;
367 rinfoblk.ObjectBonusFactor = 1.0f;
368 rinfoblk.ParentEstateID = 0;
369 rinfoblk.PricePerMeter = 0;
370 rinfoblk.RedirectGridX = 0;
371 rinfoblk.RedirectGridY = 0;
372 rinfoblk.RegionFlags = (uint)m_regInfo.EstateSettings.regionFlags;
373 rinfoblk.SimAccess = (byte)m_regInfo.EstateSettings.simAccess;
374 rinfoblk.SunHour = m_regInfo.EstateSettings.sunHour;
375 rinfoblk.TerrainLowerLimit = 20;
376 rinfoblk.TerrainRaiseLimit = 20;
377 rinfoblk.UseEstateSun = true;
378 rinfoblk.WaterHeight = m_regInfo.EstateSettings.waterHeight;
379 rinfoblk.SimName = Helpers.StringToField(m_regInfo.RegionName);
380
381 rinfopack.RegionInfo = rinfoblk;
382
383 client.OutPacket(rinfopack, ThrottleOutPacketType.Task);
344 384
385 }
386 public void HandleEstateCovenantRequest(IClientAPI client, LLUUID sessionID)
387 {
388 EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket();
389 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock();
390 edata.CovenantID = m_regInfo.CovenantID;
391 edata.CovenantTimestamp = 0;
392 edata.EstateOwnerID = m_regInfo.MasterAvatarAssignedUUID;
393 edata.EstateName = Helpers.StringToField(m_regInfo.MasterAvatarFirstName + " " + m_regInfo.MasterAvatarLastName);
394 einfopack.Data = edata;
395 client.OutPacket(einfopack, ThrottleOutPacketType.Task);
396 }
345 #endregion 397 #endregion
346 398
347 #region Outgoing Packets 399 #region Outgoing Packets