diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 55 |
1 files changed, 40 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 7fb1cd8..ef125cd 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -66,13 +66,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
66 | public event OnClientConnectCoreDelegate OnClientConnect; | 66 | public event OnClientConnectCoreDelegate OnClientConnect; |
67 | 67 | ||
68 | public delegate void OnNewClientDelegate(IClientAPI client); | 68 | public delegate void OnNewClientDelegate(IClientAPI client); |
69 | 69 | ||
70 | /// <summary> | 70 | /// <summary> |
71 | /// Deprecated in favour of OnClientConnect. | 71 | /// Deprecated in favour of OnClientConnect. |
72 | /// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces. | 72 | /// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces. |
73 | /// </summary> | 73 | /// </summary> |
74 | public event OnNewClientDelegate OnNewClient; | 74 | public event OnNewClientDelegate OnNewClient; |
75 | 75 | ||
76 | public delegate void OnClientLoginDelegate(IClientAPI client); | ||
77 | public event OnClientLoginDelegate OnClientLogin; | ||
78 | |||
76 | public delegate void OnNewPresenceDelegate(ScenePresence presence); | 79 | public delegate void OnNewPresenceDelegate(ScenePresence presence); |
77 | 80 | ||
78 | public event OnNewPresenceDelegate OnNewPresence; | 81 | public event OnNewPresenceDelegate OnNewPresence; |
@@ -107,12 +110,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
107 | public event OnSetRootAgentSceneDelegate OnSetRootAgentScene; | 110 | public event OnSetRootAgentSceneDelegate OnSetRootAgentScene; |
108 | 111 | ||
109 | /// <summary> | 112 | /// <summary> |
110 | /// Called when an object is touched/grabbed. | 113 | /// Fired when an object is touched/grabbed. |
111 | /// </summary> | 114 | /// </summary> |
112 | /// The originalID is the local ID of the part that was actually touched. The localID itself is always that of | 115 | /// The originalID is the local ID of the part that was actually touched. The localID itself is always that of |
113 | /// the root part. | 116 | /// the root part. |
114 | public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); | ||
115 | public event ObjectGrabDelegate OnObjectGrab; | 117 | public event ObjectGrabDelegate OnObjectGrab; |
118 | public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); | ||
116 | 119 | ||
117 | public event ObjectGrabDelegate OnObjectGrabbing; | 120 | public event ObjectGrabDelegate OnObjectGrabbing; |
118 | public event ObjectDeGrabDelegate OnObjectDeGrab; | 121 | public event ObjectDeGrabDelegate OnObjectDeGrab; |
@@ -120,8 +123,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
120 | 123 | ||
121 | public event OnPermissionErrorDelegate OnPermissionError; | 124 | public event OnPermissionErrorDelegate OnPermissionError; |
122 | 125 | ||
123 | public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource); | 126 | /// <summary> |
127 | /// Fired when a new script is created. | ||
128 | /// </summary> | ||
124 | public event NewRezScript OnRezScript; | 129 | public event NewRezScript OnRezScript; |
130 | public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource); | ||
125 | 131 | ||
126 | public delegate void RemoveScript(uint localID, UUID itemID); | 132 | public delegate void RemoveScript(uint localID, UUID itemID); |
127 | public event RemoveScript OnRemoveScript; | 133 | public event RemoveScript OnRemoveScript; |
@@ -165,36 +171,33 @@ namespace OpenSim.Region.Framework.Scenes | |||
165 | 171 | ||
166 | public event ClientClosed OnClientClosed; | 172 | public event ClientClosed OnClientClosed; |
167 | 173 | ||
168 | public delegate void ScriptChangedEvent(uint localID, uint change); | 174 | /// <summary> |
169 | 175 | /// This is fired when a scene object property that a script might be interested in (such as color, scale or | |
176 | /// inventory) changes. Only enough information is sent for the LSL changed event | ||
177 | /// (see http://lslwiki.net/lslwiki/wakka.php?wakka=changed) | ||
178 | /// </summary> | ||
170 | public event ScriptChangedEvent OnScriptChangedEvent; | 179 | public event ScriptChangedEvent OnScriptChangedEvent; |
180 | public delegate void ScriptChangedEvent(uint localID, uint change); | ||
171 | 181 | ||
172 | public delegate void ScriptControlEvent(uint localID, UUID item, UUID avatarID, uint held, uint changed); | 182 | public delegate void ScriptControlEvent(uint localID, UUID item, UUID avatarID, uint held, uint changed); |
173 | |||
174 | public event ScriptControlEvent OnScriptControlEvent; | 183 | public event ScriptControlEvent OnScriptControlEvent; |
175 | 184 | ||
176 | public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos); | 185 | public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos); |
177 | |||
178 | public event ScriptAtTargetEvent OnScriptAtTargetEvent; | 186 | public event ScriptAtTargetEvent OnScriptAtTargetEvent; |
179 | 187 | ||
180 | public delegate void ScriptNotAtTargetEvent(uint localID); | 188 | public delegate void ScriptNotAtTargetEvent(uint localID); |
181 | |||
182 | public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent; | 189 | public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent; |
183 | 190 | ||
184 | public delegate void ScriptAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion atrot); | 191 | public delegate void ScriptAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion atrot); |
185 | |||
186 | public event ScriptAtRotTargetEvent OnScriptAtRotTargetEvent; | 192 | public event ScriptAtRotTargetEvent OnScriptAtRotTargetEvent; |
187 | 193 | ||
188 | public delegate void ScriptNotAtRotTargetEvent(uint localID); | 194 | public delegate void ScriptNotAtRotTargetEvent(uint localID); |
189 | |||
190 | public event ScriptNotAtRotTargetEvent OnScriptNotAtRotTargetEvent; | 195 | public event ScriptNotAtRotTargetEvent OnScriptNotAtRotTargetEvent; |
191 | 196 | ||
192 | public delegate void ScriptColliding(uint localID, ColliderArgs colliders); | 197 | public delegate void ScriptColliding(uint localID, ColliderArgs colliders); |
193 | |||
194 | public event ScriptColliding OnScriptColliderStart; | 198 | public event ScriptColliding OnScriptColliderStart; |
195 | public event ScriptColliding OnScriptColliding; | 199 | public event ScriptColliding OnScriptColliding; |
196 | public event ScriptColliding OnScriptCollidingEnd; | 200 | public event ScriptColliding OnScriptCollidingEnd; |
197 | |||
198 | public event ScriptColliding OnScriptLandColliderStart; | 201 | public event ScriptColliding OnScriptLandColliderStart; |
199 | public event ScriptColliding OnScriptLandColliding; | 202 | public event ScriptColliding OnScriptLandColliding; |
200 | public event ScriptColliding OnScriptLandColliderEnd; | 203 | public event ScriptColliding OnScriptLandColliderEnd; |
@@ -204,7 +207,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
204 | 207 | ||
205 | public delegate void OnMakeRootAgentDelegate(ScenePresence presence); | 208 | public delegate void OnMakeRootAgentDelegate(ScenePresence presence); |
206 | public delegate void OnSaveNewWindlightProfileDelegate(); | 209 | public delegate void OnSaveNewWindlightProfileDelegate(); |
207 | public delegate void OnSendNewWindlightProfileTargetedDelegate(RegionMeta7WindlightData wl, UUID user); | 210 | public delegate void OnSendNewWindlightProfileTargetedDelegate(RegionLightShareData wl, UUID user); |
208 | public event OnMakeRootAgentDelegate OnMakeRootAgent; | 211 | public event OnMakeRootAgentDelegate OnMakeRootAgent; |
209 | public event OnSendNewWindlightProfileTargetedDelegate OnSendNewWindlightProfileTargeted; | 212 | public event OnSendNewWindlightProfileTargetedDelegate OnSendNewWindlightProfileTargeted; |
210 | public event OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile; | 213 | public event OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile; |
@@ -587,6 +590,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
587 | } | 590 | } |
588 | } | 591 | } |
589 | 592 | ||
593 | public void TriggerOnClientLogin(IClientAPI client) | ||
594 | { | ||
595 | OnClientLoginDelegate handlerClientLogin = OnClientLogin; | ||
596 | if (handlerClientLogin != null) | ||
597 | { | ||
598 | foreach (OnClientLoginDelegate d in handlerClientLogin.GetInvocationList()) | ||
599 | { | ||
600 | try | ||
601 | { | ||
602 | d(client); | ||
603 | } | ||
604 | catch (Exception e) | ||
605 | { | ||
606 | m_log.ErrorFormat( | ||
607 | "[EVENT MANAGER]: Delegate for TriggerOnClientLogin failed - continuing. {0} {1}", | ||
608 | e.Message, e.StackTrace); | ||
609 | } | ||
610 | } | ||
611 | } | ||
612 | |||
613 | } | ||
614 | |||
590 | public void TriggerOnNewPresence(ScenePresence presence) | 615 | public void TriggerOnNewPresence(ScenePresence presence) |
591 | { | 616 | { |
592 | OnNewPresenceDelegate handlerNewPresence = OnNewPresence; | 617 | OnNewPresenceDelegate handlerNewPresence = OnNewPresence; |
@@ -1195,7 +1220,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1195 | } | 1220 | } |
1196 | } | 1221 | } |
1197 | 1222 | ||
1198 | public void TriggerOnSendNewWindlightProfileTargeted(RegionMeta7WindlightData wl, UUID user) | 1223 | public void TriggerOnSendNewWindlightProfileTargeted(RegionLightShareData wl, UUID user) |
1199 | { | 1224 | { |
1200 | OnSendNewWindlightProfileTargetedDelegate handlerSendNewWindlightProfileTargeted = OnSendNewWindlightProfileTargeted; | 1225 | OnSendNewWindlightProfileTargetedDelegate handlerSendNewWindlightProfileTargeted = OnSendNewWindlightProfileTargeted; |
1201 | if (handlerSendNewWindlightProfileTargeted != null) | 1226 | if (handlerSendNewWindlightProfileTargeted != null) |