diff options
author | Justin Clark-Casey (justincc) | 2010-02-08 19:02:20 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-02-08 19:02:20 +0000 |
commit | 00947cf2ca7a9315ae1d508507db0c95348e25ec (patch) | |
tree | b6f9168e8cb6f299c2a66288bd5094dac49ccaa7 /OpenSim/Region/Framework/Scenes/EventManager.cs | |
parent | minor: log what kind of wearable cannot be found (diff) | |
download | opensim-SC_OLD-00947cf2ca7a9315ae1d508507db0c95348e25ec.zip opensim-SC_OLD-00947cf2ca7a9315ae1d508507db0c95348e25ec.tar.gz opensim-SC_OLD-00947cf2ca7a9315ae1d508507db0c95348e25ec.tar.bz2 opensim-SC_OLD-00947cf2ca7a9315ae1d508507db0c95348e25ec.tar.xz |
Add EventManager.OnIncomingSceneObject event which is triggered by an incoming scene object
Add a read-only Attachments property to ScenePresence
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-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; |