diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 49 |
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 | } |