aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/EventManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs32
1 files changed, 30 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 9db2e41..0b1f593 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -331,9 +331,16 @@ namespace OpenSim.Region.Framework.Scenes
331 /// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical). 331 /// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical).
332 public delegate void Attach(uint localID, UUID itemID, UUID avatarID); 332 public delegate void Attach(uint localID, UUID itemID, UUID avatarID);
333 public event Attach OnAttach; 333 public event Attach OnAttach;
334
335 public delegate void SceneObjectDelegate(SceneObjectGroup so);
336
337 /// <summary>
338 /// Called immediately after an object is loaded from storage.
339 /// </summary>
340 public event SceneObjectDelegate OnSceneObjectLoaded;
334 341
335 public delegate void RegionUp(GridRegion region); 342 public delegate void RegionUp(GridRegion region);
336 public event RegionUp OnRegionUp; 343 public event RegionUp OnRegionUp;
337 344
338 public class MoneyTransferArgs : EventArgs 345 public class MoneyTransferArgs : EventArgs
339 { 346 {
@@ -2013,5 +2020,26 @@ namespace OpenSim.Region.Framework.Scenes
2013 } 2020 }
2014 } 2021 }
2015 } 2022 }
2023
2024 public void TriggerOnSceneObjectLoaded(SceneObjectGroup so)
2025 {
2026 SceneObjectDelegate handler = OnSceneObjectLoaded;
2027 if (handler != null)
2028 {
2029 foreach (SceneObjectDelegate d in handler.GetInvocationList())
2030 {
2031 try
2032 {
2033 d(so);
2034 }
2035 catch (Exception e)
2036 {
2037 m_log.ErrorFormat(
2038 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectLoaded failed - continuing. {0} {1}",
2039 e.Message, e.StackTrace);
2040 }
2041 }
2042 }
2043 }
2016 } 2044 }
2017} 2045} \ No newline at end of file