diff options
Diffstat (limited to 'OpenSim/OpenSim.RegionServer')
-rw-r--r-- | OpenSim/OpenSim.RegionServer/Client/ClientView.ProcessPackets.cs | 6 | ||||
-rw-r--r-- | OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs | 48 | ||||
-rw-r--r-- | OpenSim/OpenSim.RegionServer/Simulator/World.cs | 2 |
3 files changed, 55 insertions, 1 deletions
diff --git a/OpenSim/OpenSim.RegionServer/Client/ClientView.ProcessPackets.cs b/OpenSim/OpenSim.RegionServer/Client/ClientView.ProcessPackets.cs index b07749e..306bf63 100644 --- a/OpenSim/OpenSim.RegionServer/Client/ClientView.ProcessPackets.cs +++ b/OpenSim/OpenSim.RegionServer/Client/ClientView.ProcessPackets.cs | |||
@@ -91,7 +91,6 @@ namespace OpenSim.RegionServer.Client | |||
91 | protected override void ProcessInPacket(Packet Pack) | 91 | protected override void ProcessInPacket(Packet Pack) |
92 | { | 92 | { |
93 | ack_pack(Pack); | 93 | ack_pack(Pack); |
94 | debug = true; | ||
95 | if (debug) | 94 | if (debug) |
96 | { | 95 | { |
97 | if (Pack.Type != PacketType.AgentUpdate) | 96 | if (Pack.Type != PacketType.AgentUpdate) |
@@ -490,6 +489,11 @@ namespace OpenSim.RegionServer.Client | |||
490 | break; | 489 | break; |
491 | #endregion | 490 | #endregion |
492 | 491 | ||
492 | #region Estate Packets | ||
493 | case PacketType.EstateOwnerMessage: | ||
494 | this.m_world.estateManager.handleEstateOwnerMessage((EstateOwnerMessagePacket)Pack, this); | ||
495 | break; | ||
496 | #endregion | ||
493 | #region unimplemented handlers | 497 | #region unimplemented handlers |
494 | case PacketType.AgentIsNowWearing: | 498 | case PacketType.AgentIsNowWearing: |
495 | // AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack; | 499 | // AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack; |
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 | } |
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/World.cs b/OpenSim/OpenSim.RegionServer/Simulator/World.cs index b4e4f49..dda8ac4 100644 --- a/OpenSim/OpenSim.RegionServer/Simulator/World.cs +++ b/OpenSim/OpenSim.RegionServer/Simulator/World.cs | |||
@@ -66,6 +66,7 @@ namespace OpenSim.RegionServer.Simulator | |||
66 | private Mutex updateLock; | 66 | private Mutex updateLock; |
67 | public string m_datastore; | 67 | public string m_datastore; |
68 | public OpenSim.RegionServer.Simulator.ParcelManager parcelManager; | 68 | public OpenSim.RegionServer.Simulator.ParcelManager parcelManager; |
69 | public OpenSim.RegionServer.Estate.EstateManager estateManager; | ||
69 | 70 | ||
70 | #region Properties | 71 | #region Properties |
71 | public PhysicsScene PhysScene | 72 | public PhysicsScene PhysScene |
@@ -621,6 +622,7 @@ namespace OpenSim.RegionServer.Simulator | |||
621 | agentClient.OnParcelDivideRequest += new OpenSim.RegionServer.Simulator.ParcelDivideRequest(ParcelDivideRequest); | 622 | agentClient.OnParcelDivideRequest += new OpenSim.RegionServer.Simulator.ParcelDivideRequest(ParcelDivideRequest); |
622 | agentClient.OnParcelJoinRequest+=new OpenSim.RegionServer.Simulator.ParcelJoinRequest(ParcelJoinRequest); | 623 | agentClient.OnParcelJoinRequest+=new OpenSim.RegionServer.Simulator.ParcelJoinRequest(ParcelJoinRequest); |
623 | agentClient.OnParcelPropertiesUpdateRequest += new OpenSim.RegionServer.Simulator.ParcelPropertiesUpdateRequest(ParcelPropertiesUpdateRequest); | 624 | agentClient.OnParcelPropertiesUpdateRequest += new OpenSim.RegionServer.Simulator.ParcelPropertiesUpdateRequest(ParcelPropertiesUpdateRequest); |
625 | |||
624 | Avatar newAvatar = null; | 626 | Avatar newAvatar = null; |
625 | try | 627 | try |
626 | { | 628 | { |