diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 59d0148..a246319 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -969,6 +969,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
969 | public delegate void RegionStarted(Scene scene); | 969 | public delegate void RegionStarted(Scene scene); |
970 | public event RegionStarted OnRegionStarted; | 970 | public event RegionStarted OnRegionStarted; |
971 | 971 | ||
972 | public delegate void RegionHeartbeatStart(Scene scene); | ||
973 | public event RegionHeartbeatStart OnRegionHeartbeatStart; | ||
972 | public delegate void RegionHeartbeatEnd(Scene scene); | 974 | public delegate void RegionHeartbeatEnd(Scene scene); |
973 | public event RegionHeartbeatEnd OnRegionHeartbeatEnd; | 975 | public event RegionHeartbeatEnd OnRegionHeartbeatEnd; |
974 | 976 | ||
@@ -3068,6 +3070,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
3068 | } | 3070 | } |
3069 | } | 3071 | } |
3070 | 3072 | ||
3073 | public void TriggerRegionHeartbeatStart(Scene scene) | ||
3074 | { | ||
3075 | RegionHeartbeatStart handler = OnRegionHeartbeatStart; | ||
3076 | |||
3077 | if (handler != null) | ||
3078 | { | ||
3079 | foreach (RegionHeartbeatStart d in handler.GetInvocationList()) | ||
3080 | { | ||
3081 | try | ||
3082 | { | ||
3083 | d(scene); | ||
3084 | } | ||
3085 | catch (Exception e) | ||
3086 | { | ||
3087 | m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionHeartbeatStart failed - continuing {0} - {1}", | ||
3088 | e.Message, e.StackTrace); | ||
3089 | } | ||
3090 | } | ||
3091 | } | ||
3092 | } | ||
3093 | |||
3071 | public void TriggerRegionHeartbeatEnd(Scene scene) | 3094 | public void TriggerRegionHeartbeatEnd(Scene scene) |
3072 | { | 3095 | { |
3073 | RegionHeartbeatEnd handler = OnRegionHeartbeatEnd; | 3096 | RegionHeartbeatEnd handler = OnRegionHeartbeatEnd; |