aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs')
-rw-r--r--OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs48
1 files changed, 48 insertions, 0 deletions
diff --git a/OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs b/OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs
index 5dab080..33996d0 100644
--- a/OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs
+++ b/OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs
@@ -3,14 +3,62 @@ using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5using OpenSim.Framework.Types; 5using OpenSim.Framework.Types;
6using OpenSim.RegionServer.Simulator;
7using OpenSim.RegionServer.Client;
8
9using libsecondlife;
10using libsecondlife.Packets;
6 11
7namespace OpenSim.RegionServer.Estate 12namespace OpenSim.RegionServer.Estate
8{ 13{
14
9 /// <summary> 15 /// <summary>
10 /// Processes requests regarding estates. Refer to EstateSettings.cs in OpenSim.Framework. Types for all of the core settings 16 /// Processes requests regarding estates. Refer to EstateSettings.cs in OpenSim.Framework. Types for all of the core settings
11 /// </summary> 17 /// </summary>
12 public class EstateManager 18 public class EstateManager
13 { 19 {
20 private World m_world;
21
22 public EstateManager(World world)
23 {
24 m_world = world; //Estate settings found at world.m_regInfo.estateSettings
25 }
26
27 public void handleEstateOwnerMessage(EstateOwnerMessagePacket packet, ClientView remote_client)
28 {
29 if (remote_client.AgentID == m_world.m_regInfo.MasterAvatarAssignedUUID)
30 {
31 switch (Helpers.FieldToUTF8String(packet.MethodData.Method))
32 {
33 case "getinfo":
34 Console.WriteLine("GETINFO Requested");
35 RegionInfoPacket regionInfoPacket = new RegionInfoPacket();
36 regionInfoPacket.AgentData.AgentID = remote_client.AgentID;
37 regionInfoPacket.AgentData.SessionID = remote_client.SessionID;
38 regionInfoPacket.RegionInfo.BillableFactor = m_world.m_regInfo.estateSettings.billableFactor;
39 regionInfoPacket.RegionInfo.EstateID = m_world.m_regInfo.estateSettings.estateID;
40 regionInfoPacket.RegionInfo.MaxAgents = m_world.m_regInfo.estateSettings.maxAgents;
41 regionInfoPacket.RegionInfo.ObjectBonusFactor = m_world.m_regInfo.estateSettings.objectBonusFactor;
42 regionInfoPacket.RegionInfo.ParentEstateID = m_world.m_regInfo.estateSettings.parentEstateID;
43 regionInfoPacket.RegionInfo.PricePerMeter = m_world.m_regInfo.estateSettings.pricePerMeter;
44 regionInfoPacket.RegionInfo.RedirectGridX = m_world.m_regInfo.estateSettings.redirectGridX;
45 regionInfoPacket.RegionInfo.RedirectGridY = m_world.m_regInfo.estateSettings.redirectGridY;
46 regionInfoPacket.RegionInfo.RegionFlags = m_world.m_regInfo.estateSettings.regionFlags;
47 regionInfoPacket.RegionInfo.SimAccess = m_world.m_regInfo.estateSettings.simAccess;
48 regionInfoPacket.RegionInfo.SimName = Helpers.StringToField(m_world.m_regInfo.RegionName);
49 regionInfoPacket.RegionInfo.SunHour = m_world.m_regInfo.estateSettings.sunHour;
50 regionInfoPacket.RegionInfo.TerrainLowerLimit = m_world.m_regInfo.estateSettings.terrainLowerLimit;
51 regionInfoPacket.RegionInfo.TerrainRaiseLimit = m_world.m_regInfo.estateSettings.terrainRaiseLimit;
52 regionInfoPacket.RegionInfo.UseEstateSun = m_world.m_regInfo.estateSettings.useEstateSun;
53 regionInfoPacket.RegionInfo.WaterHeight = m_world.m_regInfo.estateSettings.waterHeight;
14 54
55 remote_client.OutPacket(regionInfoPacket);
56 break;
57 default:
58 OpenSim.Framework.Console.MainConsole.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
59 break;
60 }
61 }
62 }
15 } 63 }
16} 64}