diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/EventManager.cs | 980 |
1 files changed, 0 insertions, 980 deletions
diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs deleted file mode 100644 index bba7eed..0000000 --- a/OpenSim/Region/Environment/Scenes/EventManager.cs +++ /dev/null | |||
@@ -1,980 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using OpenMetaverse; | ||
30 | using OpenSim.Framework; | ||
31 | using OpenSim.Framework.Client; | ||
32 | using OpenSim.Region.Environment.Interfaces; | ||
33 | using Caps=OpenSim.Framework.Communications.Capabilities.Caps; | ||
34 | using System.Collections.Generic; | ||
35 | |||
36 | namespace OpenSim.Region.Environment.Scenes | ||
37 | { | ||
38 | /// <summary> | ||
39 | /// A class for triggering remote scene events. | ||
40 | /// </summary> | ||
41 | public class EventManager | ||
42 | { | ||
43 | public delegate void OnFrameDelegate(); | ||
44 | |||
45 | public event OnFrameDelegate OnFrame; | ||
46 | |||
47 | public delegate void ClientMovement(ScenePresence client); | ||
48 | |||
49 | public event ClientMovement OnClientMovement; | ||
50 | |||
51 | public delegate void OnTerrainTickDelegate(); | ||
52 | |||
53 | public event OnTerrainTickDelegate OnTerrainTick; | ||
54 | |||
55 | public delegate void OnBackupDelegate(IRegionDataStore datastore, bool forceBackup); | ||
56 | |||
57 | public event OnBackupDelegate OnBackup; | ||
58 | |||
59 | public delegate void OnClientConnectCoreDelegate(IClientCore client); | ||
60 | |||
61 | public event OnClientConnectCoreDelegate OnClientConnect; | ||
62 | |||
63 | public delegate void OnNewClientDelegate(IClientAPI client); | ||
64 | |||
65 | /// <summary> | ||
66 | /// Depreciated in favour of OnClientConnect. | ||
67 | /// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces. | ||
68 | /// </summary> | ||
69 | public event OnNewClientDelegate OnNewClient; | ||
70 | |||
71 | public delegate void OnNewPresenceDelegate(ScenePresence presence); | ||
72 | |||
73 | public event OnNewPresenceDelegate OnNewPresence; | ||
74 | |||
75 | public delegate void OnRemovePresenceDelegate(UUID agentId); | ||
76 | |||
77 | public event OnRemovePresenceDelegate OnRemovePresence; | ||
78 | |||
79 | public delegate void OnParcelPrimCountUpdateDelegate(); | ||
80 | |||
81 | public event OnParcelPrimCountUpdateDelegate OnParcelPrimCountUpdate; | ||
82 | |||
83 | public delegate void OnParcelPrimCountAddDelegate(SceneObjectGroup obj); | ||
84 | |||
85 | public event OnParcelPrimCountAddDelegate OnParcelPrimCountAdd; | ||
86 | |||
87 | public delegate void OnPluginConsoleDelegate(string[] args); | ||
88 | |||
89 | public event OnPluginConsoleDelegate OnPluginConsole; | ||
90 | |||
91 | public delegate void OnShutdownDelegate(); | ||
92 | |||
93 | public event OnShutdownDelegate OnShutdown; | ||
94 | |||
95 | public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); | ||
96 | public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient); | ||
97 | public delegate void ScriptResetDelegate(uint localID, UUID itemID); | ||
98 | |||
99 | public delegate void OnPermissionErrorDelegate(UUID user, string reason); | ||
100 | |||
101 | public delegate void OnSetRootAgentSceneDelegate(UUID agentID, Scene scene); | ||
102 | |||
103 | public event OnSetRootAgentSceneDelegate OnSetRootAgentScene; | ||
104 | |||
105 | public event ObjectGrabDelegate OnObjectGrab; | ||
106 | public event ObjectDeGrabDelegate OnObjectDeGrab; | ||
107 | public event ScriptResetDelegate OnScriptReset; | ||
108 | |||
109 | public event OnPermissionErrorDelegate OnPermissionError; | ||
110 | |||
111 | public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource); | ||
112 | |||
113 | public event NewRezScript OnRezScript; | ||
114 | |||
115 | public delegate void RemoveScript(uint localID, UUID itemID); | ||
116 | |||
117 | public event RemoveScript OnRemoveScript; | ||
118 | |||
119 | public delegate void StartScript(uint localID, UUID itemID); | ||
120 | |||
121 | public event StartScript OnStartScript; | ||
122 | |||
123 | public delegate void StopScript(uint localID, UUID itemID); | ||
124 | |||
125 | public event StopScript OnStopScript; | ||
126 | |||
127 | public delegate bool SceneGroupMoved(UUID groupID, Vector3 delta); | ||
128 | |||
129 | public event SceneGroupMoved OnSceneGroupMove; | ||
130 | |||
131 | public delegate void SceneGroupGrabed(UUID groupID, Vector3 offset, UUID userID); | ||
132 | |||
133 | public event SceneGroupGrabed OnSceneGroupGrab; | ||
134 | |||
135 | public delegate void LandObjectAdded(ILandObject newParcel); | ||
136 | |||
137 | public event LandObjectAdded OnLandObjectAdded; | ||
138 | |||
139 | public delegate void LandObjectRemoved(UUID globalID); | ||
140 | |||
141 | public event LandObjectRemoved OnLandObjectRemoved; | ||
142 | |||
143 | public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID); | ||
144 | |||
145 | public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; | ||
146 | |||
147 | public delegate void SignificantClientMovement(IClientAPI remote_client); | ||
148 | |||
149 | public event SignificantClientMovement OnSignificantClientMovement; | ||
150 | |||
151 | public delegate void IncomingInstantMessage(GridInstantMessage message); | ||
152 | |||
153 | public event IncomingInstantMessage OnIncomingInstantMessage; | ||
154 | |||
155 | public event IncomingInstantMessage OnUnhandledInstantMessage; | ||
156 | |||
157 | public delegate void ClientClosed(UUID clientID); | ||
158 | |||
159 | public event ClientClosed OnClientClosed; | ||
160 | |||
161 | public delegate void ScriptChangedEvent(uint localID, uint change); | ||
162 | |||
163 | public event ScriptChangedEvent OnScriptChangedEvent; | ||
164 | |||
165 | public delegate void ScriptControlEvent(uint localID, UUID item, UUID avatarID, uint held, uint changed); | ||
166 | |||
167 | public event ScriptControlEvent OnScriptControlEvent; | ||
168 | |||
169 | public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos); | ||
170 | |||
171 | public event ScriptAtTargetEvent OnScriptAtTargetEvent; | ||
172 | |||
173 | public delegate void ScriptNotAtTargetEvent(uint localID); | ||
174 | |||
175 | public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent; | ||
176 | |||
177 | public delegate void ScriptColliding(uint localID, ColliderArgs colliders); | ||
178 | |||
179 | public event ScriptColliding OnScriptColliderStart; | ||
180 | public event ScriptColliding OnScriptColliding; | ||
181 | public event ScriptColliding OnScriptCollidingEnd; | ||
182 | |||
183 | public delegate void OnMakeChildAgentDelegate(ScenePresence presence); | ||
184 | public event OnMakeChildAgentDelegate OnMakeChildAgent; | ||
185 | |||
186 | public delegate void OnMakeRootAgentDelegate(ScenePresence presence); | ||
187 | public event OnMakeRootAgentDelegate OnMakeRootAgent; | ||
188 | |||
189 | public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel); | ||
190 | |||
191 | public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete; | ||
192 | |||
193 | public delegate void RequestChangeWaterHeight(float height); | ||
194 | |||
195 | public event RequestChangeWaterHeight OnRequestChangeWaterHeight; | ||
196 | |||
197 | public delegate void AvatarKillData(uint KillerLocalID, ScenePresence avatar); | ||
198 | |||
199 | public event AvatarKillData OnAvatarKilled; | ||
200 | |||
201 | public delegate void ScriptTimerEvent(uint localID, double timerinterval); | ||
202 | |||
203 | public event ScriptTimerEvent OnScriptTimerEvent; | ||
204 | |||
205 | public delegate void EstateToolsTimeUpdate(ulong regionHandle, bool FixedTime, bool EstateSun, float LindenHour); | ||
206 | public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID); | ||
207 | |||
208 | public event EstateToolsTimeUpdate OnEstateToolsTimeUpdate; | ||
209 | |||
210 | public delegate void ObjectBeingRemovedFromScene(SceneObjectGroup obj); | ||
211 | public event ObjectBeingRemovedFromScene OnObjectBeingRemovedFromScene; | ||
212 | |||
213 | public delegate void NoticeNoLandDataFromStorage(); | ||
214 | public event NoticeNoLandDataFromStorage OnNoticeNoLandDataFromStorage; | ||
215 | |||
216 | public delegate void IncomingLandDataFromStorage(List<LandData> data); | ||
217 | public event IncomingLandDataFromStorage OnIncomingLandDataFromStorage; | ||
218 | |||
219 | public delegate void SetAllowForcefulBan(bool allow); | ||
220 | public event SetAllowForcefulBan OnSetAllowForcefulBan; | ||
221 | |||
222 | public delegate void RequestParcelPrimCountUpdate(); | ||
223 | public event RequestParcelPrimCountUpdate OnRequestParcelPrimCountUpdate; | ||
224 | |||
225 | public delegate void ParcelPrimCountTainted(); | ||
226 | public event ParcelPrimCountTainted OnParcelPrimCountTainted; | ||
227 | public event GetScriptRunning OnGetScriptRunning; | ||
228 | |||
229 | /// <summary> | ||
230 | /// RegisterCapsEvent is called by Scene after the Caps object | ||
231 | /// has been instantiated and before it is return to the | ||
232 | /// client and provides region modules to add their caps. | ||
233 | /// </summary> | ||
234 | public delegate void RegisterCapsEvent(UUID agentID, Caps caps); | ||
235 | public event RegisterCapsEvent OnRegisterCaps; | ||
236 | |||
237 | /// <summary> | ||
238 | /// DeregisterCapsEvent is called by Scene when the caps | ||
239 | /// handler for an agent are removed. | ||
240 | /// </summary> | ||
241 | public delegate void DeregisterCapsEvent(UUID agentID, Caps caps); | ||
242 | public event DeregisterCapsEvent OnDeregisterCaps; | ||
243 | |||
244 | /// <summary> | ||
245 | /// ChatFromWorldEvent is called via Scene when a chat message | ||
246 | /// from world comes in. | ||
247 | /// </summary> | ||
248 | public delegate void ChatFromWorldEvent(Object sender, OSChatMessage chat); | ||
249 | public event ChatFromWorldEvent OnChatFromWorld; | ||
250 | |||
251 | /// <summary> | ||
252 | /// ChatFromClientEvent is triggered via ChatModule (or | ||
253 | /// substitutes thereof) when a chat message | ||
254 | /// from the client comes in. | ||
255 | /// </summary> | ||
256 | public delegate void ChatFromClientEvent(Object sender, OSChatMessage chat); | ||
257 | public event ChatFromClientEvent OnChatFromClient; | ||
258 | |||
259 | /// <summary> | ||
260 | /// ChatBroadcastEvent is called via Scene when a broadcast chat message | ||
261 | /// from world comes in | ||
262 | /// </summary> | ||
263 | public delegate void ChatBroadcastEvent(Object sender, OSChatMessage chat); | ||
264 | public event ChatBroadcastEvent OnChatBroadcast; | ||
265 | |||
266 | public delegate float SunLindenHour(); | ||
267 | public event SunLindenHour OnGetSunLindenHour; | ||
268 | |||
269 | /// <summary> | ||
270 | /// Called when oar file has finished loading, although | ||
271 | /// the scripts may not have started yet | ||
272 | /// Message is non empty string if there were problems loading the oar file | ||
273 | /// </summary> | ||
274 | public delegate void OarFileLoaded(string message); | ||
275 | public event OarFileLoaded OnOarFileLoaded; | ||
276 | |||
277 | /// <summary> | ||
278 | /// Called when an oar file has finished saving | ||
279 | /// Message is non empty string if there were problems saving the oar file | ||
280 | /// </summary> | ||
281 | public delegate void OarFileSaved(string message); | ||
282 | public event OarFileSaved OnOarFileSaved; | ||
283 | |||
284 | /// <summary> | ||
285 | /// Called when the script compile queue becomes empty | ||
286 | /// Returns the number of scripts which failed to start | ||
287 | /// </summary> | ||
288 | public delegate void EmptyScriptCompileQueue(int numScriptsFailed, string message); | ||
289 | public event EmptyScriptCompileQueue OnEmptyScriptCompileQueue; | ||
290 | |||
291 | public class MoneyTransferArgs : EventArgs | ||
292 | { | ||
293 | public UUID sender; | ||
294 | public UUID receiver; | ||
295 | |||
296 | // Always false. The SL protocol sucks. | ||
297 | public bool authenticated = false; | ||
298 | |||
299 | public int amount; | ||
300 | public int transactiontype; | ||
301 | public string description; | ||
302 | |||
303 | public MoneyTransferArgs(UUID asender, UUID areceiver, int aamount, int atransactiontype, string adescription) | ||
304 | { | ||
305 | sender = asender; | ||
306 | receiver = areceiver; | ||
307 | amount = aamount; | ||
308 | transactiontype = atransactiontype; | ||
309 | description = adescription; | ||
310 | } | ||
311 | } | ||
312 | |||
313 | public class LandBuyArgs : EventArgs | ||
314 | { | ||
315 | public UUID agentId = UUID.Zero; | ||
316 | |||
317 | public UUID groupId = UUID.Zero; | ||
318 | |||
319 | public UUID parcelOwnerID = UUID.Zero; | ||
320 | |||
321 | public bool final = false; | ||
322 | public bool groupOwned = false; | ||
323 | public bool removeContribution = false; | ||
324 | public int parcelLocalID = 0; | ||
325 | public int parcelArea = 0; | ||
326 | public int parcelPrice = 0; | ||
327 | public bool authenticated = false; | ||
328 | public bool landValidated = false; | ||
329 | public bool economyValidated = false; | ||
330 | public int transactionID = 0; | ||
331 | public int amountDebited = 0; | ||
332 | |||
333 | public LandBuyArgs(UUID pagentId, UUID pgroupId, bool pfinal, bool pgroupOwned, | ||
334 | bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice, | ||
335 | bool pauthenticated) | ||
336 | { | ||
337 | agentId = pagentId; | ||
338 | groupId = pgroupId; | ||
339 | final = pfinal; | ||
340 | groupOwned = pgroupOwned; | ||
341 | removeContribution = premoveContribution; | ||
342 | parcelLocalID = pparcelLocalID; | ||
343 | parcelArea = pparcelArea; | ||
344 | parcelPrice = pparcelPrice; | ||
345 | authenticated = pauthenticated; | ||
346 | } | ||
347 | } | ||
348 | |||
349 | public delegate void MoneyTransferEvent(Object sender, MoneyTransferArgs e); | ||
350 | |||
351 | public delegate void LandBuy(Object sender, LandBuyArgs e); | ||
352 | |||
353 | public event MoneyTransferEvent OnMoneyTransfer; | ||
354 | public event LandBuy OnLandBuy; | ||
355 | public event LandBuy OnValidateLandBuy; | ||
356 | |||
357 | /* Designated Event Deletage Instances */ | ||
358 | |||
359 | private ScriptChangedEvent handlerScriptChangedEvent = null; //OnScriptChangedEvent; | ||
360 | private ScriptAtTargetEvent handlerScriptAtTargetEvent = null; | ||
361 | private ScriptNotAtTargetEvent handlerScriptNotAtTargetEvent = null; | ||
362 | private ClientMovement handlerClientMovement = null; //OnClientMovement; | ||
363 | private OnPermissionErrorDelegate handlerPermissionError = null; //OnPermissionError; | ||
364 | private OnPluginConsoleDelegate handlerPluginConsole = null; //OnPluginConsole; | ||
365 | private OnFrameDelegate handlerFrame = null; //OnFrame; | ||
366 | private OnNewClientDelegate handlerNewClient = null; //OnNewClient; | ||
367 | private OnClientConnectCoreDelegate handlerClientConnect = null; //OnClientConnect | ||
368 | private OnNewPresenceDelegate handlerNewPresence = null; //OnNewPresence; | ||
369 | private OnRemovePresenceDelegate handlerRemovePresence = null; //OnRemovePresence; | ||
370 | private OnBackupDelegate handlerBackup = null; //OnBackup; | ||
371 | private OnParcelPrimCountUpdateDelegate handlerParcelPrimCountUpdate = null; //OnParcelPrimCountUpdate; | ||
372 | private MoneyTransferEvent handlerMoneyTransfer = null; //OnMoneyTransfer; | ||
373 | private OnParcelPrimCountAddDelegate handlerParcelPrimCountAdd = null; //OnParcelPrimCountAdd; | ||
374 | private OnShutdownDelegate handlerShutdown = null; //OnShutdown; | ||
375 | private ObjectGrabDelegate handlerObjectGrab = null; //OnObjectGrab; | ||
376 | private ObjectDeGrabDelegate handlerObjectDeGrab = null; //OnObjectDeGrab; | ||
377 | private ScriptResetDelegate handlerScriptReset = null; // OnScriptReset | ||
378 | private NewRezScript handlerRezScript = null; //OnRezScript; | ||
379 | private RemoveScript handlerRemoveScript = null; //OnRemoveScript; | ||
380 | private StartScript handlerStartScript = null; //OnStartScript; | ||
381 | private StopScript handlerStopScript = null; //OnStopScript; | ||
382 | private SceneGroupMoved handlerSceneGroupMove = null; //OnSceneGroupMove; | ||
383 | private SceneGroupGrabed handlerSceneGroupGrab = null; //OnSceneGroupGrab; | ||
384 | private LandObjectAdded handlerLandObjectAdded = null; //OnLandObjectAdded; | ||
385 | private LandObjectRemoved handlerLandObjectRemoved = null; //OnLandObjectRemoved; | ||
386 | private AvatarEnteringNewParcel handlerAvatarEnteringNewParcel = null; //OnAvatarEnteringNewParcel; | ||
387 | private IncomingInstantMessage handlerIncomingInstantMessage = null; //OnIncomingInstantMessage; | ||
388 | private IncomingInstantMessage handlerUnhandledInstantMessage = null; //OnUnhandledInstantMessage; | ||
389 | private ClientClosed handlerClientClosed = null; //OnClientClosed; | ||
390 | private OnMakeChildAgentDelegate handlerMakeChildAgent = null; //OnMakeChildAgent; | ||
391 | private OnMakeRootAgentDelegate handlerMakeRootAgent = null; //OnMakeRootAgent; | ||
392 | private OnTerrainTickDelegate handlerTerrainTick = null; // OnTerainTick; | ||
393 | private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps; | ||
394 | private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps; | ||
395 | private ChatFromWorldEvent handlerChatFromWorld = null; // OnChatFromWorld; | ||
396 | private ChatFromClientEvent handlerChatFromClient = null; // OnChatFromClient; | ||
397 | private ChatBroadcastEvent handlerChatBroadcast = null; // OnChatBroadcast; | ||
398 | private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null; | ||
399 | private RequestChangeWaterHeight handlerRequestChangeWaterHeight = null; //OnRequestChangeWaterHeight | ||
400 | private ScriptControlEvent handlerScriptControlEvent = null; | ||
401 | private SignificantClientMovement handlerSignificantClientMovement = null; | ||
402 | |||
403 | private LandBuy handlerLandBuy = null; | ||
404 | private LandBuy handlerValidateLandBuy = null; | ||
405 | private AvatarKillData handlerAvatarKill = null; | ||
406 | |||
407 | private NoticeNoLandDataFromStorage handlerNoticeNoLandDataFromStorage = null; | ||
408 | private IncomingLandDataFromStorage handlerIncomingLandDataFromStorage = null; | ||
409 | private SetAllowForcefulBan handlerSetAllowForcefulBan = null; | ||
410 | private RequestParcelPrimCountUpdate handlerRequestParcelPrimCountUpdate = null; | ||
411 | private ParcelPrimCountTainted handlerParcelPrimCountTainted = null; | ||
412 | private ObjectBeingRemovedFromScene handlerObjectBeingRemovedFromScene = null; | ||
413 | private ScriptTimerEvent handlerScriptTimerEvent = null; | ||
414 | private EstateToolsTimeUpdate handlerEstateToolsTimeUpdate = null; | ||
415 | |||
416 | private ScriptColliding handlerCollidingStart = null; | ||
417 | private ScriptColliding handlerColliding = null; | ||
418 | private ScriptColliding handlerCollidingEnd = null; | ||
419 | private GetScriptRunning handlerGetScriptRunning = null; | ||
420 | |||
421 | private SunLindenHour handlerSunGetLindenHour = null; | ||
422 | private OnSetRootAgentSceneDelegate handlerSetRootAgentScene = null; | ||
423 | |||
424 | private OarFileLoaded handlerOarFileLoaded = null; | ||
425 | private OarFileSaved handlerOarFileSaved = null; | ||
426 | |||
427 | private EmptyScriptCompileQueue handlerEmptyScriptCompileQueue = null; | ||
428 | |||
429 | public void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) | ||
430 | { | ||
431 | handlerGetScriptRunning = OnGetScriptRunning; | ||
432 | if (handlerGetScriptRunning != null) | ||
433 | handlerGetScriptRunning(controllingClient, objectID, itemID); | ||
434 | } | ||
435 | |||
436 | public void TriggerOnScriptChangedEvent(uint localID, uint change) | ||
437 | { | ||
438 | handlerScriptChangedEvent = OnScriptChangedEvent; | ||
439 | if (handlerScriptChangedEvent != null) | ||
440 | handlerScriptChangedEvent(localID, change); | ||
441 | } | ||
442 | |||
443 | public void TriggerOnClientMovement(ScenePresence avatar) | ||
444 | { | ||
445 | handlerClientMovement = OnClientMovement; | ||
446 | if (handlerClientMovement != null) | ||
447 | handlerClientMovement(avatar); | ||
448 | } | ||
449 | |||
450 | public void TriggerPermissionError(UUID user, string reason) | ||
451 | { | ||
452 | handlerPermissionError = OnPermissionError; | ||
453 | if (handlerPermissionError != null) | ||
454 | handlerPermissionError(user, reason); | ||
455 | } | ||
456 | |||
457 | public void TriggerOnPluginConsole(string[] args) | ||
458 | { | ||
459 | handlerPluginConsole = OnPluginConsole; | ||
460 | if (handlerPluginConsole != null) | ||
461 | handlerPluginConsole(args); | ||
462 | } | ||
463 | |||
464 | public void TriggerOnFrame() | ||
465 | { | ||
466 | handlerFrame = OnFrame; | ||
467 | if (handlerFrame != null) | ||
468 | { | ||
469 | handlerFrame(); | ||
470 | } | ||
471 | } | ||
472 | |||
473 | public void TriggerOnNewClient(IClientAPI client) | ||
474 | { | ||
475 | handlerNewClient = OnNewClient; | ||
476 | if (handlerNewClient != null) | ||
477 | handlerNewClient(client); | ||
478 | |||
479 | if (client is IClientCore) | ||
480 | { | ||
481 | handlerClientConnect = OnClientConnect; | ||
482 | handlerClientConnect((IClientCore) client); | ||
483 | } | ||
484 | } | ||
485 | |||
486 | public void TriggerOnNewPresence(ScenePresence presence) | ||
487 | { | ||
488 | handlerNewPresence = OnNewPresence; | ||
489 | if (handlerNewPresence != null) | ||
490 | handlerNewPresence(presence); | ||
491 | } | ||
492 | |||
493 | public void TriggerOnRemovePresence(UUID agentId) | ||
494 | { | ||
495 | handlerRemovePresence = OnRemovePresence; | ||
496 | if (handlerRemovePresence != null) | ||
497 | { | ||
498 | handlerRemovePresence(agentId); | ||
499 | } | ||
500 | } | ||
501 | |||
502 | public void TriggerOnBackup(IRegionDataStore dstore) | ||
503 | { | ||
504 | handlerBackup = OnBackup; | ||
505 | if (handlerBackup != null) | ||
506 | { | ||
507 | handlerBackup(dstore, false); | ||
508 | } | ||
509 | } | ||
510 | |||
511 | public void TriggerParcelPrimCountUpdate() | ||
512 | { | ||
513 | handlerParcelPrimCountUpdate = OnParcelPrimCountUpdate; | ||
514 | if (handlerParcelPrimCountUpdate != null) | ||
515 | { | ||
516 | handlerParcelPrimCountUpdate(); | ||
517 | } | ||
518 | } | ||
519 | |||
520 | public void TriggerMoneyTransfer(Object sender, MoneyTransferArgs e) | ||
521 | { | ||
522 | handlerMoneyTransfer = OnMoneyTransfer; | ||
523 | if (handlerMoneyTransfer != null) | ||
524 | { | ||
525 | handlerMoneyTransfer(sender, e); | ||
526 | } | ||
527 | } | ||
528 | |||
529 | public void TriggerTerrainTick() | ||
530 | { | ||
531 | handlerTerrainTick = OnTerrainTick; | ||
532 | if (handlerTerrainTick != null) | ||
533 | { | ||
534 | handlerTerrainTick(); | ||
535 | } | ||
536 | } | ||
537 | |||
538 | public void TriggerParcelPrimCountAdd(SceneObjectGroup obj) | ||
539 | { | ||
540 | handlerParcelPrimCountAdd = OnParcelPrimCountAdd; | ||
541 | if (handlerParcelPrimCountAdd != null) | ||
542 | { | ||
543 | handlerParcelPrimCountAdd(obj); | ||
544 | } | ||
545 | } | ||
546 | |||
547 | public void TriggerObjectBeingRemovedFromScene(SceneObjectGroup obj) | ||
548 | { | ||
549 | handlerObjectBeingRemovedFromScene = OnObjectBeingRemovedFromScene; | ||
550 | if (handlerObjectBeingRemovedFromScene != null) | ||
551 | { | ||
552 | handlerObjectBeingRemovedFromScene(obj); | ||
553 | } | ||
554 | } | ||
555 | |||
556 | public void TriggerShutdown() | ||
557 | { | ||
558 | handlerShutdown = OnShutdown; | ||
559 | if (handlerShutdown != null) | ||
560 | handlerShutdown(); | ||
561 | } | ||
562 | |||
563 | public void TriggerObjectGrab(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs) | ||
564 | { | ||
565 | handlerObjectGrab = OnObjectGrab; | ||
566 | if (handlerObjectGrab != null) | ||
567 | { | ||
568 | handlerObjectGrab(localID, originalID, offsetPos, remoteClient, surfaceArgs); | ||
569 | } | ||
570 | } | ||
571 | |||
572 | public void TriggerObjectDeGrab(uint localID, uint originalID, IClientAPI remoteClient) | ||
573 | { | ||
574 | handlerObjectDeGrab = OnObjectDeGrab; | ||
575 | if (handlerObjectDeGrab != null) | ||
576 | { | ||
577 | handlerObjectDeGrab(localID, originalID, remoteClient); | ||
578 | } | ||
579 | } | ||
580 | |||
581 | public void TriggerScriptReset(uint localID, UUID itemID) | ||
582 | { | ||
583 | handlerScriptReset = OnScriptReset; | ||
584 | if (handlerScriptReset != null) | ||
585 | { | ||
586 | handlerScriptReset(localID, itemID); | ||
587 | } | ||
588 | } | ||
589 | |||
590 | public void TriggerRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource) | ||
591 | { | ||
592 | handlerRezScript = OnRezScript; | ||
593 | if (handlerRezScript != null) | ||
594 | { | ||
595 | handlerRezScript(localID, itemID, script, startParam, | ||
596 | postOnRez, engine, stateSource); | ||
597 | } | ||
598 | } | ||
599 | |||
600 | public void TriggerStartScript(uint localID, UUID itemID) | ||
601 | { | ||
602 | handlerStartScript = OnStartScript; | ||
603 | if (handlerStartScript != null) | ||
604 | { | ||
605 | handlerStartScript(localID, itemID); | ||
606 | } | ||
607 | } | ||
608 | |||
609 | public void TriggerStopScript(uint localID, UUID itemID) | ||
610 | { | ||
611 | handlerStopScript = OnStopScript; | ||
612 | if (handlerStopScript != null) | ||
613 | { | ||
614 | handlerStopScript(localID, itemID); | ||
615 | } | ||
616 | } | ||
617 | |||
618 | public void TriggerRemoveScript(uint localID, UUID itemID) | ||
619 | { | ||
620 | handlerRemoveScript = OnRemoveScript; | ||
621 | if (handlerRemoveScript != null) | ||
622 | { | ||
623 | handlerRemoveScript(localID, itemID); | ||
624 | } | ||
625 | } | ||
626 | |||
627 | public bool TriggerGroupMove(UUID groupID, Vector3 delta) | ||
628 | { | ||
629 | handlerSceneGroupMove = OnSceneGroupMove; | ||
630 | |||
631 | if (handlerSceneGroupMove != null) | ||
632 | { | ||
633 | return handlerSceneGroupMove(groupID, delta); | ||
634 | } | ||
635 | return true; | ||
636 | } | ||
637 | |||
638 | public void TriggerGroupGrab(UUID groupID, Vector3 offset, UUID userID) | ||
639 | { | ||
640 | handlerSceneGroupGrab = OnSceneGroupGrab; | ||
641 | if (handlerSceneGroupGrab != null) | ||
642 | { | ||
643 | handlerSceneGroupGrab(groupID, offset, userID); | ||
644 | } | ||
645 | } | ||
646 | |||
647 | public void TriggerLandObjectAdded(ILandObject newParcel) | ||
648 | { | ||
649 | handlerLandObjectAdded = OnLandObjectAdded; | ||
650 | |||
651 | if (handlerLandObjectAdded != null) | ||
652 | { | ||
653 | handlerLandObjectAdded(newParcel); | ||
654 | } | ||
655 | } | ||
656 | |||
657 | public void TriggerLandObjectRemoved(UUID globalID) | ||
658 | { | ||
659 | handlerLandObjectRemoved = OnLandObjectRemoved; | ||
660 | if (handlerLandObjectRemoved != null) | ||
661 | { | ||
662 | handlerLandObjectRemoved(globalID); | ||
663 | } | ||
664 | } | ||
665 | |||
666 | public void TriggerLandObjectUpdated(uint localParcelID, ILandObject newParcel) | ||
667 | { | ||
668 | //triggerLandObjectRemoved(localParcelID); | ||
669 | |||
670 | TriggerLandObjectAdded(newParcel); | ||
671 | } | ||
672 | |||
673 | public void TriggerAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID) | ||
674 | { | ||
675 | handlerAvatarEnteringNewParcel = OnAvatarEnteringNewParcel; | ||
676 | |||
677 | if (handlerAvatarEnteringNewParcel != null) | ||
678 | { | ||
679 | handlerAvatarEnteringNewParcel(avatar, localLandID, regionID); | ||
680 | } | ||
681 | } | ||
682 | |||
683 | public void TriggerIncomingInstantMessage(GridInstantMessage message) | ||
684 | { | ||
685 | handlerIncomingInstantMessage = OnIncomingInstantMessage; | ||
686 | if (handlerIncomingInstantMessage != null) | ||
687 | { | ||
688 | handlerIncomingInstantMessage(message); | ||
689 | } | ||
690 | } | ||
691 | |||
692 | public void TriggerUnhandledInstantMessage(GridInstantMessage message) | ||
693 | { | ||
694 | handlerUnhandledInstantMessage = OnUnhandledInstantMessage; | ||
695 | if (handlerUnhandledInstantMessage != null) | ||
696 | { | ||
697 | handlerUnhandledInstantMessage(message); | ||
698 | } | ||
699 | } | ||
700 | |||
701 | public void TriggerClientClosed(UUID ClientID) | ||
702 | { | ||
703 | handlerClientClosed = OnClientClosed; | ||
704 | if (handlerClientClosed != null) | ||
705 | { | ||
706 | handlerClientClosed(ClientID); | ||
707 | } | ||
708 | } | ||
709 | |||
710 | public void TriggerOnMakeChildAgent(ScenePresence presence) | ||
711 | { | ||
712 | handlerMakeChildAgent = OnMakeChildAgent; | ||
713 | if (handlerMakeChildAgent != null) | ||
714 | { | ||
715 | handlerMakeChildAgent(presence); | ||
716 | } | ||
717 | } | ||
718 | |||
719 | public void TriggerOnMakeRootAgent(ScenePresence presence) | ||
720 | { | ||
721 | handlerMakeRootAgent = OnMakeRootAgent; | ||
722 | if (handlerMakeRootAgent != null) | ||
723 | { | ||
724 | handlerMakeRootAgent(presence); | ||
725 | } | ||
726 | } | ||
727 | |||
728 | public void TriggerOnRegisterCaps(UUID agentID, Caps caps) | ||
729 | { | ||
730 | handlerRegisterCaps = OnRegisterCaps; | ||
731 | if (handlerRegisterCaps != null) | ||
732 | { | ||
733 | handlerRegisterCaps(agentID, caps); | ||
734 | } | ||
735 | } | ||
736 | |||
737 | public void TriggerOnDeregisterCaps(UUID agentID, Caps caps) | ||
738 | { | ||
739 | handlerDeregisterCaps = OnDeregisterCaps; | ||
740 | if (handlerDeregisterCaps != null) | ||
741 | { | ||
742 | handlerDeregisterCaps(agentID, caps); | ||
743 | } | ||
744 | } | ||
745 | |||
746 | public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, UUID AssetID, String AssetName, int userlevel) | ||
747 | { | ||
748 | handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete; | ||
749 | if (handlerNewInventoryItemUpdateComplete != null) | ||
750 | { | ||
751 | handlerNewInventoryItemUpdateComplete(agentID, AssetID, AssetName, userlevel); | ||
752 | } | ||
753 | } | ||
754 | |||
755 | public void TriggerLandBuy(Object sender, LandBuyArgs e) | ||
756 | { | ||
757 | handlerLandBuy = OnLandBuy; | ||
758 | if (handlerLandBuy != null) | ||
759 | { | ||
760 | handlerLandBuy(sender, e); | ||
761 | } | ||
762 | } | ||
763 | |||
764 | public void TriggerValidateLandBuy(Object sender, LandBuyArgs e) | ||
765 | { | ||
766 | handlerValidateLandBuy = OnValidateLandBuy; | ||
767 | if (handlerValidateLandBuy != null) | ||
768 | { | ||
769 | handlerValidateLandBuy(sender, e); | ||
770 | } | ||
771 | } | ||
772 | |||
773 | public void TriggerAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 currentpos) | ||
774 | { | ||
775 | handlerScriptAtTargetEvent = OnScriptAtTargetEvent; | ||
776 | if (handlerScriptAtTargetEvent != null) | ||
777 | { | ||
778 | handlerScriptAtTargetEvent(localID, handle, targetpos, currentpos); | ||
779 | } | ||
780 | } | ||
781 | |||
782 | public void TriggerNotAtTargetEvent(uint localID) | ||
783 | { | ||
784 | handlerScriptNotAtTargetEvent = OnScriptNotAtTargetEvent; | ||
785 | if (handlerScriptNotAtTargetEvent != null) | ||
786 | { | ||
787 | handlerScriptNotAtTargetEvent(localID); | ||
788 | } | ||
789 | } | ||
790 | |||
791 | public void TriggerRequestChangeWaterHeight(float height) | ||
792 | { | ||
793 | handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight; | ||
794 | if (handlerRequestChangeWaterHeight != null) | ||
795 | { | ||
796 | handlerRequestChangeWaterHeight(height); | ||
797 | } | ||
798 | } | ||
799 | |||
800 | public void TriggerAvatarKill(uint KillerObjectLocalID, ScenePresence DeadAvatar) | ||
801 | { | ||
802 | handlerAvatarKill = OnAvatarKilled; | ||
803 | if (handlerAvatarKill != null) | ||
804 | { | ||
805 | handlerAvatarKill(KillerObjectLocalID, DeadAvatar); | ||
806 | } | ||
807 | } | ||
808 | |||
809 | public void TriggerSignificantClientMovement(IClientAPI client) | ||
810 | { | ||
811 | handlerSignificantClientMovement = OnSignificantClientMovement; | ||
812 | if (handlerSignificantClientMovement != null) | ||
813 | { | ||
814 | handlerSignificantClientMovement(client); | ||
815 | } | ||
816 | } | ||
817 | |||
818 | public void TriggerOnChatFromWorld(Object sender, OSChatMessage chat) | ||
819 | { | ||
820 | handlerChatFromWorld = OnChatFromWorld; | ||
821 | if (handlerChatFromWorld != null) | ||
822 | { | ||
823 | handlerChatFromWorld(sender, chat); | ||
824 | } | ||
825 | } | ||
826 | |||
827 | public void TriggerOnChatFromClient(Object sender, OSChatMessage chat) | ||
828 | { | ||
829 | handlerChatFromClient = OnChatFromClient; | ||
830 | if (handlerChatFromClient != null) | ||
831 | { | ||
832 | handlerChatFromClient(sender, chat); | ||
833 | } | ||
834 | } | ||
835 | |||
836 | public void TriggerOnChatBroadcast(Object sender, OSChatMessage chat) | ||
837 | { | ||
838 | handlerChatBroadcast = OnChatBroadcast; | ||
839 | if (handlerChatBroadcast != null) | ||
840 | { | ||
841 | handlerChatBroadcast(sender, chat); | ||
842 | } | ||
843 | } | ||
844 | |||
845 | internal void TriggerControlEvent(uint p, UUID scriptUUID, UUID avatarID, uint held, uint _changed) | ||
846 | { | ||
847 | handlerScriptControlEvent = OnScriptControlEvent; | ||
848 | if (handlerScriptControlEvent != null) | ||
849 | { | ||
850 | handlerScriptControlEvent(p, scriptUUID, avatarID, held, _changed); | ||
851 | } | ||
852 | } | ||
853 | |||
854 | public void TriggerNoticeNoLandDataFromStorage() | ||
855 | { | ||
856 | handlerNoticeNoLandDataFromStorage = OnNoticeNoLandDataFromStorage; | ||
857 | if (handlerNoticeNoLandDataFromStorage != null) | ||
858 | { | ||
859 | handlerNoticeNoLandDataFromStorage(); | ||
860 | |||
861 | } | ||
862 | } | ||
863 | |||
864 | public void TriggerIncomingLandDataFromStorage(List<LandData> landData) | ||
865 | { | ||
866 | handlerIncomingLandDataFromStorage = OnIncomingLandDataFromStorage; | ||
867 | if (handlerIncomingLandDataFromStorage != null) | ||
868 | { | ||
869 | handlerIncomingLandDataFromStorage(landData); | ||
870 | |||
871 | } | ||
872 | } | ||
873 | |||
874 | public void TriggerSetAllowForcefulBan(bool allow) | ||
875 | { | ||
876 | handlerSetAllowForcefulBan = OnSetAllowForcefulBan; | ||
877 | if (handlerSetAllowForcefulBan != null) | ||
878 | { | ||
879 | handlerSetAllowForcefulBan(allow); | ||
880 | |||
881 | } | ||
882 | } | ||
883 | |||
884 | public void TriggerRequestParcelPrimCountUpdate() | ||
885 | { | ||
886 | handlerRequestParcelPrimCountUpdate = OnRequestParcelPrimCountUpdate; | ||
887 | if (handlerRequestParcelPrimCountUpdate != null) | ||
888 | { | ||
889 | handlerRequestParcelPrimCountUpdate(); | ||
890 | } | ||
891 | } | ||
892 | |||
893 | public void TriggerParcelPrimCountTainted() | ||
894 | { | ||
895 | handlerParcelPrimCountTainted = OnParcelPrimCountTainted; | ||
896 | if (handlerParcelPrimCountTainted != null) | ||
897 | { | ||
898 | handlerParcelPrimCountTainted(); | ||
899 | } | ||
900 | } | ||
901 | |||
902 | // this lets us keep track of nasty script events like timer, etc. | ||
903 | public void TriggerTimerEvent(uint objLocalID, double Interval) | ||
904 | { | ||
905 | handlerScriptTimerEvent = OnScriptTimerEvent; | ||
906 | if (handlerScriptTimerEvent != null) | ||
907 | { | ||
908 | handlerScriptTimerEvent(objLocalID, Interval); | ||
909 | } | ||
910 | } | ||
911 | |||
912 | public void TriggerEstateToolsTimeUpdate(ulong regionHandle, bool FixedTime, bool useEstateTime, float LindenHour) | ||
913 | { | ||
914 | handlerEstateToolsTimeUpdate = OnEstateToolsTimeUpdate; | ||
915 | if (handlerEstateToolsTimeUpdate != null) | ||
916 | { | ||
917 | handlerEstateToolsTimeUpdate(regionHandle, FixedTime, useEstateTime, LindenHour); | ||
918 | } | ||
919 | } | ||
920 | |||
921 | public float GetSunLindenHour() | ||
922 | { | ||
923 | handlerSunGetLindenHour = OnGetSunLindenHour; | ||
924 | if (handlerSunGetLindenHour != null) | ||
925 | { | ||
926 | return handlerSunGetLindenHour(); | ||
927 | } | ||
928 | return 6; | ||
929 | } | ||
930 | |||
931 | public void TriggerOarFileLoaded(string message) | ||
932 | { | ||
933 | handlerOarFileLoaded = OnOarFileLoaded; | ||
934 | if (handlerOarFileLoaded != null) | ||
935 | handlerOarFileLoaded(message); | ||
936 | } | ||
937 | |||
938 | public void TriggerOarFileSaved(string message) | ||
939 | { | ||
940 | handlerOarFileSaved = OnOarFileSaved; | ||
941 | if (handlerOarFileSaved != null) | ||
942 | handlerOarFileSaved(message); | ||
943 | } | ||
944 | |||
945 | public void TriggerEmptyScriptCompileQueue(int numScriptsFailed, string message) | ||
946 | { | ||
947 | handlerEmptyScriptCompileQueue = OnEmptyScriptCompileQueue; | ||
948 | if (handlerEmptyScriptCompileQueue != null) | ||
949 | handlerEmptyScriptCompileQueue(numScriptsFailed, message); | ||
950 | } | ||
951 | |||
952 | public void TriggerScriptCollidingStart(uint localId, ColliderArgs colliders) | ||
953 | { | ||
954 | handlerCollidingStart = OnScriptColliderStart; | ||
955 | if (handlerCollidingStart != null) | ||
956 | handlerCollidingStart(localId, colliders); | ||
957 | } | ||
958 | |||
959 | public void TriggerScriptColliding(uint localId, ColliderArgs colliders) | ||
960 | { | ||
961 | handlerColliding = OnScriptColliding; | ||
962 | if (handlerColliding != null) | ||
963 | handlerColliding(localId, colliders); | ||
964 | } | ||
965 | |||
966 | public void TriggerScriptCollidingEnd(uint localId, ColliderArgs colliders) | ||
967 | { | ||
968 | handlerCollidingEnd = OnScriptCollidingEnd; | ||
969 | if (handlerCollidingEnd != null) | ||
970 | handlerCollidingEnd(localId, colliders); | ||
971 | } | ||
972 | |||
973 | public void TriggerSetRootAgentScene(UUID agentID, Scene scene) | ||
974 | { | ||
975 | handlerSetRootAgentScene = OnSetRootAgentScene; | ||
976 | if (handlerSetRootAgentScene != null) | ||
977 | handlerSetRootAgentScene(agentID, scene); | ||
978 | } | ||
979 | } | ||
980 | } | ||