aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/EventManager.cs
diff options
context:
space:
mode:
authorMelanie2012-04-07 04:52:14 +0100
committerMelanie2012-04-07 04:52:14 +0100
commitb39de2425cac4c2a94a7fdd6c77100ef831d66b4 (patch)
tree9258928681a82d68b408354e534c32bcf283ad3a /OpenSim/Region/Framework/Scenes/EventManager.cs
parentMerge branch 'ubitwork' (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-b39de2425cac4c2a94a7fdd6c77100ef831d66b4.zip
opensim-SC_OLD-b39de2425cac4c2a94a7fdd6c77100ef831d66b4.tar.gz
opensim-SC_OLD-b39de2425cac4c2a94a7fdd6c77100ef831d66b4.tar.bz2
opensim-SC_OLD-b39de2425cac4c2a94a7fdd6c77100ef831d66b4.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs OpenSim/Region/CoreModules/World/Land/LandObject.cs OpenSim/Region/Framework/Scenes/Scene.Inventory.cs OpenSim/Region/Framework/Scenes/SceneObjectPart.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs49
1 files changed, 49 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 741d233..2365cfe 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -506,6 +506,12 @@ namespace OpenSim.Region.Framework.Scenes
506 public delegate void PrimsLoaded(Scene s); 506 public delegate void PrimsLoaded(Scene s);
507 public event PrimsLoaded OnPrimsLoaded; 507 public event PrimsLoaded OnPrimsLoaded;
508 508
509 public delegate void TeleportStart(IClientAPI client, GridRegion destination, GridRegion finalDestination, uint teleportFlags, bool gridLogout);
510 public event TeleportStart OnTeleportStart;
511
512 public delegate void TeleportFail(IClientAPI client, bool gridLogout);
513 public event TeleportFail OnTeleportFail;
514
509 public class MoneyTransferArgs : EventArgs 515 public class MoneyTransferArgs : EventArgs
510 { 516 {
511 public UUID sender; 517 public UUID sender;
@@ -2487,5 +2493,48 @@ namespace OpenSim.Region.Framework.Scenes
2487 } 2493 }
2488 } 2494 }
2489 } 2495 }
2496
2497 public void TriggerTeleportStart(IClientAPI client, GridRegion destination, GridRegion finalDestination, uint teleportFlags, bool gridLogout)
2498 {
2499 TeleportStart handler = OnTeleportStart;
2500
2501 if (handler != null)
2502 {
2503 foreach (TeleportStart d in handler.GetInvocationList())
2504 {
2505 try
2506 {
2507 d(client, destination, finalDestination, teleportFlags, gridLogout);
2508 }
2509 catch (Exception e)
2510 {
2511 m_log.ErrorFormat("[EVENT MANAGER]: Delegate for TeleportStart failed - continuing {0} - {1}",
2512 e.Message, e.StackTrace);
2513 }
2514 }
2515 }
2516 }
2517
2518 public void TriggerTeleportFail(IClientAPI client, bool gridLogout)
2519 {
2520 TeleportFail handler = OnTeleportFail;
2521
2522 if (handler != null)
2523 {
2524 foreach (TeleportFail d in handler.GetInvocationList())
2525 {
2526 try
2527 {
2528 d(client, gridLogout);
2529 }
2530 catch (Exception e)
2531 {
2532 m_log.ErrorFormat("[EVENT MANAGER]: Delegate for TeleportFail failed - continuing {0} - {1}",
2533 e.Message, e.StackTrace);
2534 }
2535 }
2536 }
2537 }
2538
2490 } 2539 }
2491} 2540}