aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs153
1 files changed, 104 insertions, 49 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index 0dddaa0..5389ec4 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -158,165 +158,218 @@ namespace OpenSim.Region.Environment.Scenes
158 158
159 public event MoneyTransferEvent OnMoneyTransfer; 159 public event MoneyTransferEvent OnMoneyTransfer;
160 160
161
162 /* Designated Event Deletage Instances */
163
164 private ScriptChangedEvent handler001 = null; //OnScriptChangedEvent;
165 private ClientMovement handler002 = null; //OnClientMovement;
166 private OnPermissionErrorDelegate handler003 = null; //OnPermissionError;
167 private OnPluginConsoleDelegate handler004 = null; //OnPluginConsole;
168 private OnFrameDelegate handler005 = null; //OnFrame;
169 private OnNewClientDelegate handler006 = null; //OnNewClient;
170 private OnNewPresenceDelegate handler007 = null; //OnNewPresence;
171 private OnRemovePresenceDelegate handler008 = null; //OnRemovePresence;
172 private OnBackupDelegate handler009 = null; //OnBackup;
173 private OnParcelPrimCountUpdateDelegate handler010 = null; //OnParcelPrimCountUpdate;
174 private MoneyTransferEvent handler011 = null; //OnMoneyTransfer;
175 private OnParcelPrimCountAddDelegate handler012 = null; //OnParcelPrimCountAdd;
176 private OnShutdownDelegate handler013 = null; //OnShutdown;
177 private ObjectGrabDelegate handler014 = null; //OnObjectGrab;
178 private NewRezScript handler015 = null; //OnRezScript;
179 private RemoveScript handler016 = null; //OnRemoveScript;
180 private SceneGroupMoved handler017 = null; //OnSceneGroupMove;
181 private SceneGroupGrabed handler018 = null; //OnSceneGroupGrab;
182 private LandObjectAdded handler020 = null; //OnLandObjectAdded;
183 private LandObjectRemoved handler021 = null; //OnLandObjectRemoved;
184 private AvatarEnteringNewParcel handler022 = null; //OnAvatarEnteringNewParcel;
185 private NewGridInstantMessage handler023 = null; //OnGridInstantMessageToIMModule;
186 private NewGridInstantMessage handler024 = null; //OnGridInstantMessageToFriendsModule;
187 private ClientClosed handler025 = null; //OnClientClosed;
188
161 public void TriggerOnScriptChangedEvent(uint localID, uint change) 189 public void TriggerOnScriptChangedEvent(uint localID, uint change)
162 { 190 {
163 if (OnScriptChangedEvent != null) 191 handler001 = OnScriptChangedEvent;
164 OnScriptChangedEvent(localID,change); 192 if (handler001 != null)
193 handler001(localID, change);
165 } 194 }
166 195
167 public void TriggerOnClientMovement(ScenePresence avatar) 196 public void TriggerOnClientMovement(ScenePresence avatar)
168 { 197 {
169 if (OnClientMovement != null) 198 handler002 = OnClientMovement;
170 OnClientMovement(avatar); 199 if (handler002 != null)
200 handler002(avatar);
171 } 201 }
172 202
173 public void TriggerPermissionError(LLUUID user, string reason) 203 public void TriggerPermissionError(LLUUID user, string reason)
174 { 204 {
175 if (OnPermissionError != null) 205 handler003 = OnPermissionError;
176 OnPermissionError(user, reason); 206 if (handler003 != null)
207 handler003(user, reason);
177 } 208 }
178 209
179 public void TriggerOnPluginConsole(string[] args) 210 public void TriggerOnPluginConsole(string[] args)
180 { 211 {
181 if (OnPluginConsole != null) 212 handler004 = OnPluginConsole;
182 OnPluginConsole(args); 213 if (handler004 != null)
214 handler004(args);
183 } 215 }
184 216
185 public void TriggerOnFrame() 217 public void TriggerOnFrame()
186 { 218 {
187 if (OnFrame != null) 219 handler005 = OnFrame;
220 if (handler005 != null)
188 { 221 {
189 OnFrame(); 222 handler005();
190 } 223 }
191 } 224 }
192 225
193 public void TriggerOnNewClient(IClientAPI client) 226 public void TriggerOnNewClient(IClientAPI client)
194 { 227 {
195 if (OnNewClient != null) 228 handler006 = OnNewClient;
196 OnNewClient(client); 229 if (handler006 != null)
230 handler006(client);
197 } 231 }
198 232
199 public void TriggerOnNewPresence(ScenePresence presence) 233 public void TriggerOnNewPresence(ScenePresence presence)
200 { 234 {
201 if (OnNewPresence != null) 235 handler007 = OnNewPresence;
202 OnNewPresence(presence); 236 if (handler007 != null)
237 handler007(presence);
203 } 238 }
204 239
205 public void TriggerOnRemovePresence(LLUUID agentId) 240 public void TriggerOnRemovePresence(LLUUID agentId)
206 { 241 {
207 if (OnRemovePresence != null) 242 handler008 = OnRemovePresence;
243 if (handler008 != null)
208 { 244 {
209 OnRemovePresence(agentId); 245 handler008(agentId);
210 } 246 }
211 } 247 }
212 248
213 public void TriggerOnBackup(IRegionDataStore dstore) 249 public void TriggerOnBackup(IRegionDataStore dstore)
214 { 250 {
215 if (OnBackup != null) 251 handler009 = OnBackup;
252 if (handler009 != null)
216 { 253 {
217 OnBackup(dstore); 254 handler009(dstore);
218 } 255 }
219 } 256 }
220 257
221 public void TriggerParcelPrimCountUpdate() 258 public void TriggerParcelPrimCountUpdate()
222 { 259 {
223 if (OnParcelPrimCountUpdate != null) 260 handler010 = OnParcelPrimCountUpdate;
261 if (handler010 != null)
224 { 262 {
225 OnParcelPrimCountUpdate(); 263 handler010();
226 } 264 }
227 } 265 }
228 266
229 public void TriggerMoneyTransfer(Object sender, MoneyTransferArgs e) 267 public void TriggerMoneyTransfer(Object sender, MoneyTransferArgs e)
230 { 268 {
231 if (OnMoneyTransfer != null) 269 handler011 = OnMoneyTransfer;
270 if (handler011 != null)
232 { 271 {
233 OnMoneyTransfer(sender, e); 272 handler011(sender, e);
234 } 273 }
235 } 274 }
236 275
237 276
238 public void TriggerParcelPrimCountAdd(SceneObjectGroup obj) 277 public void TriggerParcelPrimCountAdd(SceneObjectGroup obj)
239 { 278 {
240 if (OnParcelPrimCountAdd != null) 279 handler012 = OnParcelPrimCountAdd;
280 if (handler012 != null)
241 { 281 {
242 OnParcelPrimCountAdd(obj); 282 handler012(obj);
243 } 283 }
244 } 284 }
245 285
246 public void TriggerShutdown() 286 public void TriggerShutdown()
247 { 287 {
248 if (OnShutdown != null) 288 handler013 = OnShutdown;
249 OnShutdown(); 289 if (handler013 != null)
290 handler013();
250 } 291 }
251 292
252 public void TriggerObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) 293 public void TriggerObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
253 { 294 {
254 if (OnObjectGrab != null) 295 handler014 = OnObjectGrab;
296 if (handler014 != null)
255 { 297 {
256 OnObjectGrab(localID, offsetPos, remoteClient); 298 handler014(localID, offsetPos, remoteClient);
257 } 299 }
258 } 300 }
259 301
260 public void TriggerRezScript(uint localID, LLUUID itemID, string script) 302 public void TriggerRezScript(uint localID, LLUUID itemID, string script)
261 { 303 {
262 if (OnRezScript != null) 304 handler015 = OnRezScript;
305 if (handler015 != null)
263 { 306 {
264 OnRezScript(localID, itemID, script); 307 handler015(localID, itemID, script);
265 } 308 }
266 } 309 }
267 310
268 public void TriggerRemoveScript(uint localID, LLUUID itemID) 311 public void TriggerRemoveScript(uint localID, LLUUID itemID)
269 { 312 {
270 if (OnRemoveScript != null) 313 handler016 = OnRemoveScript;
314 if (handler016 != null)
271 { 315 {
272 OnRemoveScript(localID, itemID); 316 handler016(localID, itemID);
273 } 317 }
274 } 318 }
275 319
276 public bool TriggerGroupMove(LLUUID groupID, LLVector3 delta) 320 public bool TriggerGroupMove(LLUUID groupID, LLVector3 delta)
277 { 321 {
278 if (OnSceneGroupMove != null) 322 handler017 = OnSceneGroupMove;
323
324 if (handler017 != null)
279 { 325 {
280 return OnSceneGroupMove(groupID, delta); 326 return handler017(groupID, delta);
281 } 327 }
282 return true; 328 return true;
283 } 329 }
284 330
285 public void TriggerGroupGrab(LLUUID groupID, LLVector3 offset, LLUUID userID) 331 public void TriggerGroupGrab(LLUUID groupID, LLVector3 offset, LLUUID userID)
286 { 332 {
287 if (OnSceneGroupGrab != null) 333 handler018 = OnSceneGroupGrab;
334 if (handler018 != null)
288 { 335 {
289 OnSceneGroupGrab(groupID, offset, userID); 336 handler018(groupID, offset, userID);
290 } 337 }
291 } 338 }
292 339
293 public void TriggerLandObjectAdded(Land newParcel, LLUUID regionID) 340 public void TriggerLandObjectAdded(Land newParcel, LLUUID regionID)
294 { 341 {
295 if (OnLandObjectAdded != null) 342 handler020 = OnLandObjectAdded;
343
344 if (handler020 != null)
296 { 345 {
297 OnLandObjectAdded(newParcel, regionID); 346 handler020(newParcel, regionID);
298 } 347 }
299 } 348 }
300 349
301 public void TriggerLandObjectRemoved(LLUUID globalID) 350 public void TriggerLandObjectRemoved(LLUUID globalID)
302 { 351 {
303 if (OnLandObjectRemoved != null) 352 handler021 = OnLandObjectRemoved;
353 if (handler021 != null)
304 { 354 {
305 OnLandObjectRemoved(globalID); 355 handler021(globalID);
306 } 356 }
307 } 357 }
308 358
309 public void TriggerLandObjectUpdated(uint localParcelID, Land newParcel) 359 public void TriggerLandObjectUpdated(uint localParcelID, Land newParcel)
310 { 360 {
311 //triggerLandObjectRemoved(localParcelID); 361 //triggerLandObjectRemoved(localParcelID);
362
312 TriggerLandObjectAdded(newParcel, newParcel.m_scene.RegionInfo.RegionID); 363 TriggerLandObjectAdded(newParcel, newParcel.m_scene.RegionInfo.RegionID);
313 } 364 }
314 365
315 public void TriggerAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, LLUUID regionID) 366 public void TriggerAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, LLUUID regionID)
316 { 367 {
317 if (OnAvatarEnteringNewParcel != null) 368 handler022 = OnAvatarEnteringNewParcel;
369
370 if (handler022 != null)
318 { 371 {
319 OnAvatarEnteringNewParcel(avatar, localLandID, regionID); 372 handler022(avatar, localLandID, regionID);
320 } 373 }
321 } 374 }
322 375
@@ -327,17 +380,18 @@ namespace OpenSim.Region.Environment.Scenes
327 { 380 {
328 if ((whichModule & InstantMessageReceiver.IMModule) != 0) 381 if ((whichModule & InstantMessageReceiver.IMModule) != 0)
329 { 382 {
330 383 handler023 = OnGridInstantMessageToIMModule;
331 if (OnGridInstantMessageToIMModule != null) 384 if (handler023 != null)
332 { 385 {
333 OnGridInstantMessageToIMModule(message); 386 handler023(message);
334 } 387 }
335 } 388 }
336 if ((whichModule & InstantMessageReceiver.FriendsModule) != 0) 389 if ((whichModule & InstantMessageReceiver.FriendsModule) != 0)
337 { 390 {
338 if (OnGridInstantMessageToFriendsModule != null) 391 handler024 = OnGridInstantMessageToFriendsModule;
392 if (handler024 != null)
339 { 393 {
340 OnGridInstantMessageToFriendsModule(message); 394 handler024(message);
341 } 395 }
342 396
343 } 397 }
@@ -345,9 +399,10 @@ namespace OpenSim.Region.Environment.Scenes
345 399
346 public void TriggerClientClosed(LLUUID ClientID) 400 public void TriggerClientClosed(LLUUID ClientID)
347 { 401 {
348 if (OnClientClosed != null) 402 handler025 = OnClientClosed;
403 if (handler025 != null)
349 { 404 {
350 OnClientClosed(ClientID); 405 handler025(ClientID);
351 } 406 }
352 } 407 }
353 408