diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-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 fe3438e..b3debb0 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -502,6 +502,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
502 | public delegate void PrimsLoaded(Scene s); | 502 | public delegate void PrimsLoaded(Scene s); |
503 | public event PrimsLoaded OnPrimsLoaded; | 503 | public event PrimsLoaded OnPrimsLoaded; |
504 | 504 | ||
505 | public delegate void TeleportStart(IClientAPI client, GridRegion destination, GridRegion finalDestination, uint teleportFlags, bool gridLogout); | ||
506 | public event TeleportStart OnTeleportStart; | ||
507 | |||
508 | public delegate void TeleportFail(IClientAPI client, bool gridLogout); | ||
509 | public event TeleportFail OnTeleportFail; | ||
510 | |||
505 | public class MoneyTransferArgs : EventArgs | 511 | public class MoneyTransferArgs : EventArgs |
506 | { | 512 | { |
507 | public UUID sender; | 513 | public UUID sender; |
@@ -2463,5 +2469,48 @@ namespace OpenSim.Region.Framework.Scenes | |||
2463 | } | 2469 | } |
2464 | } | 2470 | } |
2465 | } | 2471 | } |
2472 | |||
2473 | public void TriggerTeleportStart(IClientAPI client, GridRegion destination, GridRegion finalDestination, uint teleportFlags, bool gridLogout) | ||
2474 | { | ||
2475 | TeleportStart handler = OnTeleportStart; | ||
2476 | |||
2477 | if (handler != null) | ||
2478 | { | ||
2479 | foreach (TeleportStart d in handler.GetInvocationList()) | ||
2480 | { | ||
2481 | try | ||
2482 | { | ||
2483 | d(client, destination, finalDestination, teleportFlags, gridLogout); | ||
2484 | } | ||
2485 | catch (Exception e) | ||
2486 | { | ||
2487 | m_log.ErrorFormat("[EVENT MANAGER]: Delegate for TeleportStart failed - continuing {0} - {1}", | ||
2488 | e.Message, e.StackTrace); | ||
2489 | } | ||
2490 | } | ||
2491 | } | ||
2492 | } | ||
2493 | |||
2494 | public void TriggerTeleportFail(IClientAPI client, bool gridLogout) | ||
2495 | { | ||
2496 | TeleportFail handler = OnTeleportFail; | ||
2497 | |||
2498 | if (handler != null) | ||
2499 | { | ||
2500 | foreach (TeleportFail d in handler.GetInvocationList()) | ||
2501 | { | ||
2502 | try | ||
2503 | { | ||
2504 | d(client, gridLogout); | ||
2505 | } | ||
2506 | catch (Exception e) | ||
2507 | { | ||
2508 | m_log.ErrorFormat("[EVENT MANAGER]: Delegate for TeleportFail failed - continuing {0} - {1}", | ||
2509 | e.Message, e.StackTrace); | ||
2510 | } | ||
2511 | } | ||
2512 | } | ||
2513 | } | ||
2514 | |||
2466 | } | 2515 | } |
2467 | } | 2516 | } |