diff options
Diffstat (limited to 'OpenSim')
4 files changed, 59 insertions, 2 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 | { |
diff --git a/OpenSim/OpenSim/OpenSimMain.cs b/OpenSim/OpenSim/OpenSimMain.cs index a310ded..c6ee7e9 100644 --- a/OpenSim/OpenSim/OpenSimMain.cs +++ b/OpenSim/OpenSim/OpenSimMain.cs | |||
@@ -210,7 +210,10 @@ namespace OpenSim | |||
210 | m_console.Warn("Main.cs:Startup() - Grid Mode; Do not know how to get the user's master key yet!"); | 210 | m_console.Warn("Main.cs:Startup() - Grid Mode; Do not know how to get the user's master key yet!"); |
211 | } | 211 | } |
212 | 212 | ||
213 | m_console.Notice("Creating ParcelManager"); | 213 | m_console.Notice("Creating Estate Manager"); |
214 | LocalWorld.estateManager = new OpenSim.RegionServer.Estate.EstateManager(this.LocalWorld); | ||
215 | |||
216 | m_console.Notice("Creating Parcel Manager"); | ||
214 | LocalWorld.parcelManager = new OpenSim.RegionServer.Simulator.ParcelManager(this.LocalWorld); | 217 | LocalWorld.parcelManager = new OpenSim.RegionServer.Simulator.ParcelManager(this.LocalWorld); |
215 | 218 | ||
216 | m_console.Notice("Loading Parcels from DB..."); | 219 | m_console.Notice("Loading Parcels from DB..."); |