mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Added EventManager.OnRegionStarted which is triggered when Heartbeat is started.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user