diff options
author | mingchen | 2007-06-07 19:24:04 +0000 |
---|---|---|
committer | mingchen | 2007-06-07 19:24:04 +0000 |
commit | 5caf2faa24120f48522608c74b34c5ba4ce74ed5 (patch) | |
tree | 2908543861dcdf4a3774450120e00cfb676ebf8b /OpenSim/OpenSim.RegionServer/Estate | |
parent | *Forgot to initialize estateSettings variable in RegionInfoBase (diff) | |
download | opensim-SC-5caf2faa24120f48522608c74b34c5ba4ce74ed5.zip opensim-SC-5caf2faa24120f48522608c74b34c5ba4ce74ed5.tar.gz opensim-SC-5caf2faa24120f48522608c74b34c5ba4ce74ed5.tar.bz2 opensim-SC-5caf2faa24120f48522608c74b34c5ba4ce74ed5.tar.xz |
*Added basic support for EstateOwnerMessage
**Added support for 'getinfo' method
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/Estate')
-rw-r--r-- | OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs | 48 |
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; | |||
3 | using System.Text; | 3 | using System.Text; |
4 | 4 | ||
5 | using OpenSim.Framework.Types; | 5 | using OpenSim.Framework.Types; |
6 | using OpenSim.RegionServer.Simulator; | ||
7 | using OpenSim.RegionServer.Client; | ||
8 | |||
9 | using libsecondlife; | ||
10 | using libsecondlife.Packets; | ||
6 | 11 | ||
7 | namespace OpenSim.RegionServer.Estate | 12 | namespace 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 | } |