Added EventManager.OnRegionStarted which is triggered when Heartbeat is started.
parent
ecf9824b63
commit
fc391d4b10
|
@ -401,6 +401,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public delegate void RegionUp(GridRegion region);
|
||||
public event RegionUp OnRegionUp;
|
||||
|
||||
public delegate void RegionStarted(Scene scene);
|
||||
public event RegionStarted OnRegionStarted;
|
||||
|
||||
public delegate void LoginsEnabled(string regionName);
|
||||
public event LoginsEnabled OnLoginsEnabled;
|
||||
|
||||
|
@ -2243,6 +2246,27 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
public void TriggerOnRegionStarted(Scene scene)
|
||||
{
|
||||
RegionStarted handler = OnRegionStarted;
|
||||
|
||||
if (handler != null)
|
||||
{
|
||||
foreach (RegionStarted d in handler.GetInvocationList())
|
||||
{
|
||||
try
|
||||
{
|
||||
d(scene);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[EVENT MANAGER]: Delegate for RegionStarted failed - continuing {0} - {1}",
|
||||
e.Message, e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerLoginsEnabled (string regionName)
|
||||
{
|
||||
LoginsEnabled handler = OnLoginsEnabled;
|
||||
|
|
|
@ -1194,6 +1194,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
try
|
||||
{
|
||||
m_eventManager.TriggerOnRegionStarted(this);
|
||||
while (!shuttingdown)
|
||||
Update();
|
||||
|
||||
|
|
Loading…
Reference in New Issue