diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 473920e..9f74b2a 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -205,6 +205,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
205 | public delegate void OnMakeRootAgentDelegate(ScenePresence presence); | 205 | public delegate void OnMakeRootAgentDelegate(ScenePresence presence); |
206 | public event OnMakeRootAgentDelegate OnMakeRootAgent; | 206 | public event OnMakeRootAgentDelegate OnMakeRootAgent; |
207 | 207 | ||
208 | /// <summary> | ||
209 | /// Triggered when an object or attachment enters a scene | ||
210 | /// </summary> | ||
211 | public event OnIncomingSceneObjectDelegate OnIncomingSceneObject; | ||
212 | public delegate void OnIncomingSceneObjectDelegate(SceneObjectGroup so); | ||
213 | |||
208 | public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel); | 214 | public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel); |
209 | 215 | ||
210 | public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete; | 216 | public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete; |
@@ -407,7 +413,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
407 | } | 413 | } |
408 | } | 414 | } |
409 | } | 415 | } |
410 | } | 416 | } |
411 | 417 | ||
412 | public void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) | 418 | public void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) |
413 | { | 419 | { |
@@ -1206,6 +1212,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
1206 | } | 1212 | } |
1207 | } | 1213 | } |
1208 | 1214 | ||
1215 | public void TriggerOnIncomingSceneObject(SceneObjectGroup so) | ||
1216 | { | ||
1217 | OnIncomingSceneObjectDelegate handlerIncomingSceneObject = OnIncomingSceneObject; | ||
1218 | if (handlerIncomingSceneObject != null) | ||
1219 | { | ||
1220 | foreach (OnIncomingSceneObjectDelegate d in handlerIncomingSceneObject.GetInvocationList()) | ||
1221 | { | ||
1222 | try | ||
1223 | { | ||
1224 | d(so); | ||
1225 | } | ||
1226 | catch (Exception e) | ||
1227 | { | ||
1228 | m_log.ErrorFormat( | ||
1229 | "[EVENT MANAGER]: Delegate for TriggerOnIncomingSceneObject failed - continuing. {0} {1}", | ||
1230 | e.Message, e.StackTrace); | ||
1231 | } | ||
1232 | } | ||
1233 | } | ||
1234 | } | ||
1235 | |||
1209 | public void TriggerOnRegisterCaps(UUID agentID, Caps caps) | 1236 | public void TriggerOnRegisterCaps(UUID agentID, Caps caps) |
1210 | { | 1237 | { |
1211 | RegisterCapsEvent handlerRegisterCaps = OnRegisterCaps; | 1238 | RegisterCapsEvent handlerRegisterCaps = OnRegisterCaps; |