aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs (renamed from OpenSim/Region/Environment/EstateManager.cs)1443
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs15
3 files changed, 760 insertions, 712 deletions
diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
index b3ffd10..daabd9b 100644
--- a/OpenSim/Region/Environment/EstateManager.cs
+++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
@@ -1,699 +1,744 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the 12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31
32using libsecondlife.Packets; 32using libsecondlife;
33using log4net; 33using libsecondlife.Packets;
34using OpenSim.Framework; 34using OpenSim.Region.Environment.Interfaces;
35using OpenSim.Region.Environment.Scenes; 35using OpenSim.Region.Environment.Scenes;
36 36using OpenSim.Framework;
37namespace OpenSim.Region.Environment 37using Nini.Config;
38{ 38using log4net;
39 /// <summary> 39
40 /// Processes requests regarding estates. Refer to EstateSettings.cs in OpenSim.Framework. Types for all of the core settings 40namespace OpenSim.Region.Environment.Modules.World.Estate
41 /// </summary> 41{
42 public class EstateManager 42 public class EstateManagementModule : IRegionModule
43 { 43 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private Scene m_scene; 46 private Scene m_scene;
47 private RegionInfo m_regInfo; 47
48 48 public enum EstateAccessCodex : uint
49 public enum EstateAccessCodex : uint 49 {
50 { 50 AccessOptions = 17,
51 AccessOptions = 17, 51 AllowedGroups = 18,
52 AllowedGroups = 18, 52 EstateBans = 20,
53 EstateBans = 20, 53 EstateManagers = 24
54 EstateManagers = 24 54 }
55 } 55
56 56
57 57 #region Helper Functions
58 public EstateManager(Scene scene, RegionInfo reginfo) 58
59 { 59 private bool convertParamStringToBool(byte[] field)
60 m_scene = scene; 60 {
61 m_regInfo = reginfo; 61 string s = Helpers.FieldToUTF8String(field);
62 } 62 if (s == "1" || s.ToLower() == "y" || s.ToLower() == "yes" || s.ToLower() == "t" || s.ToLower() == "true")
63 63 {
64 private bool convertParamStringToBool(byte[] field) 64 return true;
65 { 65 }
66 string s = Helpers.FieldToUTF8String(field); 66 return false;
67 if (s == "1" || s.ToLower() == "y" || s.ToLower() == "yes" || s.ToLower() == "t" || s.ToLower() == "true") 67 }
68 { 68
69 return true; 69 /// <summary>
70 } 70 /// Sets terrain texture heights for each of the four corners of the region - textures are distributed as a linear range between the two heights.
71 return false; 71 /// </summary>
72 } 72 /// <param name="corner">Which corner</param>
73 73 /// <param name="lowValue">Minimum height that texture range should cover</param>
74 /// <summary> 74 /// <param name="highValue">Maximum height that texture range should cover</param>
75 /// Sets terrain texture heights for each of the four corners of the region - textures are distributed as a linear range between the two heights. 75 public void setEstateTextureRange(Int16 corner, float lowValue, float highValue)
76 /// </summary> 76 {
77 /// <param name="corner">Which corner</param> 77 switch (corner)
78 /// <param name="lowValue">Minimum height that texture range should cover</param> 78 {
79 /// <param name="highValue">Maximum height that texture range should cover</param> 79 case 0:
80 public void setEstateTextureRange(Int16 corner, float lowValue, float highValue) 80 m_scene.RegionInfo.EstateSettings.terrainStartHeight0 = lowValue;
81 { 81 m_scene.RegionInfo.EstateSettings.terrainHeightRange0 = highValue;
82 switch (corner) 82 break;
83 { 83 case 1:
84 case 0: 84 m_scene.RegionInfo.EstateSettings.terrainStartHeight1 = lowValue;
85 m_regInfo.EstateSettings.terrainStartHeight0 = lowValue; 85 m_scene.RegionInfo.EstateSettings.terrainHeightRange1 = highValue;
86 m_regInfo.EstateSettings.terrainHeightRange0 = highValue; 86 break;
87 break; 87 case 2:
88 case 1: 88 m_scene.RegionInfo.EstateSettings.terrainStartHeight2 = lowValue;
89 m_regInfo.EstateSettings.terrainStartHeight1 = lowValue; 89 m_scene.RegionInfo.EstateSettings.terrainHeightRange2 = highValue;
90 m_regInfo.EstateSettings.terrainHeightRange1 = highValue; 90 break;
91 break; 91 case 3:
92 case 2: 92 m_scene.RegionInfo.EstateSettings.terrainStartHeight3 = lowValue;
93 m_regInfo.EstateSettings.terrainStartHeight2 = lowValue; 93 m_scene.RegionInfo.EstateSettings.terrainHeightRange3 = highValue;
94 m_regInfo.EstateSettings.terrainHeightRange2 = highValue; 94 break;
95 break; 95 }
96 case 3: 96 }
97 m_regInfo.EstateSettings.terrainStartHeight3 = lowValue; 97
98 m_regInfo.EstateSettings.terrainHeightRange3 = highValue; 98 /// <summary>
99 break; 99 /// Sets the 'detail' terrain texture on each of the bands.
100 } 100 /// </summary>
101 } 101 /// <param name="band">Which texture band</param>
102 102 /// <param name="textureUUID">The UUID of the texture</param>
103 /// <summary> 103 public void setTerrainTexture(Int16 band, LLUUID textureUUID)
104 /// Sets the 'detail' terrain texture on each of the bands. 104 {
105 /// </summary> 105 switch (band)
106 /// <param name="band">Which texture band</param> 106 {
107 /// <param name="textureUUID">The UUID of the texture</param> 107 case 0:
108 public void setTerrainTexture(Int16 band, LLUUID textureUUID) 108 m_scene.RegionInfo.EstateSettings.terrainDetail0 = textureUUID;
109 { 109 break;
110 switch (band) 110 case 1:
111 { 111 m_scene.RegionInfo.EstateSettings.terrainDetail1 = textureUUID;
112 case 0: 112 break;
113 m_regInfo.EstateSettings.terrainDetail0 = textureUUID; 113 case 2:
114 break; 114 m_scene.RegionInfo.EstateSettings.terrainDetail2 = textureUUID;
115 case 1: 115 break;
116 m_regInfo.EstateSettings.terrainDetail1 = textureUUID; 116 case 3:
117 break; 117 m_scene.RegionInfo.EstateSettings.terrainDetail3 = textureUUID;
118 case 2: 118 break;
119 m_regInfo.EstateSettings.terrainDetail2 = textureUUID; 119 }
120 break; 120 }
121 case 3: 121
122 m_regInfo.EstateSettings.terrainDetail3 = textureUUID; 122 /// <summary>
123 break; 123 /// Sets common region settings
124 } 124 /// </summary>
125 } 125 /// <param name="WaterHeight">Water height of the waterplane (may not nessecarily be one value)</param>
126 126 /// <param name="TerrainRaiseLimit">Maximum amount terrain can be raised from previous baking</param>
127 /// <summary> 127 /// <param name="TerrainLowerLimit">Minimum amount terrain can be lowered from previous baking</param>
128 /// Sets common region settings 128 /// <param name="UseFixedSun">Use a fixed time of day on the sun?</param>
129 /// </summary> 129 /// <param name="SunHour">The offset hour of the day</param>
130 /// <param name="WaterHeight">Water height of the waterplane (may not nessecarily be one value)</param> 130 public void setRegionSettings(float WaterHeight, float TerrainRaiseLimit, float TerrainLowerLimit,
131 /// <param name="TerrainRaiseLimit">Maximum amount terrain can be raised from previous baking</param> 131 bool UseFixedSun, float SunHour)
132 /// <param name="TerrainLowerLimit">Minimum amount terrain can be lowered from previous baking</param> 132 {
133 /// <param name="UseFixedSun">Use a fixed time of day on the sun?</param> 133 // Water Height
134 /// <param name="SunHour">The offset hour of the day</param> 134 m_scene.RegionInfo.EstateSettings.waterHeight = WaterHeight;
135 public void setRegionSettings(float WaterHeight, float TerrainRaiseLimit, float TerrainLowerLimit, 135
136 bool UseFixedSun, float SunHour) 136 // Terraforming limits
137 { 137 m_scene.RegionInfo.EstateSettings.terrainRaiseLimit = TerrainRaiseLimit;
138 // Water Height 138 m_scene.RegionInfo.EstateSettings.terrainLowerLimit = TerrainLowerLimit;
139 m_regInfo.EstateSettings.waterHeight = WaterHeight; 139
140 140 // Time of day / fixed sun
141 // Terraforming limits 141 m_scene.RegionInfo.EstateSettings.useFixedSun = UseFixedSun;
142 m_regInfo.EstateSettings.terrainRaiseLimit = TerrainRaiseLimit; 142 m_scene.RegionInfo.EstateSettings.sunHour = SunHour;
143 m_regInfo.EstateSettings.terrainLowerLimit = TerrainLowerLimit; 143 }
144 144 #endregion
145 // Time of day / fixed sun 145
146 m_regInfo.EstateSettings.useFixedSun = UseFixedSun; 146 #region Packet Handlers
147 m_regInfo.EstateSettings.sunHour = SunHour; 147
148 } 148 public void handleEstateOwnerMessage(EstateOwnerMessagePacket packet, IClientAPI remote_client)
149 149 {
150 #region Packet Handlers 150 switch (Helpers.FieldToUTF8String(packet.MethodData.Method))
151 151 {
152 public void handleEstateOwnerMessage(EstateOwnerMessagePacket packet, IClientAPI remote_client) 152 case "getinfo":
153 { 153
154 switch (Helpers.FieldToUTF8String(packet.MethodData.Method)) 154 //System.Console.WriteLine("[ESTATE]: CLIENT--->" + packet.ToString());
155 { 155 //sendRegionInfoPacketToAll();
156 case "getinfo": 156 if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId))
157 157 {
158 //System.Console.WriteLine("[ESTATE]: CLIENT--->" + packet.ToString()); 158 sendDetailedEstateData(remote_client, packet);
159 //sendRegionInfoPacketToAll(); 159 }
160 if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) 160 break;
161 { 161 case "setregioninfo":
162 sendDetailedEstateData(remote_client, packet); 162 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId))
163 } 163 estateSetRegionInfoHandler(packet);
164 break; 164 break;
165 case "setregioninfo": 165 case "texturebase":
166 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId)) 166 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId))
167 estateSetRegionInfoHandler(packet); 167 estateTextureBaseHandler(packet);
168 break; 168 break;
169 case "texturebase": 169 case "texturedetail":
170 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId)) 170 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId))
171 estateTextureBaseHandler(packet); 171 estateTextureDetailHandler(packet);
172 break; 172 break;
173 case "texturedetail": 173 case "textureheights":
174 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId)) 174 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId))
175 estateTextureDetailHandler(packet); 175 estateTextureHeightsHandler(packet);
176 break; 176 break;
177 case "textureheights": 177 case "texturecommit":
178 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId)) 178 sendRegionHandshakeToAll();
179 estateTextureHeightsHandler(packet); 179 break;
180 break; 180 case "setregionterrain":
181 case "texturecommit": 181 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId))
182 sendRegionHandshakeToAll(); 182 estateSetRegionTerrainHandler(packet);
183 break; 183 break;
184 case "setregionterrain": 184 case "restart":
185 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId)) 185 if (m_scene.PermissionsMngr.CanRestartSim(remote_client.AgentId))
186 estateSetRegionTerrainHandler(packet); 186 {
187 break; 187 estateRestartSim(packet);
188 case "restart": 188 }
189 if (m_scene.PermissionsMngr.CanRestartSim(remote_client.AgentId)) 189 break;
190 { 190 case "estatechangecovenantid":
191 estateRestartSim(packet); 191 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId))
192 } 192 {
193 break; 193 EstateChangeCovenant(packet);
194 case "estatechangecovenantid": 194 }
195 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId)) 195 break;
196 { 196 case "estateaccessdelta": // Estate access delta manages the banlist and allow list too.
197 EstateChangeCovenant(packet); 197 if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId))
198 } 198 {
199 break; 199 estateAccessDelta(remote_client, packet);
200 case "estateaccessdelta": // Estate access delta manages the banlist and allow list too. 200 }
201 if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) 201 break;
202 { 202 case "simulatormessage":
203 estateAccessDelta(remote_client, packet); 203 if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId))
204 } 204 {
205 break; 205 SendSimulatorBlueBoxMessage(remote_client, packet);
206 case "simulatormessage": 206 }
207 if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) 207 break;
208 { 208 case "instantmessage":
209 SendSimulatorBlueBoxMessage(remote_client, packet); 209 if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId))
210 } 210 {
211 break; 211 SendEstateBlueBoxMessage(remote_client, packet);
212 case "instantmessage": 212 }
213 if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) 213 break;
214 { 214 case "setregiondebug":
215 SendEstateBlueBoxMessage(remote_client, packet); 215 if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId))
216 } 216 {
217 break; 217 SetRegionDebug(remote_client, packet);
218 case "setregiondebug": 218 }
219 if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) 219 break;
220 { 220 case "teleporthomeuser":
221 SetRegionDebug(remote_client, packet); 221 if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId))
222 } 222 {
223 break; 223 TeleportOneUserHome(remote_client, packet);
224 case "teleporthomeuser": 224 }
225 if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) 225 break;
226 { 226 default:
227 TeleportOneUserHome(remote_client,packet); 227 m_log.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
228 } 228 break;
229 break; 229 }
230 default: 230
231 m_log.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); 231
232 break; 232 }
233 } 233
234 234 private void TeleportOneUserHome(object remove_client, EstateOwnerMessagePacket packet)
235 235 {
236 } 236 LLUUID invoice = packet.MethodData.Invoice;
237 237 LLUUID SenderID = packet.AgentData.AgentID;
238 private void TeleportOneUserHome(object remove_client,EstateOwnerMessagePacket packet) 238 LLUUID Prey = LLUUID.Zero;
239 { 239
240 LLUUID invoice = packet.MethodData.Invoice; 240 Helpers.TryParse(Helpers.FieldToUTF8String(packet.ParamList[1].Parameter), out Prey);
241 LLUUID SenderID = packet.AgentData.AgentID; 241 if (Prey != LLUUID.Zero)
242 LLUUID Prey = LLUUID.Zero; 242 {
243 243 ScenePresence s = m_scene.GetScenePresence(Prey);
244 Helpers.TryParse(Helpers.FieldToUTF8String(packet.ParamList[1].Parameter),out Prey); 244 if (s != null)
245 if (Prey != LLUUID.Zero) 245 {
246 { 246 m_scene.TeleportClientHome(Prey, s.ControllingClient);
247 ScenePresence s = m_scene.GetScenePresence(Prey); 247 }
248 if (s != null) 248 }
249 { 249 }
250 m_scene.TeleportClientHome(Prey, s.ControllingClient); 250
251 } 251 private void SetRegionDebug(IClientAPI remote_client, EstateOwnerMessagePacket packet)
252 } 252 {
253 } 253 LLUUID invoice = packet.MethodData.Invoice;
254 254 LLUUID SenderID = packet.AgentData.AgentID;
255 private void SetRegionDebug(IClientAPI remote_client, EstateOwnerMessagePacket packet) 255 bool scripted = convertParamStringToBool(packet.ParamList[0].Parameter);
256 { 256 bool collisionEvents = convertParamStringToBool(packet.ParamList[1].Parameter);
257 LLUUID invoice = packet.MethodData.Invoice; 257 bool physics = convertParamStringToBool(packet.ParamList[2].Parameter);
258 LLUUID SenderID = packet.AgentData.AgentID; 258
259 bool scripted = convertParamStringToBool(packet.ParamList[0].Parameter); 259 if (physics)
260 bool collisionEvents = convertParamStringToBool(packet.ParamList[1].Parameter); 260 {
261 bool physics = convertParamStringToBool(packet.ParamList[2].Parameter); 261 m_scene.RegionInfo.EstateSettings.regionFlags |= Simulator.RegionFlags.SkipPhysics;
262 262 }
263 if (physics) 263 else
264 { 264 {
265 m_scene.RegionInfo.EstateSettings.regionFlags |= Simulator.RegionFlags.SkipPhysics; 265 m_scene.RegionInfo.EstateSettings.regionFlags &= ~Simulator.RegionFlags.SkipPhysics;
266 } 266 }
267 else 267
268 { 268 if (scripted)
269 m_scene.RegionInfo.EstateSettings.regionFlags &= ~Simulator.RegionFlags.SkipPhysics; 269 {
270 } 270 m_scene.RegionInfo.EstateSettings.regionFlags |= Simulator.RegionFlags.SkipScripts;
271 271 }
272 if (scripted) 272 else
273 { 273 {
274 m_scene.RegionInfo.EstateSettings.regionFlags |= Simulator.RegionFlags.SkipScripts; 274 m_scene.RegionInfo.EstateSettings.regionFlags &= ~Simulator.RegionFlags.SkipScripts;
275 } 275 }
276 else 276
277 { 277
278 m_scene.RegionInfo.EstateSettings.regionFlags &= ~Simulator.RegionFlags.SkipScripts; 278 m_scene.SetSceneCoreDebug(scripted, collisionEvents, physics);
279 } 279 }
280 280
281 281 private void SendSimulatorBlueBoxMessage(IClientAPI remote_client, EstateOwnerMessagePacket packet)
282 m_scene.SetSceneCoreDebug(scripted, collisionEvents, physics); 282 {
283 } 283 LLUUID invoice = packet.MethodData.Invoice;
284 284 LLUUID SenderID = new LLUUID(Helpers.FieldToUTF8String(packet.ParamList[2].Parameter));
285 private void SendSimulatorBlueBoxMessage(IClientAPI remote_client, EstateOwnerMessagePacket packet) 285 string SenderName = Helpers.FieldToUTF8String(packet.ParamList[3].Parameter);
286 { 286 string Message = Helpers.FieldToUTF8String(packet.ParamList[4].Parameter);
287 LLUUID invoice = packet.MethodData.Invoice; 287 m_scene.SendRegionMessageFromEstateTools(SenderID, packet.AgentData.SessionID, SenderName, Message);
288 LLUUID SenderID = new LLUUID(Helpers.FieldToUTF8String(packet.ParamList[2].Parameter)); 288
289 string SenderName = Helpers.FieldToUTF8String(packet.ParamList[3].Parameter); 289 }
290 string Message = Helpers.FieldToUTF8String(packet.ParamList[4].Parameter); 290 private void SendEstateBlueBoxMessage(IClientAPI remote_client, EstateOwnerMessagePacket packet)
291 m_scene.SendRegionMessageFromEstateTools(SenderID, packet.AgentData.SessionID, SenderName, Message); 291 {
292 292 LLUUID invoice = packet.MethodData.Invoice;
293 } 293 LLUUID SenderID = packet.AgentData.AgentID;
294 private void SendEstateBlueBoxMessage(IClientAPI remote_client, EstateOwnerMessagePacket packet) 294 string SenderName = Helpers.FieldToUTF8String(packet.ParamList[0].Parameter);
295 { 295 string Message = Helpers.FieldToUTF8String(packet.ParamList[1].Parameter);
296 LLUUID invoice = packet.MethodData.Invoice; 296 m_scene.SendEstateMessageFromEstateTools(SenderID, packet.AgentData.SessionID, SenderName, Message);
297 LLUUID SenderID = packet.AgentData.AgentID; 297
298 string SenderName = Helpers.FieldToUTF8String(packet.ParamList[0].Parameter); 298 }
299 string Message = Helpers.FieldToUTF8String(packet.ParamList[1].Parameter); 299 private void sendDetailedEstateData(IClientAPI remote_client, EstateOwnerMessagePacket packet)
300 m_scene.SendEstateMessageFromEstateTools(SenderID, packet.AgentData.SessionID, SenderName, Message); 300 {
301 301
302 } 302 LLUUID invoice = packet.MethodData.Invoice;
303 private void sendDetailedEstateData(IClientAPI remote_client, EstateOwnerMessagePacket packet) 303 packet.AgentData.TransactionID = LLUUID.Random();
304 { 304 packet.MethodData.Method = Helpers.StringToField("estateupdateinfo");
305 305 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[9];
306 LLUUID invoice = packet.MethodData.Invoice; 306
307 packet.AgentData.TransactionID = LLUUID.Random(); 307 for (int i = 0; i < 9; i++)
308 packet.MethodData.Method = Helpers.StringToField("estateupdateinfo"); 308 {
309 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[9]; 309 returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock();
310 310 }
311 for (int i = 0; i < 9; i++) 311
312 { 312 //Sending Estate Settings
313 returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); 313 returnblock[0].Parameter = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.estateName);
314 } 314 returnblock[1].Parameter = Helpers.StringToField(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString());
315 315 returnblock[2].Parameter = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.estateID.ToString());
316 //Sending Estate Settings 316
317 returnblock[0].Parameter = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.estateName); 317 // TODO: Resolve Magic numbers here
318 returnblock[1].Parameter = Helpers.StringToField(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString()); 318 returnblock[3].Parameter = Helpers.StringToField("269516800");
319 returnblock[2].Parameter = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.estateID.ToString()); 319 returnblock[4].Parameter = Helpers.StringToField("0");
320 320 returnblock[5].Parameter = Helpers.StringToField("1");
321 // TODO: Resolve Magic numbers here 321 returnblock[6].Parameter = Helpers.StringToField(m_scene.RegionInfo.RegionID.ToString());
322 returnblock[3].Parameter = Helpers.StringToField("269516800"); 322 returnblock[7].Parameter = Helpers.StringToField("1160895077");
323 returnblock[4].Parameter = Helpers.StringToField("0"); 323 returnblock[8].Parameter = Helpers.StringToField("1");
324 returnblock[5].Parameter = Helpers.StringToField("1"); 324
325 returnblock[6].Parameter = Helpers.StringToField(m_scene.RegionInfo.RegionID.ToString()); 325 packet.ParamList = returnblock;
326 returnblock[7].Parameter = Helpers.StringToField("1160895077"); 326 packet.Header.Reliable = false;
327 returnblock[8].Parameter = Helpers.StringToField("1"); 327 //System.Console.WriteLine("[ESTATE]: SIM--->" + packet.ToString());
328 328 remote_client.OutPacket(packet, ThrottleOutPacketType.Task);
329 packet.ParamList = returnblock; 329
330 packet.Header.Reliable = false; 330 sendEstateManagerList(remote_client, packet);
331 //System.Console.WriteLine("[ESTATE]: SIM--->" + packet.ToString()); 331
332 remote_client.OutPacket(packet, ThrottleOutPacketType.Task); 332 }
333 333
334 sendEstateManagerList(remote_client, packet); 334 private void sendEstateManagerList(IClientAPI remote_client, EstateOwnerMessagePacket packet)
335 335 {
336 } 336 LLUUID invoice = packet.MethodData.Invoice;
337 337
338 private void sendEstateManagerList(IClientAPI remote_client, EstateOwnerMessagePacket packet) 338 //Sending Estate Managers
339 { 339 packet = new EstateOwnerMessagePacket();
340 LLUUID invoice = packet.MethodData.Invoice; 340 packet.AgentData.TransactionID = LLUUID.Random();
341 341 packet.AgentData.AgentID = remote_client.AgentId;
342 //Sending Estate Managers 342 packet.AgentData.SessionID = remote_client.SessionId;
343 packet = new EstateOwnerMessagePacket(); 343 packet.MethodData.Invoice = invoice;
344 packet.AgentData.TransactionID = LLUUID.Random(); 344 packet.MethodData.Method = Helpers.StringToField("setaccess");
345 packet.AgentData.AgentID = remote_client.AgentId; 345
346 packet.AgentData.SessionID = remote_client.SessionId; 346 LLUUID[] EstateManagers = m_scene.RegionInfo.EstateSettings.estateManagers;
347 packet.MethodData.Invoice = invoice; 347
348 packet.MethodData.Method = Helpers.StringToField("setaccess"); 348 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + EstateManagers.Length];
349 349
350 LLUUID[] EstateManagers = m_scene.RegionInfo.EstateSettings.estateManagers; 350 for (int i = 0; i < (6 + EstateManagers.Length); i++)
351 351 {
352 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + EstateManagers.Length]; 352 returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock();
353 353 }
354 for (int i = 0; i < (6 + EstateManagers.Length); i++) 354 int j = 0;
355 { 355
356 returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); 356 returnblock[j].Parameter = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.estateID.ToString()); j++;
357 } 357 returnblock[j].Parameter = Helpers.StringToField(((int)EstateAccessCodex.EstateManagers).ToString()); j++;
358 int j = 0; 358 returnblock[j].Parameter = Helpers.StringToField("0"); j++;
359 359 returnblock[j].Parameter = Helpers.StringToField("0"); j++;
360 returnblock[j].Parameter = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.estateID.ToString()); j++; 360 returnblock[j].Parameter = Helpers.StringToField("0"); j++;
361 returnblock[j].Parameter = Helpers.StringToField(((int)EstateAccessCodex.EstateManagers).ToString()); j++; 361 returnblock[j].Parameter = Helpers.StringToField(EstateManagers.Length.ToString()); j++;
362 returnblock[j].Parameter = Helpers.StringToField("0"); j++; 362 for (int i = 0; i < EstateManagers.Length; i++)
363 returnblock[j].Parameter = Helpers.StringToField("0"); j++; 363 {
364 returnblock[j].Parameter = Helpers.StringToField("0"); j++; 364 returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++;
365 returnblock[j].Parameter = Helpers.StringToField(EstateManagers.Length.ToString()); j++; 365 }
366 for (int i = 0; i < EstateManagers.Length; i++) 366 packet.ParamList = returnblock;
367 { 367 packet.Header.Reliable = false;
368 returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; 368 //System.Console.WriteLine("[ESTATE]: SIM--->" + packet.ToString());
369 } 369 remote_client.OutPacket(packet, ThrottleOutPacketType.Task);
370 packet.ParamList = returnblock; 370 }
371 packet.Header.Reliable = false; 371
372 //System.Console.WriteLine("[ESTATE]: SIM--->" + packet.ToString()); 372 private void estateAccessDelta(IClientAPI remote_client, EstateOwnerMessagePacket packet)
373 remote_client.OutPacket(packet, ThrottleOutPacketType.Task); 373 {
374 } 374 // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc.
375 375 int estateAccessType = Convert.ToInt16(Helpers.FieldToUTF8String(packet.ParamList[1].Parameter));
376 private void estateAccessDelta(IClientAPI remote_client, EstateOwnerMessagePacket packet) 376
377 { 377 switch (estateAccessType)
378 // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc. 378 {
379 int estateAccessType = Convert.ToInt16(Helpers.FieldToUTF8String(packet.ParamList[1].Parameter)); 379 case 256:
380 380
381 switch (estateAccessType) 381 // This needs to be updated for SuperEstateOwnerUser.. a non existing user in the estatesettings.xml
382 { 382 // So make sure you really trust your region owners. because they can add other estate manaagers to your other estates
383 case 256: 383 if (packet.AgentData.AgentID == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.PermissionsMngr.BypassPermissions)
384 384 {
385 // This needs to be updated for SuperEstateOwnerUser.. a non existing user in the estatesettings.xml 385 m_scene.RegionInfo.EstateSettings.AddEstateManager(new LLUUID(Helpers.FieldToUTF8String(packet.ParamList[2].Parameter)));
386 // So make sure you really trust your region owners. because they can add other estate manaagers to your other estates 386 sendEstateManagerList(remote_client, packet);
387 if (packet.AgentData.AgentID == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.PermissionsMngr.BypassPermissions) 387 }
388 { 388 else
389 m_scene.RegionInfo.EstateSettings.AddEstateManager(new LLUUID(Helpers.FieldToUTF8String(packet.ParamList[2].Parameter))); 389 {
390 sendEstateManagerList(remote_client, packet); 390 remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions");
391 } 391 }
392 else 392
393 { 393 break;
394 remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); 394 case 512:
395 } 395 // This needs to be updated for SuperEstateOwnerUser.. a non existing user in the estatesettings.xml
396 396 // So make sure you really trust your region owners. because they can add other estate manaagers to your other estates
397 break; 397 if (packet.AgentData.AgentID == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.PermissionsMngr.BypassPermissions)
398 case 512: 398 {
399 // This needs to be updated for SuperEstateOwnerUser.. a non existing user in the estatesettings.xml 399 m_scene.RegionInfo.EstateSettings.RemoveEstateManager(new LLUUID(Helpers.FieldToUTF8String(packet.ParamList[2].Parameter)));
400 // So make sure you really trust your region owners. because they can add other estate manaagers to your other estates 400 sendEstateManagerList(remote_client, packet);
401 if (packet.AgentData.AgentID == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.PermissionsMngr.BypassPermissions) 401 }
402 { 402 else
403 m_scene.RegionInfo.EstateSettings.RemoveEstateManager(new LLUUID(Helpers.FieldToUTF8String(packet.ParamList[2].Parameter))); 403 {
404 sendEstateManagerList(remote_client, packet); 404 remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions");
405 } 405 }
406 else 406 break;
407 { 407
408 remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); 408 default:
409 } 409
410 break; 410 m_log.Error("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta\n" + packet.ToString());
411 411 break;
412 default: 412 }
413 413 //m_log.Error("EstateOwnerMessage: estateAccessDelta\n" + packet.ToString());
414 m_log.Error("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta\n" + packet.ToString()); 414
415 break; 415
416 } 416 }
417 //m_log.Error("EstateOwnerMessage: estateAccessDelta\n" + packet.ToString()); 417 private void estateSetRegionInfoHandler(EstateOwnerMessagePacket packet)
418 418 {
419 419 if (packet.ParamList.Length != 9)
420 } 420 {
421 private void estateSetRegionInfoHandler(EstateOwnerMessagePacket packet) 421 m_log.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length");
422 { 422 }
423 if (packet.ParamList.Length != 9) 423 else
424 { 424 {
425 m_log.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length"); 425 m_scene.RegionInfo.EstateSettings.regionFlags = Simulator.RegionFlags.None;
426 } 426
427 else 427 if (convertParamStringToBool(packet.ParamList[0].Parameter))
428 { 428 {
429 m_regInfo.EstateSettings.regionFlags = Simulator.RegionFlags.None; 429 m_scene.RegionInfo.EstateSettings.regionFlags = m_scene.RegionInfo.EstateSettings.regionFlags |
430 430 Simulator.RegionFlags.BlockTerraform;
431 if (convertParamStringToBool(packet.ParamList[0].Parameter)) 431 }
432 { 432
433 m_regInfo.EstateSettings.regionFlags = m_regInfo.EstateSettings.regionFlags | 433 if (convertParamStringToBool(packet.ParamList[1].Parameter))
434 Simulator.RegionFlags.BlockTerraform; 434 {
435 } 435 m_scene.RegionInfo.EstateSettings.regionFlags = m_scene.RegionInfo.EstateSettings.regionFlags |
436 436 Simulator.RegionFlags.NoFly;
437 if (convertParamStringToBool(packet.ParamList[1].Parameter)) 437 }
438 { 438
439 m_regInfo.EstateSettings.regionFlags = m_regInfo.EstateSettings.regionFlags | 439 if (convertParamStringToBool(packet.ParamList[2].Parameter))
440 Simulator.RegionFlags.NoFly; 440 {
441 } 441 m_scene.RegionInfo.EstateSettings.regionFlags = m_scene.RegionInfo.EstateSettings.regionFlags |
442 442 Simulator.RegionFlags.AllowDamage;
443 if (convertParamStringToBool(packet.ParamList[2].Parameter)) 443 }
444 { 444
445 m_regInfo.EstateSettings.regionFlags = m_regInfo.EstateSettings.regionFlags | 445 if (convertParamStringToBool(packet.ParamList[3].Parameter) == false)
446 Simulator.RegionFlags.AllowDamage; 446 {
447 } 447 m_scene.RegionInfo.EstateSettings.regionFlags = m_scene.RegionInfo.EstateSettings.regionFlags |
448 448 Simulator.RegionFlags.BlockLandResell;
449 if (convertParamStringToBool(packet.ParamList[3].Parameter) == false) 449 }
450 { 450
451 m_regInfo.EstateSettings.regionFlags = m_regInfo.EstateSettings.regionFlags | 451
452 Simulator.RegionFlags.BlockLandResell; 452 int tempMaxAgents =
453 } 453 Convert.ToInt16(Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[4].Parameter)));
454 454 m_scene.RegionInfo.EstateSettings.maxAgents = (byte)tempMaxAgents;
455 455
456 int tempMaxAgents = 456 float tempObjectBonusFactor =
457 Convert.ToInt16(Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[4].Parameter))); 457 (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter));
458 m_regInfo.EstateSettings.maxAgents = (byte) tempMaxAgents; 458 m_scene.RegionInfo.EstateSettings.objectBonusFactor = tempObjectBonusFactor;
459 459
460 float tempObjectBonusFactor = 460 int tempMatureLevel = Convert.ToInt16(Helpers.FieldToUTF8String(packet.ParamList[6].Parameter));
461 (float) Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter)); 461 m_scene.RegionInfo.EstateSettings.simAccess = (Simulator.SimAccess)tempMatureLevel;
462 m_regInfo.EstateSettings.objectBonusFactor = tempObjectBonusFactor; 462
463 463
464 int tempMatureLevel = Convert.ToInt16(Helpers.FieldToUTF8String(packet.ParamList[6].Parameter)); 464 if (convertParamStringToBool(packet.ParamList[7].Parameter))
465 m_regInfo.EstateSettings.simAccess = (Simulator.SimAccess) tempMatureLevel; 465 {
466 466 m_scene.RegionInfo.EstateSettings.regionFlags = m_scene.RegionInfo.EstateSettings.regionFlags |
467 467 Simulator.RegionFlags.RestrictPushObject;
468 if (convertParamStringToBool(packet.ParamList[7].Parameter)) 468 }
469 { 469
470 m_regInfo.EstateSettings.regionFlags = m_regInfo.EstateSettings.regionFlags | 470 if (convertParamStringToBool(packet.ParamList[8].Parameter))
471 Simulator.RegionFlags.RestrictPushObject; 471 {
472 } 472 m_scene.RegionInfo.EstateSettings.regionFlags = m_scene.RegionInfo.EstateSettings.regionFlags |
473 473 Simulator.RegionFlags.AllowParcelChanges;
474 if (convertParamStringToBool(packet.ParamList[8].Parameter)) 474 }
475 { 475
476 m_regInfo.EstateSettings.regionFlags = m_regInfo.EstateSettings.regionFlags | 476 sendRegionInfoPacketToAll();
477 Simulator.RegionFlags.AllowParcelChanges; 477 }
478 } 478 }
479 479
480 sendRegionInfoPacketToAll(); 480 private void estateSetRegionTerrainHandler(EstateOwnerMessagePacket packet)
481 } 481 {
482 } 482 if (packet.ParamList.Length != 9)
483 483 {
484 private void estateSetRegionTerrainHandler(EstateOwnerMessagePacket packet) 484 m_log.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length");
485 { 485 }
486 if (packet.ParamList.Length != 9) 486 else
487 { 487 {
488 m_log.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length"); 488 try
489 } 489 {
490 else 490 string tmp;
491 { 491 tmp = Helpers.FieldToUTF8String(packet.ParamList[0].Parameter);
492 try 492 if (!tmp.Contains(".")) tmp += ".00";
493 { 493 float WaterHeight = (float)Convert.ToDecimal(tmp);
494 string tmp; 494 tmp = Helpers.FieldToUTF8String(packet.ParamList[1].Parameter);
495 tmp = Helpers.FieldToUTF8String(packet.ParamList[0].Parameter); 495 if (!tmp.Contains(".")) tmp += ".00";
496 if (!tmp.Contains(".")) tmp += ".00"; 496 float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp);
497 float WaterHeight = (float)Convert.ToDecimal(tmp); 497 tmp = Helpers.FieldToUTF8String(packet.ParamList[2].Parameter);
498 tmp = Helpers.FieldToUTF8String(packet.ParamList[1].Parameter); 498 if (!tmp.Contains(".")) tmp += ".00";
499 if (!tmp.Contains(".")) tmp += ".00"; 499 float TerrainLowerLimit = (float)Convert.ToDecimal(tmp);
500 float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp); 500 bool UseFixedSun = convertParamStringToBool(packet.ParamList[4].Parameter);
501 tmp = Helpers.FieldToUTF8String(packet.ParamList[2].Parameter); 501 float SunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter));
502 if (!tmp.Contains(".")) tmp += ".00"; 502
503 float TerrainLowerLimit = (float)Convert.ToDecimal(tmp); 503 setRegionSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseFixedSun, SunHour);
504 bool UseFixedSun = convertParamStringToBool(packet.ParamList[4].Parameter); 504
505 float SunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter)); 505 sendRegionInfoPacketToAll();
506 506 }
507 setRegionSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseFixedSun, SunHour); 507 catch (Exception ex)
508 508 {
509 sendRegionInfoPacketToAll(); 509 m_log.Error("EstateManager: Exception while setting terrain settings: \n" + packet.ToString() + "\n" + ex.ToString());
510 } 510 }
511 catch (Exception ex) 511 }
512 { 512 }
513 m_log.Error("EstateManager: Exception while setting terrain settings: \n" + packet.ToString() + "\n" + ex.ToString()); 513
514 } 514 private void estateTextureHeightsHandler(EstateOwnerMessagePacket packet)
515 } 515 {
516 } 516 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
517 517 {
518 private void estateTextureHeightsHandler(EstateOwnerMessagePacket packet) 518 string s = Helpers.FieldToUTF8String(block.Parameter);
519 { 519 string[] splitField = s.Split(' ');
520 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList) 520 if (splitField.Length == 3)
521 { 521 {
522 string s = Helpers.FieldToUTF8String(block.Parameter); 522 Int16 corner = Convert.ToInt16(splitField[0]);
523 string[] splitField = s.Split(' '); 523 float lowValue = (float)Convert.ToDecimal(splitField[1]);
524 if (splitField.Length == 3) 524 float highValue = (float)Convert.ToDecimal(splitField[2]);
525 { 525
526 Int16 corner = Convert.ToInt16(splitField[0]); 526 setEstateTextureRange(corner, lowValue, highValue);
527 float lowValue = (float) Convert.ToDecimal(splitField[1]); 527 }
528 float highValue = (float) Convert.ToDecimal(splitField[2]); 528 }
529 529 }
530 setEstateTextureRange(corner, lowValue, highValue); 530
531 } 531 private void estateTextureDetailHandler(EstateOwnerMessagePacket packet)
532 } 532 {
533 } 533 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
534 534 {
535 private void estateTextureDetailHandler(EstateOwnerMessagePacket packet) 535 string s = Helpers.FieldToUTF8String(block.Parameter);
536 { 536 string[] splitField = s.Split(' ');
537 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList) 537 if (splitField.Length == 2)
538 { 538 {
539 string s = Helpers.FieldToUTF8String(block.Parameter); 539 Int16 corner = Convert.ToInt16(splitField[0]);
540 string[] splitField = s.Split(' '); 540 LLUUID textureUUID = new LLUUID(splitField[1]);
541 if (splitField.Length == 2) 541
542 { 542 setTerrainTexture(corner, textureUUID);
543 Int16 corner = Convert.ToInt16(splitField[0]); 543 }
544 LLUUID textureUUID = new LLUUID(splitField[1]); 544 }
545 545 }
546 setTerrainTexture(corner, textureUUID); 546
547 } 547 private void estateTextureBaseHandler(EstateOwnerMessagePacket packet)
548 } 548 {
549 } 549 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
550 550 {
551 private void estateTextureBaseHandler(EstateOwnerMessagePacket packet) 551 string s = Helpers.FieldToUTF8String(block.Parameter);
552 { 552 string[] splitField = s.Split(' ');
553 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList) 553 if (splitField.Length == 2)
554 { 554 {
555 string s = Helpers.FieldToUTF8String(block.Parameter); 555 LLUUID tempUUID = new LLUUID(splitField[1]);
556 string[] splitField = s.Split(' '); 556 switch (Convert.ToInt16(splitField[0]))
557 if (splitField.Length == 2) 557 {
558 { 558 case 0:
559 LLUUID tempUUID = new LLUUID(splitField[1]); 559 m_scene.RegionInfo.EstateSettings.terrainBase0 = tempUUID;
560 switch (Convert.ToInt16(splitField[0])) 560 break;
561 { 561 case 1:
562 case 0: 562 m_scene.RegionInfo.EstateSettings.terrainBase1 = tempUUID;
563 m_regInfo.EstateSettings.terrainBase0 = tempUUID; 563 break;
564 break; 564 case 2:
565 case 1: 565 m_scene.RegionInfo.EstateSettings.terrainBase2 = tempUUID;
566 m_regInfo.EstateSettings.terrainBase1 = tempUUID; 566 break;
567 break; 567 case 3:
568 case 2: 568 m_scene.RegionInfo.EstateSettings.terrainBase3 = tempUUID;
569 m_regInfo.EstateSettings.terrainBase2 = tempUUID; 569 break;
570 break; 570 }
571 case 3: 571 }
572 m_regInfo.EstateSettings.terrainBase3 = tempUUID; 572 }
573 break; 573 }
574 } 574
575 } 575 private void estateRestartSim(EstateOwnerMessagePacket packet)
576 } 576 {
577 } 577 // There's only 1 block in the estateResetSim.. and that's the number of seconds till restart.
578 578 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
579 private void estateRestartSim(EstateOwnerMessagePacket packet) 579 {
580 { 580 float timeSeconds = 0;
581 // There's only 1 block in the estateResetSim.. and that's the number of seconds till restart. 581 Helpers.TryParse(Helpers.FieldToUTF8String(block.Parameter), out timeSeconds);
582 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList) 582 timeSeconds = (int)timeSeconds;
583 { 583 m_scene.Restart(timeSeconds);
584 float timeSeconds = 0; 584
585 Helpers.TryParse(Helpers.FieldToUTF8String(block.Parameter), out timeSeconds); 585 }
586 timeSeconds = (int)timeSeconds; 586 }
587 m_scene.Restart(timeSeconds); 587
588 588 private void EstateChangeCovenant(EstateOwnerMessagePacket packet)
589 } 589 {
590 } 590 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
591 591 {
592 private void EstateChangeCovenant(EstateOwnerMessagePacket packet) 592 LLUUID newCovenantID = new LLUUID(Helpers.FieldToUTF8String(block.Parameter));
593 { 593 m_scene.RegionInfo.CovenantID = newCovenantID;
594 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList) 594 m_scene.RegionInfo.SaveEstatecovenantUUID(newCovenantID);
595 { 595 }
596 LLUUID newCovenantID = new LLUUID(Helpers.FieldToUTF8String(block.Parameter)); 596 }
597 m_regInfo.CovenantID = newCovenantID; 597
598 m_scene.RegionInfo.SaveEstatecovenantUUID(newCovenantID); 598 public void HandleRegionInfoRequest(IClientAPI client, LLUUID sessionID)
599 } 599 {
600 } 600 RegionInfoPacket rinfopack = new RegionInfoPacket();
601 601 RegionInfoPacket.RegionInfoBlock rinfoblk = new RegionInfoPacket.RegionInfoBlock();
602 public void HandleRegionInfoRequest(IClientAPI client, LLUUID sessionID) 602 rinfopack.AgentData.AgentID = client.AgentId;
603 { 603 rinfopack.AgentData.SessionID = client.SessionId;
604 RegionInfoPacket rinfopack = new RegionInfoPacket(); 604 rinfoblk.BillableFactor = m_scene.RegionInfo.EstateSettings.billableFactor;
605 RegionInfoPacket.RegionInfoBlock rinfoblk = new RegionInfoPacket.RegionInfoBlock(); 605 rinfoblk.EstateID = m_scene.RegionInfo.EstateSettings.estateID;
606 rinfopack.AgentData.AgentID = client.AgentId; 606 rinfoblk.MaxAgents = m_scene.RegionInfo.EstateSettings.maxAgents;
607 rinfopack.AgentData.SessionID = client.SessionId; 607 rinfoblk.ObjectBonusFactor = m_scene.RegionInfo.EstateSettings.objectBonusFactor;
608 rinfoblk.BillableFactor = m_regInfo.EstateSettings.billableFactor; 608 rinfoblk.ParentEstateID = m_scene.RegionInfo.EstateSettings.parentEstateID;
609 rinfoblk.EstateID = m_regInfo.EstateSettings.estateID; 609 rinfoblk.PricePerMeter = m_scene.RegionInfo.EstateSettings.pricePerMeter;
610 rinfoblk.MaxAgents = m_regInfo.EstateSettings.maxAgents; 610 rinfoblk.RedirectGridX = m_scene.RegionInfo.EstateSettings.redirectGridX;
611 rinfoblk.ObjectBonusFactor = m_regInfo.EstateSettings.objectBonusFactor; 611 rinfoblk.RedirectGridY = m_scene.RegionInfo.EstateSettings.redirectGridY;
612 rinfoblk.ParentEstateID = m_regInfo.EstateSettings.parentEstateID; 612 rinfoblk.RegionFlags = (uint)(m_scene.RegionInfo.EstateSettings.regionFlags);
613 rinfoblk.PricePerMeter = m_regInfo.EstateSettings.pricePerMeter; 613 rinfoblk.SimAccess = (byte)m_scene.RegionInfo.EstateSettings.simAccess;
614 rinfoblk.RedirectGridX = m_regInfo.EstateSettings.redirectGridX; 614 rinfoblk.SunHour = m_scene.RegionInfo.EstateSettings.sunHour;
615 rinfoblk.RedirectGridY = m_regInfo.EstateSettings.redirectGridY; 615 rinfoblk.TerrainLowerLimit = m_scene.RegionInfo.EstateSettings.terrainLowerLimit;
616 rinfoblk.RegionFlags = (uint)( m_regInfo.EstateSettings.regionFlags); 616 rinfoblk.TerrainRaiseLimit = m_scene.RegionInfo.EstateSettings.terrainRaiseLimit;
617 rinfoblk.SimAccess = (byte) m_regInfo.EstateSettings.simAccess; 617 rinfoblk.UseEstateSun = !m_scene.RegionInfo.EstateSettings.useFixedSun;
618 rinfoblk.SunHour = m_regInfo.EstateSettings.sunHour; 618 rinfoblk.WaterHeight = m_scene.RegionInfo.EstateSettings.waterHeight;
619 rinfoblk.TerrainLowerLimit = m_regInfo.EstateSettings.terrainLowerLimit; 619 rinfoblk.SimName = Helpers.StringToField(m_scene.RegionInfo.RegionName);
620 rinfoblk.TerrainRaiseLimit = m_regInfo.EstateSettings.terrainRaiseLimit; 620
621 rinfoblk.UseEstateSun = !m_regInfo.EstateSettings.useFixedSun; 621 rinfopack.RegionInfo = rinfoblk;
622 rinfoblk.WaterHeight = m_regInfo.EstateSettings.waterHeight; 622
623 rinfoblk.SimName = Helpers.StringToField(m_regInfo.RegionName); 623 client.OutPacket(rinfopack, ThrottleOutPacketType.Task);
624 624 }
625 rinfopack.RegionInfo = rinfoblk; 625
626 626 public void HandleEstateCovenantRequest(IClientAPI client, LLUUID sessionID)
627 client.OutPacket(rinfopack, ThrottleOutPacketType.Task); 627 {
628 } 628 EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket();
629 629 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock();
630 public void HandleEstateCovenantRequest(IClientAPI client, LLUUID sessionID) 630 edata.CovenantID = m_scene.RegionInfo.CovenantID;
631 { 631 edata.CovenantTimestamp = 0;
632 EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket(); 632 edata.EstateOwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
633 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); 633 edata.EstateName =
634 edata.CovenantID = m_regInfo.CovenantID; 634 Helpers.StringToField(m_scene.RegionInfo.MasterAvatarFirstName + " " + m_scene.RegionInfo.MasterAvatarLastName);
635 edata.CovenantTimestamp = 0; 635 einfopack.Data = edata;
636 edata.EstateOwnerID = m_regInfo.MasterAvatarAssignedUUID; 636 client.OutPacket(einfopack, ThrottleOutPacketType.Task);
637 edata.EstateName = 637 }
638 Helpers.StringToField(m_regInfo.MasterAvatarFirstName + " " + m_regInfo.MasterAvatarLastName); 638
639 einfopack.Data = edata; 639 #endregion
640 client.OutPacket(einfopack, ThrottleOutPacketType.Task); 640
641 } 641 #region Outgoing Packets
642 642
643 #endregion 643 public void sendRegionInfoPacketToAll()
644 644 {
645 #region Outgoing Packets 645 List<ScenePresence> avatars = m_scene.GetAvatars();
646 646
647 public void sendRegionInfoPacketToAll() 647 for (int i = 0; i < avatars.Count; i++)
648 { 648 {
649 List<ScenePresence> avatars = m_scene.GetAvatars(); 649 sendRegionInfoPacket(avatars[i].ControllingClient);
650 650 }
651 for (int i = 0; i < avatars.Count; i++) 651 }
652 { 652
653 sendRegionInfoPacket(avatars[i].ControllingClient); 653 public void sendRegionHandshakeToAll()
654 } 654 {
655 } 655 m_scene.Broadcast(
656 656 sendRegionHandshake
657 public void sendRegionHandshakeToAll() 657 );
658 { 658 }
659 m_scene.Broadcast( 659
660 sendRegionHandshake 660 public void sendRegionInfoPacket(IClientAPI remote_client)
661 ); 661 {
662 } 662 AgentCircuitData circuitData = remote_client.RequestClientInfo();
663 663
664 public void sendRegionInfoPacket(IClientAPI remote_client) 664 RegionInfoPacket regionInfoPacket = new RegionInfoPacket();
665 { 665 regionInfoPacket.AgentData.AgentID = circuitData.AgentID;
666 AgentCircuitData circuitData = remote_client.RequestClientInfo(); 666 regionInfoPacket.AgentData.SessionID = circuitData.SessionID;
667 667 regionInfoPacket.RegionInfo.BillableFactor = m_scene.RegionInfo.EstateSettings.billableFactor;
668 RegionInfoPacket regionInfoPacket = new RegionInfoPacket(); 668 regionInfoPacket.RegionInfo.EstateID = m_scene.RegionInfo.EstateSettings.estateID;
669 regionInfoPacket.AgentData.AgentID = circuitData.AgentID; 669 regionInfoPacket.RegionInfo.MaxAgents = m_scene.RegionInfo.EstateSettings.maxAgents;
670 regionInfoPacket.AgentData.SessionID = circuitData.SessionID; 670 regionInfoPacket.RegionInfo.ObjectBonusFactor = m_scene.RegionInfo.EstateSettings.objectBonusFactor;
671 regionInfoPacket.RegionInfo.BillableFactor = m_regInfo.EstateSettings.billableFactor; 671 regionInfoPacket.RegionInfo.ParentEstateID = m_scene.RegionInfo.EstateSettings.parentEstateID;
672 regionInfoPacket.RegionInfo.EstateID = m_regInfo.EstateSettings.estateID; 672 regionInfoPacket.RegionInfo.PricePerMeter = m_scene.RegionInfo.EstateSettings.pricePerMeter;
673 regionInfoPacket.RegionInfo.MaxAgents = m_regInfo.EstateSettings.maxAgents; 673 regionInfoPacket.RegionInfo.RedirectGridX = m_scene.RegionInfo.EstateSettings.redirectGridX;
674 regionInfoPacket.RegionInfo.ObjectBonusFactor = m_regInfo.EstateSettings.objectBonusFactor; 674 regionInfoPacket.RegionInfo.RedirectGridY = m_scene.RegionInfo.EstateSettings.redirectGridY;
675 regionInfoPacket.RegionInfo.ParentEstateID = m_regInfo.EstateSettings.parentEstateID; 675 regionInfoPacket.RegionInfo.RegionFlags = (uint)(m_scene.RegionInfo.EstateSettings.regionFlags);
676 regionInfoPacket.RegionInfo.PricePerMeter = m_regInfo.EstateSettings.pricePerMeter; 676 regionInfoPacket.RegionInfo.SimAccess = (byte)m_scene.RegionInfo.EstateSettings.simAccess;
677 regionInfoPacket.RegionInfo.RedirectGridX = m_regInfo.EstateSettings.redirectGridX; 677 regionInfoPacket.RegionInfo.SimName = Helpers.StringToField(m_scene.RegionInfo.RegionName);
678 regionInfoPacket.RegionInfo.RedirectGridY = m_regInfo.EstateSettings.redirectGridY; 678 regionInfoPacket.RegionInfo.SunHour = m_scene.RegionInfo.EstateSettings.sunHour;
679 regionInfoPacket.RegionInfo.RegionFlags = (uint)(m_regInfo.EstateSettings.regionFlags); 679 regionInfoPacket.RegionInfo.TerrainLowerLimit = m_scene.RegionInfo.EstateSettings.terrainLowerLimit;
680 regionInfoPacket.RegionInfo.SimAccess = (byte) m_regInfo.EstateSettings.simAccess; 680 regionInfoPacket.RegionInfo.TerrainRaiseLimit = m_scene.RegionInfo.EstateSettings.terrainRaiseLimit;
681 regionInfoPacket.RegionInfo.SimName = Helpers.StringToField(m_regInfo.RegionName); 681 regionInfoPacket.RegionInfo.UseEstateSun = !m_scene.RegionInfo.EstateSettings.useFixedSun;
682 regionInfoPacket.RegionInfo.SunHour = m_regInfo.EstateSettings.sunHour; 682 regionInfoPacket.RegionInfo.WaterHeight = m_scene.RegionInfo.EstateSettings.waterHeight;
683 regionInfoPacket.RegionInfo.TerrainLowerLimit = m_regInfo.EstateSettings.terrainLowerLimit; 683
684 regionInfoPacket.RegionInfo.TerrainRaiseLimit = m_regInfo.EstateSettings.terrainRaiseLimit; 684
685 regionInfoPacket.RegionInfo.UseEstateSun = !m_regInfo.EstateSettings.useFixedSun; 685 remote_client.OutPacket(regionInfoPacket, ThrottleOutPacketType.Task);
686 regionInfoPacket.RegionInfo.WaterHeight = m_regInfo.EstateSettings.waterHeight; 686 }
687 687
688 688 public void sendRegionHandshake(IClientAPI remoteClient)
689 remote_client.OutPacket(regionInfoPacket, ThrottleOutPacketType.Task); 689 {
690 } 690 remoteClient.SendRegionHandshake(m_scene.RegionInfo);
691 691 }
692 public void sendRegionHandshake(IClientAPI remoteClient) 692
693 { 693 #endregion
694 remoteClient.SendRegionHandshake(m_regInfo); 694
695 } 695 #region IRegionModule Members
696 696
697 #endregion 697 public void Initialise(Scene scene, IConfigSource source)
698 } 698 {
699} 699 m_scene = scene;
700 m_scene.EventManager.OnNewClient += new EventManager.OnNewClientDelegate(EventManager_OnNewClient);
701 m_scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight;
702
703 }
704
705 void EventManager_OnNewClient(IClientAPI client)
706 {
707 client.OnEstateOwnerMessage += handleEstateOwnerMessage;
708 client.OnRegionInfoRequest += HandleRegionInfoRequest;
709 client.OnEstateCovenantRequest += HandleEstateCovenantRequest;
710 sendRegionHandshake(client);
711 }
712
713
714 public void PostInitialise()
715 {
716 }
717
718 public void Close()
719 {
720 }
721
722 public string Name
723 {
724 get { return "EstateManagementModule"; }
725 }
726
727 public bool IsSharedModule
728 {
729 get { return false; }
730 }
731
732 #endregion
733
734 #region Other Functions
735
736 public void changeWaterHeight(float height)
737 {
738 setRegionSettings(height, m_scene.RegionInfo.EstateSettings.terrainRaiseLimit, m_scene.RegionInfo.EstateSettings.terrainLowerLimit, m_scene.RegionInfo.EstateSettings.useFixedSun, m_scene.RegionInfo.EstateSettings.sunHour);
739 sendRegionInfoPacketToAll();
740 }
741 #endregion
742
743 }
744}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index edce960..13f8b61 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -153,7 +153,6 @@ namespace OpenSim.Region.Environment.Scenes
153 get { return m_authenticateHandler; } 153 get { return m_authenticateHandler; }
154 } 154 }
155 155
156 protected readonly EstateManager m_estateManager;
157 // an instance to the physics plugin's Scene object. 156 // an instance to the physics plugin's Scene object.
158 public PhysicsScene PhysicsScene 157 public PhysicsScene PhysicsScene
159 { 158 {
@@ -167,11 +166,6 @@ namespace OpenSim.Region.Environment.Scenes
167 get { return m_innerScene.m_syncRoot; } 166 get { return m_innerScene.m_syncRoot; }
168 } 167 }
169 168
170 public EstateManager EstateManager
171 {
172 get { return m_estateManager; }
173 }
174
175 public float TimeDilation 169 public float TimeDilation
176 { 170 {
177 get { return m_timedilation; } 171 get { return m_timedilation; }
@@ -256,8 +250,6 @@ namespace OpenSim.Region.Environment.Scenes
256 EventManager.OnLandObjectRemoved += 250 EventManager.OnLandObjectRemoved +=
257 new EventManager.LandObjectRemoved(m_storageManager.DataStore.RemoveLandObject); 251 new EventManager.LandObjectRemoved(m_storageManager.DataStore.RemoveLandObject);
258 252
259 m_estateManager = new EstateManager(this, m_regInfo);
260
261 m_permissionManager = permissionManager; 253 m_permissionManager = permissionManager;
262 m_permissionManager.Initialise(this); 254 m_permissionManager.Initialise(this);
263 255
@@ -1514,8 +1506,6 @@ namespace OpenSim.Region.Environment.Scenes
1514 { 1506 {
1515 m_log.Info("[REGION]: Add New Scene Presence"); 1507 m_log.Info("[REGION]: Add New Scene Presence");
1516 1508
1517 m_estateManager.sendRegionHandshake(client);
1518
1519 CreateAndAddScenePresence(client, child); 1509 CreateAndAddScenePresence(client, child);
1520 1510
1521 LandChannel.sendParcelOverlay(client); 1511 LandChannel.sendParcelOverlay(client);
@@ -1572,9 +1562,7 @@ namespace OpenSim.Region.Environment.Scenes
1572 client.OnParcelAccessListUpdateRequest += 1562 client.OnParcelAccessListUpdateRequest +=
1573 new ParcelAccessListUpdateRequest(LandChannel.handleParcelAccessUpdateRequest); 1563 new ParcelAccessListUpdateRequest(LandChannel.handleParcelAccessUpdateRequest);
1574 1564
1575 client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); 1565
1576 client.OnRegionInfoRequest += m_estateManager.HandleRegionInfoRequest;
1577 client.OnEstateCovenantRequest += m_estateManager.HandleEstateCovenantRequest;
1578 client.OnRequestGodlikePowers += handleRequestGodlikePowers; 1566 client.OnRequestGodlikePowers += handleRequestGodlikePowers;
1579 client.OnGodKickUser += HandleGodlikeKickUser; 1567 client.OnGodKickUser += HandleGodlikeKickUser;
1580 client.OnObjectPermissions += HandleObjectPermissionsUpdate; 1568 client.OnObjectPermissions += HandleObjectPermissionsUpdate;
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index 53a8d0f..2feed78 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -151,6 +151,10 @@ namespace OpenSim.Region.Environment.Scenes
151 151
152 public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete; 152 public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete;
153 153
154 public delegate void RequestChangeWaterHeight(float height);
155
156 public event RequestChangeWaterHeight OnRequestChangeWaterHeight;
157
154 public delegate void AvatarKillData(uint KillerLocalID, ScenePresence avatar); 158 public delegate void AvatarKillData(uint KillerLocalID, ScenePresence avatar);
155 159
156 public event AvatarKillData OnAvatarKilled; 160 public event AvatarKillData OnAvatarKilled;
@@ -269,6 +273,8 @@ namespace OpenSim.Region.Environment.Scenes
269 private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps; 273 private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps;
270 private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps; 274 private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps;
271 private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null; 275 private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null;
276 private RequestChangeWaterHeight handlerRequestChangeWaterHeight = null; //OnRequestChangeWaterHeight
277
272 private LandBuy handlerLandBuy = null; 278 private LandBuy handlerLandBuy = null;
273 private LandBuy handlerValidateLandBuy = null; 279 private LandBuy handlerValidateLandBuy = null;
274 private AvatarKillData handlerAvatarKill = null; 280 private AvatarKillData handlerAvatarKill = null;
@@ -579,6 +585,15 @@ namespace OpenSim.Region.Environment.Scenes
579 handlerScriptNotAtTargetEvent(localID); 585 handlerScriptNotAtTargetEvent(localID);
580 } 586 }
581 } 587 }
588
589 public void TriggerRequestChangeWaterHeight(float height)
590 {
591 handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight;
592 if (handlerRequestChangeWaterHeight != null)
593 {
594 handlerRequestChangeWaterHeight(height);
595 }
596 }
582 public void TriggerAvatarKill(uint KillerObjectLocalID, ScenePresence DeadAvatar) 597 public void TriggerAvatarKill(uint KillerObjectLocalID, ScenePresence DeadAvatar)
583 { 598 {
584 handlerAvatarKill = OnAvatarKilled; 599 handlerAvatarKill = OnAvatarKilled;