OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
EventManager.cs
Go to the documentation of this file.
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 OpenSimulator 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 System.Collections.Generic;
30 using System.Reflection;
31 using log4net;
32 using OpenMetaverse;
33 using OpenSim.Framework;
34 using OpenSim.Framework.Client;
35 using OpenSim.Region.Framework.Interfaces;
38 
39 namespace OpenSim.Region.Framework.Scenes
40 {
44  public class EventManager
45  {
46  private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 
48  public delegate void OnFrameDelegate();
49 
58  public event OnFrameDelegate OnFrame;
59 
60  public delegate void ClientMovement(ScenePresence client);
61 
69  public event ClientMovement OnClientMovement;
70 
71  public delegate void OnTerrainTaintedDelegate();
72 
80  public event OnTerrainTaintedDelegate OnTerrainTainted;
81 
82  public delegate void OnTerrainTickDelegate();
83  public delegate void OnTerrainCheckUpdatesDelegate();
84 
92  public event OnTerrainTickDelegate OnTerrainTick;
93  public event OnTerrainCheckUpdatesDelegate OnTerrainCheckUpdates;
94 
95  public delegate void OnTerrainUpdateDelegate();
96 
97  public event OnTerrainUpdateDelegate OnTerrainUpdate;
98 
99  public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup);
100 
108  public event OnBackupDelegate OnBackup;
109 
110  public delegate void OnClientConnectCoreDelegate(IClientCore client);
111 
121  public event OnClientConnectCoreDelegate OnClientConnect;
122 
123  public delegate void OnNewClientDelegate(IClientAPI client);
124 
136  public event OnNewClientDelegate OnNewClient;
137 
145  public event Action<IClientAPI> OnClientLogin;
146 
147  public delegate void OnNewPresenceDelegate(ScenePresence presence);
148 
156  public event OnNewPresenceDelegate OnNewPresence;
157 
158  public delegate void OnRemovePresenceDelegate(UUID agentId);
159 
170  public event OnRemovePresenceDelegate OnRemovePresence;
171 
172  public delegate void OnParcelPrimCountUpdateDelegate();
173 
188  public event OnParcelPrimCountUpdateDelegate OnParcelPrimCountUpdate;
189 
190  public delegate void OnParcelPrimCountAddDelegate(SceneObjectGroup obj);
191 
200  public event OnParcelPrimCountAddDelegate OnParcelPrimCountAdd;
201 
202  public delegate void OnPluginConsoleDelegate(string[] args);
203 
220  public event OnPluginConsoleDelegate OnPluginConsole;
221 
225  public event Action OnShutdown;
226 
227  public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
228  public delegate void ScriptResetDelegate(uint localID, UUID itemID);
229 
230  public delegate void OnPermissionErrorDelegate(UUID user, string reason);
231 
232  public delegate void OnSetRootAgentSceneDelegate(UUID agentID, Scene scene);
233 
246  public event OnSetRootAgentSceneDelegate OnSetRootAgentScene;
247 
257 
265  public event Action<Scene> OnSceneShuttingDown;
266 
277  public event ObjectGrabDelegate OnObjectGrab;
278  public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
279 
288  public event ObjectGrabDelegate OnObjectGrabbing;
289 
298  public event ObjectDeGrabDelegate OnObjectDeGrab;
299 
309  public event ScriptResetDelegate OnScriptReset;
310 
311  public event OnPermissionErrorDelegate OnPermissionError;
312 
321  public event NewRezScript OnRezScript;
322  public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource);
323 
324  public delegate void RemoveScript(uint localID, UUID itemID);
325 
336  public event RemoveScript OnRemoveScript;
337 
338  public delegate void StartScript(uint localID, UUID itemID);
339 
349  public event StartScript OnStartScript;
350 
351  public delegate void StopScript(uint localID, UUID itemID);
352 
362  public event StopScript OnStopScript;
363 
364  public delegate bool SceneGroupMoved(UUID groupID, Vector3 delta);
365 
374  public event SceneGroupMoved OnSceneGroupMove;
375 
376  public delegate void SceneGroupGrabed(UUID groupID, Vector3 offset, UUID userID);
377 
389  public event SceneGroupGrabed OnSceneGroupGrab;
390 
391  public delegate bool SceneGroupSpinStarted(UUID groupID);
392 
403  public event SceneGroupSpinStarted OnSceneGroupSpinStart;
404 
405  public delegate bool SceneGroupSpun(UUID groupID, Quaternion rotation);
406 
417  public event SceneGroupSpun OnSceneGroupSpin;
418 
419  public delegate void LandObjectAdded(ILandObject newParcel);
420  public event LandObjectAdded OnLandObjectAdded;
421 
422  public delegate void LandObjectRemoved(UUID globalID);
423  public event LandObjectRemoved OnLandObjectRemoved;
424 
425  public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID);
426  public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
427 
428  public delegate void AvatarAppearanceChange(ScenePresence avatar);
429  public event AvatarAppearanceChange OnAvatarAppearanceChange;
430 
431  public event Action<ScenePresence> OnSignificantClientMovement;
432 
433  public delegate void IncomingInstantMessage(GridInstantMessage message);
434  public event IncomingInstantMessage OnIncomingInstantMessage;
435 
436  public delegate void CrossAgentToNewRegion(ScenePresence sp, bool isFlying, GridRegion newRegion);
437  public event CrossAgentToNewRegion OnCrossAgentToNewRegion;
438 
439  public event IncomingInstantMessage OnUnhandledInstantMessage;
440 
441  public delegate void ClientClosed(UUID clientID, Scene scene);
442 
452  public event ClientClosed OnClientClosed;
453 
454  public delegate void NewScript(UUID clientID, SceneObjectPart part, UUID itemID);
455 
465  public event NewScript OnNewScript;
466 
467  public delegate void ExtraSettingChangedDelegate(Scene scene, string name, string value);
468  public event ExtraSettingChangedDelegate OnExtraSettingChanged;
469 
470  public virtual void TriggerNewScript(UUID clientID, SceneObjectPart part, UUID itemID)
471  {
472  NewScript handlerNewScript = OnNewScript;
473  if (handlerNewScript != null)
474  {
475  foreach (NewScript d in handlerNewScript.GetInvocationList())
476  {
477  try
478  {
479  d(clientID, part, itemID);
480  }
481  catch (Exception e)
482  {
483  m_log.ErrorFormat(
484  "[EVENT MANAGER]: Delegate for TriggerNewScript failed - continuing. {0} {1}",
485  e.Message, e.StackTrace);
486  }
487  }
488  }
489  }
490 
491  public delegate void UpdateScript(UUID clientID, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID);
492 
505  public event UpdateScript OnUpdateScript;
506 
507  public virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID)
508  {
509  UpdateScript handlerUpdateScript = OnUpdateScript;
510  if (handlerUpdateScript != null)
511  {
512  foreach (UpdateScript d in handlerUpdateScript.GetInvocationList())
513  {
514  try
515  {
516  d(clientId, itemId, primId, isScriptRunning, newAssetID);
517  }
518  catch (Exception e)
519  {
520  m_log.ErrorFormat(
521  "[EVENT MANAGER]: Delegate for TriggerUpdateScript failed - continuing. {0} {1}",
522  e.Message, e.StackTrace);
523  }
524  }
525  }
526  }
527 
541  public event ScriptChangedEvent OnScriptChangedEvent;
542  public delegate void ScriptChangedEvent(uint localID, uint change);
543 
544  public delegate void ScriptControlEvent(UUID item, UUID avatarID, uint held, uint changed);
545 
556  public event ScriptControlEvent OnScriptControlEvent;
557 
558  public delegate void ScriptMovingStartEvent(uint localID);
559 
563  public event ScriptMovingStartEvent OnScriptMovingStartEvent;
564 
565  public delegate void ScriptMovingEndEvent(uint localID);
566 
570  public event ScriptMovingEndEvent OnScriptMovingEndEvent;
571 
572  public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos);
573 
584  public event ScriptAtTargetEvent OnScriptAtTargetEvent;
585 
586  public delegate void ScriptNotAtTargetEvent(uint localID);
587 
598  public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent;
599 
600  public delegate void ScriptAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion atrot);
601 
612  public event ScriptAtRotTargetEvent OnScriptAtRotTargetEvent;
613 
614  public delegate void ScriptNotAtRotTargetEvent(uint localID);
615 
626  public event ScriptNotAtRotTargetEvent OnScriptNotAtRotTargetEvent;
627 
628  public delegate void ScriptColliding(uint localID, ColliderArgs colliders);
629 
641  public event ScriptColliding OnScriptColliderStart;
642 
655  public event ScriptColliding OnScriptColliding;
656 
668  public event ScriptColliding OnScriptCollidingEnd;
669 
681  public event ScriptColliding OnScriptLandColliderStart;
682 
694  public event ScriptColliding OnScriptLandColliding;
695 
707  public event ScriptColliding OnScriptLandColliderEnd;
708 
709  public delegate void OnMakeChildAgentDelegate(ScenePresence presence);
710 
721  public event OnMakeChildAgentDelegate OnMakeChildAgent;
722 
723  public delegate void OnSaveNewWindlightProfileDelegate();
724  public delegate void OnSendNewWindlightProfileTargetedDelegate(RegionLightShareData wl, UUID user);
725 
740  public event Action<ScenePresence> OnMakeRootAgent;
741 
742  public event OnSendNewWindlightProfileTargetedDelegate OnSendNewWindlightProfileTargeted;
743  public event OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile;
744 
748  public event OnIncomingSceneObjectDelegate OnIncomingSceneObject;
749  public delegate void OnIncomingSceneObjectDelegate(SceneObjectGroup so);
750 
751  public delegate void NewInventoryItemUploadComplete(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel);
752 
753  public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete;
754 
755  public delegate void RequestChangeWaterHeight(float height);
756 
757  public event RequestChangeWaterHeight OnRequestChangeWaterHeight;
758 
762  public event AvatarKillData OnAvatarKilled;
763  public delegate void AvatarKillData(uint KillerLocalID, ScenePresence avatar);
764 
765  /*
766  public delegate void ScriptTimerEvent(uint localID, double timerinterval);
774  public event ScriptTimerEvent OnScriptTimerEvent;
775  */
776 
777  public delegate void EstateToolsSunUpdate(ulong regionHandle);
778  public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID);
779 
780  public event EstateToolsSunUpdate OnEstateToolsSunUpdate;
781 
791  public event Action<SceneObjectGroup> OnObjectAddedToScene;
792 
797  public event DeRezRequested OnDeRezRequested;
805  public delegate bool DeRezRequested(IClientAPI remoteClient, List<SceneObjectGroup> objs, DeRezAction action);
806 
814  public event ObjectBeingRemovedFromScene OnObjectBeingRemovedFromScene;
819  public delegate void ObjectBeingRemovedFromScene(SceneObjectGroup obj);
820 
824  public event Action<SceneObjectPart> OnObjectAddedToPhysicalScene;
832  public event Action<SceneObjectPart> OnObjectRemovedFromPhysicalScene;
833 
834  public delegate void NoticeNoLandDataFromStorage();
835  public event NoticeNoLandDataFromStorage OnNoticeNoLandDataFromStorage;
836 
837  public delegate void IncomingLandDataFromStorage(List<LandData> data);
838  public event IncomingLandDataFromStorage OnIncomingLandDataFromStorage;
839 
840  public delegate void SetAllowForcefulBan(bool allow);
841  public event SetAllowForcefulBan OnSetAllowForcefulBan;
842 
843  public delegate void RequestParcelPrimCountUpdate();
844  public event RequestParcelPrimCountUpdate OnRequestParcelPrimCountUpdate;
845 
846  public delegate void ParcelPrimCountTainted();
847 
861  public event ParcelPrimCountTainted OnParcelPrimCountTainted;
863 
864  public delegate void ThrottleUpdate(ScenePresence scenePresence);
865 
866  public event ThrottleUpdate OnThrottleUpdate;
867 
873  public delegate void RegisterCapsEvent(UUID agentID, Caps caps);
874  public event RegisterCapsEvent OnRegisterCaps;
875 
880  public delegate void DeregisterCapsEvent(UUID agentID, Caps caps);
881  public event DeregisterCapsEvent OnDeregisterCaps;
882 
887  public delegate void ChatFromWorldEvent(Object sender, OSChatMessage chat);
888  public event ChatFromWorldEvent OnChatFromWorld;
889 
895  public delegate void ChatFromClientEvent(Object sender, OSChatMessage chat);
896  public event ChatFromClientEvent OnChatFromClient;
897 
903  public delegate void ChatToClientsEvent(
904  UUID senderID, HashSet<UUID> receiverIDs,
905  string message, ChatTypeEnum type, Vector3 fromPos, string fromName,
906  ChatSourceType src, ChatAudibleLevel level);
907  public event ChatToClientsEvent OnChatToClients;
908 
913  public delegate void ChatBroadcastEvent(Object sender, OSChatMessage chat);
914  public event ChatBroadcastEvent OnChatBroadcast;
915 
916  public delegate float SunLindenHour();
917  public event SunLindenHour OnGetCurrentTimeAsLindenSunHour;
918 
924  public delegate void OarFileLoaded(Guid guid, List<UUID> loadedScenes, string message);
925  public event OarFileLoaded OnOarFileLoaded;
926 
933  public delegate void OarFileSaved(Guid guid, string message);
934  public event OarFileSaved OnOarFileSaved;
935 
940  public delegate void EmptyScriptCompileQueue(int numScriptsFailed, string message);
941  public event EmptyScriptCompileQueue OnEmptyScriptCompileQueue;
942 
948  public delegate void Attach(uint localID, UUID itemID, UUID avatarID);
949  public event Attach OnAttach;
950 
951 
955  public event SceneObjectDelegate OnSceneObjectLoaded;
956  public delegate void SceneObjectDelegate(SceneObjectGroup so);
957 
968  public event SceneObjectPreSaveDelegate OnSceneObjectPreSave;
969  public delegate void SceneObjectPreSaveDelegate(SceneObjectGroup persistingSo, SceneObjectGroup originalSo);
970 
980  public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy;
981  public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed);
982 
983  public delegate void SceneObjectPartUpdated(SceneObjectPart sop, bool full);
984  public event SceneObjectPartUpdated OnSceneObjectPartUpdated;
985 
986  public delegate void ScenePresenceUpdated(ScenePresence sp);
987  public event ScenePresenceUpdated OnScenePresenceUpdated;
988 
989  public delegate void RegionUp(GridRegion region);
990  public event RegionUp OnRegionUp;
991 
992  public delegate void RegionStarted(Scene scene);
993  public event RegionStarted OnRegionStarted;
994 
995  public delegate void RegionHeartbeatStart(Scene scene);
996  public event RegionHeartbeatStart OnRegionHeartbeatStart;
997  public delegate void RegionHeartbeatEnd(Scene scene);
998  public event RegionHeartbeatEnd OnRegionHeartbeatEnd;
999 
1007  public event RegionLoginsStatusChange OnRegionLoginsStatusChange;
1008  public delegate void RegionLoginsStatusChange(IScene scene);
1009 
1017  public event Action<IScene> OnRegionReadyStatusChange;
1018 
1019  public delegate void PrimsLoaded(Scene s);
1020  public event PrimsLoaded OnPrimsLoaded;
1021 
1022  public delegate void TeleportStart(IClientAPI client, GridRegion destination, GridRegion finalDestination, uint teleportFlags, bool gridLogout);
1023 
1033  public event TeleportStart OnTeleportStart;
1034 
1035  public delegate void TeleportFail(IClientAPI client, bool gridLogout);
1036 
1045  public event TeleportFail OnTeleportFail;
1046 
1047 // public delegate void GatherUuids(SceneObjectPart sop, IDictionary<UUID, AssetType> assetUuids);
1048 //
1049 // /// <summary>
1050 // /// Triggered when UUIDs referenced by a scene object are being gathered for archiving, hg transfer, etc.
1051 // /// </summary>
1052 // /// <remarks>
1053 // /// The listener should add references to the IDictionary<UUID, AssetType> as appropriate.
1054 // /// </remarks>
1055 // public event GatherUuids OnGatherUuids;
1056 
1057  public class MoneyTransferArgs : EventArgs
1058  {
1059  public UUID sender;
1060  public UUID receiver;
1061 
1065  public bool authenticated = false;
1066 
1067  public int amount;
1068  public int transactiontype;
1069  public string description;
1070 
1071  public MoneyTransferArgs(UUID asender, UUID areceiver, int aamount, int atransactiontype, string adescription)
1072  {
1073  sender = asender;
1074  receiver = areceiver;
1075  amount = aamount;
1076  transactiontype = atransactiontype;
1077  description = adescription;
1078  }
1079  }
1080 
1081  public class LandBuyArgs : EventArgs
1082  {
1083  public UUID agentId = UUID.Zero;
1084 
1085  public UUID groupId = UUID.Zero;
1086 
1087  public UUID parcelOwnerID = UUID.Zero;
1088 
1089  public bool final = false;
1090  public bool groupOwned = false;
1091  public bool removeContribution = false;
1092  public int parcelLocalID = 0;
1093  public int parcelArea = 0;
1094  public int parcelPrice = 0;
1095  public bool authenticated = false;
1096  public bool landValidated = false;
1097  public bool economyValidated = false;
1098  public int transactionID = 0;
1099  public int amountDebited = 0;
1100 
1101  public LandBuyArgs(UUID pagentId, UUID pgroupId, bool pfinal, bool pgroupOwned,
1102  bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice,
1103  bool pauthenticated)
1104  {
1105  agentId = pagentId;
1106  groupId = pgroupId;
1107  final = pfinal;
1108  groupOwned = pgroupOwned;
1109  removeContribution = premoveContribution;
1110  parcelLocalID = pparcelLocalID;
1111  parcelArea = pparcelArea;
1112  parcelPrice = pparcelPrice;
1113  authenticated = pauthenticated;
1114  }
1115  }
1116 
1117  public delegate void MoneyTransferEvent(Object sender, MoneyTransferArgs e);
1118 
1119  public delegate void LandBuy(Object sender, LandBuyArgs e);
1120 
1130  public event MoneyTransferEvent OnMoneyTransfer;
1131 
1135  public event LandBuy OnLandBuy;
1136 
1144  public event LandBuy OnValidateLandBuy;
1145 
1146  public void TriggerOnAttach(uint localID, UUID itemID, UUID avatarID)
1147  {
1148  Attach handlerOnAttach = OnAttach;
1149  if (handlerOnAttach != null)
1150  {
1151  foreach (Attach d in handlerOnAttach.GetInvocationList())
1152  {
1153  try
1154  {
1155  d(localID, itemID, avatarID);
1156  }
1157  catch (Exception e)
1158  {
1159  m_log.ErrorFormat(
1160  "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}",
1161  e.Message, e.StackTrace);
1162  }
1163  }
1164  }
1165  }
1166 
1167  public void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID)
1168  {
1169  GetScriptRunning handlerGetScriptRunning = OnGetScriptRunning;
1170  if (handlerGetScriptRunning != null)
1171  {
1172  foreach (GetScriptRunning d in handlerGetScriptRunning.GetInvocationList())
1173  {
1174  try
1175  {
1176  d(controllingClient, objectID, itemID);
1177  }
1178  catch (Exception e)
1179  {
1180  m_log.ErrorFormat(
1181  "[EVENT MANAGER]: Delegate for TriggerGetScriptRunning failed - continuing. {0} {1}",
1182  e.Message, e.StackTrace);
1183  }
1184  }
1185  }
1186  }
1187 
1188  public void TriggerOnScriptChangedEvent(uint localID, uint change)
1189  {
1190  ScriptChangedEvent handlerScriptChangedEvent = OnScriptChangedEvent;
1191  if (handlerScriptChangedEvent != null)
1192  {
1193  foreach (ScriptChangedEvent d in handlerScriptChangedEvent.GetInvocationList())
1194  {
1195  try
1196  {
1197  d(localID, change);
1198  }
1199  catch (Exception e)
1200  {
1201  m_log.ErrorFormat(
1202  "[EVENT MANAGER]: Delegate for TriggerOnScriptChangedEvent failed - continuing. {0} {1}",
1203  e.Message, e.StackTrace);
1204  }
1205  }
1206  }
1207  }
1208 
1210  {
1211  ClientMovement handlerClientMovement = OnClientMovement;
1212  if (handlerClientMovement != null)
1213  {
1214  foreach (ClientMovement d in handlerClientMovement.GetInvocationList())
1215  {
1216  try
1217  {
1218  d(avatar);
1219  }
1220  catch (Exception e)
1221  {
1222  m_log.ErrorFormat(
1223  "[EVENT MANAGER]: Delegate for TriggerOnClientMovement failed - continuing. {0} {1}",
1224  e.Message, e.StackTrace);
1225  }
1226  }
1227  }
1228  }
1229 
1230  public void TriggerPermissionError(UUID user, string reason)
1231  {
1232  OnPermissionErrorDelegate handlerPermissionError = OnPermissionError;
1233  if (handlerPermissionError != null)
1234  {
1235  foreach (OnPermissionErrorDelegate d in handlerPermissionError.GetInvocationList())
1236  {
1237  try
1238  {
1239  d(user, reason);
1240  }
1241  catch (Exception e)
1242  {
1243  m_log.ErrorFormat(
1244  "[EVENT MANAGER]: Delegate for TriggerPermissionError failed - continuing. {0} {1}",
1245  e.Message, e.StackTrace);
1246  }
1247  }
1248  }
1249  }
1250 
1251  public void TriggerOnPluginConsole(string[] args)
1252  {
1253  OnPluginConsoleDelegate handlerPluginConsole = OnPluginConsole;
1254  if (handlerPluginConsole != null)
1255  {
1256  foreach (OnPluginConsoleDelegate d in handlerPluginConsole.GetInvocationList())
1257  {
1258  try
1259  {
1260  d(args);
1261  }
1262  catch (Exception e)
1263  {
1264  m_log.ErrorFormat(
1265  "[EVENT MANAGER]: Delegate for TriggerOnPluginConsole failed - continuing. {0} {1}",
1266  e.Message, e.StackTrace);
1267  }
1268  }
1269  }
1270  }
1271 
1272  public void TriggerOnFrame()
1273  {
1274  OnFrameDelegate handlerFrame = OnFrame;
1275  if (handlerFrame != null)
1276  {
1277  foreach (OnFrameDelegate d in handlerFrame.GetInvocationList())
1278  {
1279  try
1280  {
1281  d();
1282  }
1283  catch (Exception e)
1284  {
1285  m_log.ErrorFormat(
1286  "[EVENT MANAGER]: Delegate for TriggerOnFrame failed - continuing. {0} {1}",
1287  e.Message, e.StackTrace);
1288  }
1289  }
1290  }
1291  }
1292 
1293  public void TriggerOnNewClient(IClientAPI client)
1294  {
1295  OnNewClientDelegate handlerNewClient = OnNewClient;
1296  if (handlerNewClient != null)
1297  {
1298  foreach (OnNewClientDelegate d in handlerNewClient.GetInvocationList())
1299  {
1300  try
1301  {
1302  d(client);
1303  }
1304  catch (Exception e)
1305  {
1306  m_log.ErrorFormat(
1307  "[EVENT MANAGER]: Delegate for TriggerOnNewClient failed - continuing. {0} {1}",
1308  e.Message, e.StackTrace);
1309  }
1310  }
1311  }
1312 
1313  if (client is IClientCore)
1314  {
1315  OnClientConnectCoreDelegate handlerClientConnect = OnClientConnect;
1316  if (handlerClientConnect != null)
1317  {
1318  foreach (OnClientConnectCoreDelegate d in handlerClientConnect.GetInvocationList())
1319  {
1320  try
1321  {
1322  d((IClientCore)client);
1323  }
1324  catch (Exception e)
1325  {
1326  m_log.ErrorFormat(
1327  "[EVENT MANAGER]: Delegate for TriggerOnNewClient (IClientCore) failed - continuing. {0} {1}",
1328  e.Message, e.StackTrace);
1329  }
1330  }
1331  }
1332  }
1333  }
1334 
1335  public void TriggerOnClientLogin(IClientAPI client)
1336  {
1337  Action<IClientAPI> handlerClientLogin = OnClientLogin;
1338  if (handlerClientLogin != null)
1339  {
1340  foreach (Action<IClientAPI> d in handlerClientLogin.GetInvocationList())
1341  {
1342  try
1343  {
1344  d(client);
1345  }
1346  catch (Exception e)
1347  {
1348  m_log.ErrorFormat(
1349  "[EVENT MANAGER]: Delegate for TriggerOnClientLogin failed - continuing. {0} {1}",
1350  e.Message, e.StackTrace);
1351  }
1352  }
1353  }
1354 
1355  }
1356 
1357  public void TriggerOnNewPresence(ScenePresence presence)
1358  {
1359  OnNewPresenceDelegate handlerNewPresence = OnNewPresence;
1360  if (handlerNewPresence != null)
1361  {
1362  foreach (OnNewPresenceDelegate d in handlerNewPresence.GetInvocationList())
1363  {
1364  try
1365  {
1366  d(presence);
1367  }
1368  catch (Exception e)
1369  {
1370  m_log.ErrorFormat(
1371  "[EVENT MANAGER]: Delegate for TriggerOnNewPresence failed - continuing. {0} {1}",
1372  e.Message, e.StackTrace);
1373  }
1374  }
1375  }
1376  }
1377 
1378  public void TriggerOnRemovePresence(UUID agentId)
1379  {
1380  OnRemovePresenceDelegate handlerRemovePresence = OnRemovePresence;
1381  if (handlerRemovePresence != null)
1382  {
1383  foreach (OnRemovePresenceDelegate d in handlerRemovePresence.GetInvocationList())
1384  {
1385  try
1386  {
1387 // m_log.ErrorFormat("[EVENT MANAGER]: OnRemovePresenceDelegate: {0}",d.Target.ToString());
1388  d(agentId);
1389 // m_log.ErrorFormat("[EVENT MANAGER]: OnRemovePresenceDelegate done ");
1390  }
1391  catch (Exception e)
1392  {
1393  m_log.ErrorFormat(
1394  "[EVENT MANAGER]: Delegate for TriggerOnRemovePresence failed - continuing. {0} {1}",
1395  e.Message, e.StackTrace);
1396  }
1397  }
1398  }
1399  }
1400 
1401  public void TriggerOnBackup(ISimulationDataService dstore, bool forced)
1402  {
1403  OnBackupDelegate handlerOnAttach = OnBackup;
1404  if (handlerOnAttach != null)
1405  {
1406  foreach (OnBackupDelegate d in handlerOnAttach.GetInvocationList())
1407  {
1408  try
1409  {
1410  d(dstore, forced);
1411  }
1412  catch (Exception e)
1413  {
1414  m_log.ErrorFormat(
1415  "[EVENT MANAGER]: Delegate for TriggerOnBackup failed - continuing. {0} {1}",
1416  e.Message, e.StackTrace);
1417  }
1418  }
1419  }
1420  }
1421 
1423  {
1424  OnParcelPrimCountUpdateDelegate handlerParcelPrimCountUpdate = OnParcelPrimCountUpdate;
1425  if (handlerParcelPrimCountUpdate != null)
1426  {
1427  foreach (OnParcelPrimCountUpdateDelegate d in handlerParcelPrimCountUpdate.GetInvocationList())
1428  {
1429  try
1430  {
1431  d();
1432  }
1433  catch (Exception e)
1434  {
1435  m_log.ErrorFormat(
1436  "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountUpdate failed - continuing. {0} {1}",
1437  e.Message, e.StackTrace);
1438  }
1439  }
1440  }
1441  }
1442 
1443  public void TriggerMoneyTransfer(Object sender, MoneyTransferArgs args)
1444  {
1445  MoneyTransferEvent handlerMoneyTransfer = OnMoneyTransfer;
1446  if (handlerMoneyTransfer != null)
1447  {
1448  foreach (MoneyTransferEvent d in handlerMoneyTransfer.GetInvocationList())
1449  {
1450  try
1451  {
1452  d(sender, args);
1453  }
1454  catch (Exception e)
1455  {
1456  m_log.ErrorFormat(
1457  "[EVENT MANAGER]: Delegate for TriggerMoneyTransfer failed - continuing. {0} {1}",
1458  e.Message, e.StackTrace);
1459  }
1460  }
1461  }
1462  }
1463  public void TriggerTerrainUpdate()
1464  {
1465  OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate;
1466  if (handlerTerrainUpdate != null)
1467  {
1468  foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList())
1469  {
1470  try
1471  {
1472  d();
1473  }
1474  catch (Exception e)
1475  {
1476  m_log.ErrorFormat(
1477  "[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}",
1478  e.Message, e.StackTrace);
1479  }
1480  }
1481  }
1482  }
1483 
1484  public void TriggerTerrainTick()
1485  {
1486  OnTerrainTickDelegate handlerTerrainTick = OnTerrainTick;
1487  if (handlerTerrainTick != null)
1488  {
1489  foreach (OnTerrainTickDelegate d in handlerTerrainTick.GetInvocationList())
1490  {
1491  try
1492  {
1493  d();
1494  }
1495  catch (Exception e)
1496  {
1497  m_log.ErrorFormat(
1498  "[EVENT MANAGER]: Delegate for TriggerTerrainTick failed - continuing. {0} {1}",
1499  e.Message, e.StackTrace);
1500  }
1501  }
1502  }
1503  }
1504 
1506  {
1507  OnTerrainCheckUpdatesDelegate TerrainCheckUpdates = OnTerrainCheckUpdates;
1508  if (TerrainCheckUpdates != null)
1509  {
1510  foreach (OnTerrainCheckUpdatesDelegate d in TerrainCheckUpdates.GetInvocationList())
1511  {
1512  try
1513  {
1514  d();
1515  }
1516  catch (Exception e)
1517  {
1518  m_log.ErrorFormat(
1519  "[EVENT MANAGER]: Delegate for TerrainCheckUpdates failed - continuing. {0} {1}",
1520  e.Message, e.StackTrace);
1521  }
1522  }
1523  }
1524  }
1525 
1527  {
1528  OnTerrainTaintedDelegate handlerTerrainTainted = OnTerrainTainted;
1529  if (handlerTerrainTainted != null)
1530  {
1531  foreach (OnTerrainTaintedDelegate d in handlerTerrainTainted.GetInvocationList())
1532  {
1533  try
1534  {
1535  d();
1536  }
1537  catch (Exception e)
1538  {
1539  m_log.ErrorFormat(
1540  "[EVENT MANAGER]: Delegate for TriggerTerrainTainted failed - continuing. {0} {1}",
1541  e.Message, e.StackTrace);
1542  }
1543  }
1544  }
1545  }
1546 
1548  {
1549  OnParcelPrimCountAddDelegate handlerParcelPrimCountAdd = OnParcelPrimCountAdd;
1550  if (handlerParcelPrimCountAdd != null)
1551  {
1552  foreach (OnParcelPrimCountAddDelegate d in handlerParcelPrimCountAdd.GetInvocationList())
1553  {
1554  try
1555  {
1556  d(obj);
1557  }
1558  catch (Exception e)
1559  {
1560  m_log.ErrorFormat(
1561  "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountAdd failed - continuing. {0} {1}",
1562  e.Message, e.StackTrace);
1563  }
1564  }
1565  }
1566  }
1567 
1569  {
1570  Action<SceneObjectGroup> handler = OnObjectAddedToScene;
1571  if (handler != null)
1572  {
1573  foreach (Action<SceneObjectGroup> d in handler.GetInvocationList())
1574  {
1575  try
1576  {
1577  d(obj);
1578  }
1579  catch (Exception e)
1580  {
1581  m_log.ErrorFormat(
1582  "[EVENT MANAGER]: Delegate for TriggerObjectAddedToScene failed - continuing. {0} {1}",
1583  e.Message, e.StackTrace);
1584  }
1585  }
1586  }
1587  }
1588 
1589  public bool TriggerDeRezRequested(IClientAPI client, List<SceneObjectGroup> objs, DeRezAction action)
1590  {
1591  bool canDeRez = true;
1592 
1593  DeRezRequested handlerDeRezRequested = OnDeRezRequested;
1594  if (handlerDeRezRequested != null)
1595  {
1596  foreach (DeRezRequested d in handlerDeRezRequested.GetInvocationList())
1597  {
1598  try
1599  {
1600  canDeRez &= d(client, objs, action);
1601  }
1602  catch (Exception e)
1603  {
1604  m_log.ErrorFormat(
1605  "[EVENT MANAGER]: Delegate for TriggerDeRezRequested failed - continuing. {0} {1}",
1606  e.Message, e.StackTrace);
1607  }
1608  }
1609  }
1610 
1611  return canDeRez;
1612  }
1613 
1615  {
1616  ObjectBeingRemovedFromScene handlerObjectBeingRemovedFromScene = OnObjectBeingRemovedFromScene;
1617  if (handlerObjectBeingRemovedFromScene != null)
1618  {
1619  foreach (ObjectBeingRemovedFromScene d in handlerObjectBeingRemovedFromScene.GetInvocationList())
1620  {
1621  try
1622  {
1623  d(obj);
1624  }
1625  catch (Exception e)
1626  {
1627  m_log.ErrorFormat(
1628  "[EVENT MANAGER]: Delegate for TriggerObjectBeingRemovedFromScene failed - continuing. {0} {1}",
1629  e.Message, e.StackTrace);
1630  }
1631  }
1632  }
1633  }
1634 
1636  {
1637  Action<SceneObjectPart> handler = OnObjectAddedToPhysicalScene;
1638  if (handler != null)
1639  {
1640  foreach (Action<SceneObjectPart> d in handler.GetInvocationList())
1641  {
1642  try
1643  {
1644  d(obj);
1645  }
1646  catch (Exception e)
1647  {
1648  m_log.ErrorFormat(
1649  "[EVENT MANAGER]: Delegate for TriggerObjectAddedToPhysicalScene failed - continuing. {0} {1}",
1650  e.Message, e.StackTrace);
1651  }
1652  }
1653  }
1654  }
1655 
1657  {
1658  Action<SceneObjectPart> handler = OnObjectRemovedFromPhysicalScene;
1659  if (handler != null)
1660  {
1661  foreach (Action<SceneObjectPart> d in handler.GetInvocationList())
1662  {
1663  try
1664  {
1665  d(obj);
1666  }
1667  catch (Exception e)
1668  {
1669  m_log.ErrorFormat(
1670  "[EVENT MANAGER]: Delegate for TriggerObjectRemovedFromPhysicalScene failed - continuing. {0} {1}",
1671  e.Message, e.StackTrace);
1672  }
1673  }
1674  }
1675  }
1676 
1677  public void TriggerShutdown()
1678  {
1679  Action handlerShutdown = OnShutdown;
1680  if (handlerShutdown != null)
1681  {
1682  foreach (Action d in handlerShutdown.GetInvocationList())
1683  {
1684  try
1685  {
1686  d();
1687  }
1688  catch (Exception e)
1689  {
1690  m_log.ErrorFormat(
1691  "[EVENT MANAGER]: Delegate for TriggerShutdown failed - continuing. {0} {1}",
1692  e.Message, e.StackTrace);
1693  }
1694  }
1695  }
1696  }
1697 
1698  public void TriggerObjectGrab(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs)
1699  {
1700  ObjectGrabDelegate handlerObjectGrab = OnObjectGrab;
1701  if (handlerObjectGrab != null)
1702  {
1703  foreach (ObjectGrabDelegate d in handlerObjectGrab.GetInvocationList())
1704  {
1705  try
1706  {
1707  d(localID, originalID, offsetPos, remoteClient, surfaceArgs);
1708  }
1709  catch (Exception e)
1710  {
1711  m_log.ErrorFormat(
1712  "[EVENT MANAGER]: Delegate for TriggerObjectGrab failed - continuing. {0} {1}",
1713  e.Message, e.StackTrace);
1714  }
1715  }
1716  }
1717  }
1718 
1719  public void TriggerObjectGrabbing(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs)
1720  {
1721  ObjectGrabDelegate handlerObjectGrabbing = OnObjectGrabbing;
1722  if (handlerObjectGrabbing != null)
1723  {
1724  foreach (ObjectGrabDelegate d in handlerObjectGrabbing.GetInvocationList())
1725  {
1726  try
1727  {
1728  d(localID, originalID, offsetPos, remoteClient, surfaceArgs);
1729  }
1730  catch (Exception e)
1731  {
1732  m_log.ErrorFormat(
1733  "[EVENT MANAGER]: Delegate for TriggerObjectGrabbing failed - continuing. {0} {1}",
1734  e.Message, e.StackTrace);
1735  }
1736  }
1737  }
1738  }
1739 
1740  public void TriggerObjectDeGrab(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs)
1741  {
1742  ObjectDeGrabDelegate handlerObjectDeGrab = OnObjectDeGrab;
1743  if (handlerObjectDeGrab != null)
1744  {
1745  foreach (ObjectDeGrabDelegate d in handlerObjectDeGrab.GetInvocationList())
1746  {
1747  try
1748  {
1749  d(localID, originalID, remoteClient, surfaceArgs);
1750  }
1751  catch (Exception e)
1752  {
1753  m_log.ErrorFormat(
1754  "[EVENT MANAGER]: Delegate for TriggerObjectDeGrab failed - continuing. {0} {1}",
1755  e.Message, e.StackTrace);
1756  }
1757  }
1758  }
1759  }
1760 
1761  public void TriggerScriptReset(uint localID, UUID itemID)
1762  {
1763  ScriptResetDelegate handlerScriptReset = OnScriptReset;
1764  if (handlerScriptReset != null)
1765  {
1766  foreach (ScriptResetDelegate d in handlerScriptReset.GetInvocationList())
1767  {
1768  try
1769  {
1770  d(localID, itemID);
1771  }
1772  catch (Exception e)
1773  {
1774  m_log.ErrorFormat(
1775  "[EVENT MANAGER]: Delegate for TriggerScriptReset failed - continuing. {0} {1}",
1776  e.Message, e.StackTrace);
1777  }
1778  }
1779  }
1780  }
1781 
1782  public void TriggerRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource)
1783  {
1784  NewRezScript handlerRezScript = OnRezScript;
1785  if (handlerRezScript != null)
1786  {
1787  foreach (NewRezScript d in handlerRezScript.GetInvocationList())
1788  {
1789  try
1790  {
1791  d(localID, itemID, script, startParam, postOnRez, engine, stateSource);
1792  }
1793  catch (Exception e)
1794  {
1795  m_log.ErrorFormat(
1796  "[EVENT MANAGER]: Delegate for TriggerRezScript failed - continuing. {0} {1}",
1797  e.Message, e.StackTrace);
1798  }
1799  }
1800  }
1801  }
1802 
1803  public void TriggerStartScript(uint localID, UUID itemID)
1804  {
1805  StartScript handlerStartScript = OnStartScript;
1806  if (handlerStartScript != null)
1807  {
1808  foreach (StartScript d in handlerStartScript.GetInvocationList())
1809  {
1810  try
1811  {
1812  d(localID, itemID);
1813  }
1814  catch (Exception e)
1815  {
1816  m_log.ErrorFormat(
1817  "[EVENT MANAGER]: Delegate for TriggerStartScript failed - continuing. {0} {1}",
1818  e.Message, e.StackTrace);
1819  }
1820  }
1821  }
1822  }
1823 
1824  public void TriggerStopScript(uint localID, UUID itemID)
1825  {
1826  StopScript handlerStopScript = OnStopScript;
1827  if (handlerStopScript != null)
1828  {
1829  foreach (StopScript d in handlerStopScript.GetInvocationList())
1830  {
1831  try
1832  {
1833  d(localID, itemID);
1834  }
1835  catch (Exception e)
1836  {
1837  m_log.ErrorFormat(
1838  "[EVENT MANAGER]: Delegate for TriggerStopScript failed - continuing. {0} {1}",
1839  e.Message, e.StackTrace);
1840  }
1841  }
1842  }
1843  }
1844 
1845  public void TriggerRemoveScript(uint localID, UUID itemID)
1846  {
1847  RemoveScript handlerRemoveScript = OnRemoveScript;
1848  if (handlerRemoveScript != null)
1849  {
1850  foreach (RemoveScript d in handlerRemoveScript.GetInvocationList())
1851  {
1852  try
1853  {
1854  d(localID, itemID);
1855  }
1856  catch (Exception e)
1857  {
1858  m_log.ErrorFormat(
1859  "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}",
1860  e.Message, e.StackTrace);
1861  m_log.ErrorFormat(Environment.StackTrace);
1862  }
1863  }
1864  }
1865  }
1866 
1867  public bool TriggerGroupMove(UUID groupID, Vector3 delta)
1868  {
1869  bool result = true;
1870 
1871  SceneGroupMoved handlerSceneGroupMove = OnSceneGroupMove;
1872  if (handlerSceneGroupMove != null)
1873  {
1874  foreach (SceneGroupMoved d in handlerSceneGroupMove.GetInvocationList())
1875  {
1876  try
1877  {
1878  if (d(groupID, delta) == false)
1879  result = false;
1880  }
1881  catch (Exception e)
1882  {
1883  m_log.ErrorFormat(
1884  "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}",
1885  e.Message, e.StackTrace);
1886  }
1887  }
1888  }
1889 
1890  return result;
1891  }
1892 
1893  public bool TriggerGroupSpinStart(UUID groupID)
1894  {
1895  bool result = true;
1896 
1897  SceneGroupSpinStarted handlerSceneGroupSpinStarted = OnSceneGroupSpinStart;
1898  if (handlerSceneGroupSpinStarted != null)
1899  {
1900  foreach (SceneGroupSpinStarted d in handlerSceneGroupSpinStarted.GetInvocationList())
1901  {
1902  try
1903  {
1904  if (d(groupID) == false)
1905  result = false;
1906  }
1907  catch (Exception e)
1908  {
1909  m_log.ErrorFormat(
1910  "[EVENT MANAGER]: Delegate for TriggerGroupSpinStart failed - continuing. {0} {1}",
1911  e.Message, e.StackTrace);
1912  }
1913  }
1914  }
1915 
1916  return result;
1917  }
1918 
1919  public bool TriggerGroupSpin(UUID groupID, Quaternion rotation)
1920  {
1921  bool result = true;
1922 
1923  SceneGroupSpun handlerSceneGroupSpin = OnSceneGroupSpin;
1924  if (handlerSceneGroupSpin != null)
1925  {
1926  foreach (SceneGroupSpun d in handlerSceneGroupSpin.GetInvocationList())
1927  {
1928  try
1929  {
1930  if (d(groupID, rotation) == false)
1931  result = false;
1932  }
1933  catch (Exception e)
1934  {
1935  m_log.ErrorFormat(
1936  "[EVENT MANAGER]: Delegate for TriggerGroupSpin failed - continuing. {0} {1}",
1937  e.Message, e.StackTrace);
1938  }
1939  }
1940  }
1941 
1942  return result;
1943  }
1944 
1945  public void TriggerGroupGrab(UUID groupID, Vector3 offset, UUID userID)
1946  {
1947  SceneGroupGrabed handlerSceneGroupGrab = OnSceneGroupGrab;
1948  if (handlerSceneGroupGrab != null)
1949  {
1950  foreach (SceneGroupGrabed d in handlerSceneGroupGrab.GetInvocationList())
1951  {
1952  try
1953  {
1954  d(groupID, offset, userID);
1955  }
1956  catch (Exception e)
1957  {
1958  m_log.ErrorFormat(
1959  "[EVENT MANAGER]: Delegate for TriggerGroupGrab failed - continuing. {0} {1}",
1960  e.Message, e.StackTrace);
1961  }
1962  }
1963  }
1964  }
1965 
1966  public void TriggerLandObjectAdded(ILandObject newParcel)
1967  {
1968  LandObjectAdded handlerLandObjectAdded = OnLandObjectAdded;
1969  if (handlerLandObjectAdded != null)
1970  {
1971  foreach (LandObjectAdded d in handlerLandObjectAdded.GetInvocationList())
1972  {
1973  try
1974  {
1975  d(newParcel);
1976  }
1977  catch (Exception e)
1978  {
1979  m_log.ErrorFormat(
1980  "[EVENT MANAGER]: Delegate for TriggerLandObjectAdded failed - continuing. {0} {1}",
1981  e.Message, e.StackTrace);
1982  }
1983  }
1984  }
1985  }
1986 
1987  public void TriggerLandObjectRemoved(UUID globalID)
1988  {
1989  LandObjectRemoved handlerLandObjectRemoved = OnLandObjectRemoved;
1990  if (handlerLandObjectRemoved != null)
1991  {
1992  foreach (LandObjectRemoved d in handlerLandObjectRemoved.GetInvocationList())
1993  {
1994  try
1995  {
1996  d(globalID);
1997  }
1998  catch (Exception e)
1999  {
2000  m_log.ErrorFormat(
2001  "[EVENT MANAGER]: Delegate for TriggerLandObjectRemoved failed - continuing. {0} {1}",
2002  e.Message, e.StackTrace);
2003  }
2004  }
2005  }
2006  }
2007 
2008  public void TriggerLandObjectUpdated(uint localParcelID, ILandObject newParcel)
2009  {
2010  TriggerLandObjectAdded(newParcel);
2011  }
2012 
2013  public void TriggerAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID)
2014  {
2015  AvatarEnteringNewParcel handlerAvatarEnteringNewParcel = OnAvatarEnteringNewParcel;
2016  if (handlerAvatarEnteringNewParcel != null)
2017  {
2018  foreach (AvatarEnteringNewParcel d in handlerAvatarEnteringNewParcel.GetInvocationList())
2019  {
2020  try
2021  {
2022  d(avatar, localLandID, regionID);
2023  }
2024  catch (Exception e)
2025  {
2026  m_log.ErrorFormat(
2027  "[EVENT MANAGER]: Delegate for TriggerAvatarEnteringNewParcel failed - continuing. {0} {1}",
2028  e.Message, e.StackTrace);
2029  }
2030  }
2031  }
2032  }
2033 
2035  {
2036  AvatarAppearanceChange handler = OnAvatarAppearanceChange;
2037  if (handler != null)
2038  {
2039  foreach (AvatarAppearanceChange d in handler.GetInvocationList())
2040  {
2041  try
2042  {
2043  d(avatar);
2044  }
2045  catch (Exception e)
2046  {
2047  m_log.ErrorFormat(
2048  "[EVENT MANAGER]: Delegate for TriggerAvatarAppearanceChanged failed - continuing. {0} {1}",
2049  e.Message, e.StackTrace);
2050  }
2051  }
2052  }
2053  }
2054 
2055  public void TriggerCrossAgentToNewRegion(ScenePresence agent, bool isFlying, GridRegion newRegion)
2056  {
2057  CrossAgentToNewRegion handlerCrossAgentToNewRegion = OnCrossAgentToNewRegion;
2058  if (handlerCrossAgentToNewRegion != null)
2059  {
2060  foreach (CrossAgentToNewRegion d in handlerCrossAgentToNewRegion.GetInvocationList())
2061  {
2062  try
2063  {
2064  d(agent, isFlying, newRegion);
2065  }
2066  catch (Exception e)
2067  {
2068  m_log.ErrorFormat(
2069  "[EVENT MANAGER]: Delegate for TriggerCrossAgentToNewRegion failed - continuing. {0} {1}",
2070  e.Message, e.StackTrace);
2071  }
2072  }
2073  }
2074  }
2075 
2077  {
2078  IncomingInstantMessage handlerIncomingInstantMessage = OnIncomingInstantMessage;
2079  if (handlerIncomingInstantMessage != null)
2080  {
2081  foreach (IncomingInstantMessage d in handlerIncomingInstantMessage.GetInvocationList())
2082  {
2083  try
2084  {
2085  d(message);
2086  }
2087  catch (Exception e)
2088  {
2089  m_log.ErrorFormat(
2090  "[EVENT MANAGER]: Delegate for TriggerIncomingInstantMessage failed - continuing. {0} {1}",
2091  e.Message, e.StackTrace);
2092  }
2093  }
2094  }
2095  }
2096 
2098  {
2099  IncomingInstantMessage handlerUnhandledInstantMessage = OnUnhandledInstantMessage;
2100  if (handlerUnhandledInstantMessage != null)
2101  {
2102  foreach (IncomingInstantMessage d in handlerUnhandledInstantMessage.GetInvocationList())
2103  {
2104  try
2105  {
2106  d(message);
2107  }
2108  catch (Exception e)
2109  {
2110  m_log.ErrorFormat(
2111  "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}",
2112  e.Message, e.StackTrace);
2113  }
2114  }
2115  }
2116  }
2117 
2118  public void TriggerClientClosed(UUID ClientID, Scene scene)
2119  {
2120  ClientClosed handlerClientClosed = OnClientClosed;
2121  if (handlerClientClosed != null)
2122  {
2123  foreach (ClientClosed d in handlerClientClosed.GetInvocationList())
2124  {
2125  try
2126  {
2127 // m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed: {0}", d.Target.ToString());
2128  d(ClientID, scene);
2129 // m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed done ");
2130 
2131  }
2132  catch (Exception e)
2133  {
2134  m_log.ErrorFormat(
2135  "[EVENT MANAGER]: Delegate for TriggerClientClosed failed - continuing. {0} {1}",
2136  e.Message, e.StackTrace);
2137  }
2138  }
2139  }
2140  }
2141 
2143  {
2144  OnMakeChildAgentDelegate handlerMakeChildAgent = OnMakeChildAgent;
2145  if (handlerMakeChildAgent != null)
2146  {
2147  foreach (OnMakeChildAgentDelegate d in handlerMakeChildAgent.GetInvocationList())
2148  {
2149  try
2150  {
2151  d(presence);
2152  }
2153  catch (Exception e)
2154  {
2155  m_log.ErrorFormat(
2156  "[EVENT MANAGER]: Delegate for TriggerOnMakeChildAgent failed - continuing. {0} {1}",
2157  e.Message, e.StackTrace);
2158  }
2159  }
2160  }
2161  }
2162 
2164  {
2165  OnSendNewWindlightProfileTargetedDelegate handlerSendNewWindlightProfileTargeted = OnSendNewWindlightProfileTargeted;
2166  if (handlerSendNewWindlightProfileTargeted != null)
2167  {
2168  handlerSendNewWindlightProfileTargeted(wl, user);
2169  }
2170  }
2171 
2173  {
2174  OnSaveNewWindlightProfileDelegate handlerSaveNewWindlightProfile = OnSaveNewWindlightProfile;
2175  if (handlerSaveNewWindlightProfile != null)
2176  {
2177  handlerSaveNewWindlightProfile();
2178  }
2179  }
2180 
2182  {
2183  Action<ScenePresence> handlerMakeRootAgent = OnMakeRootAgent;
2184  if (handlerMakeRootAgent != null)
2185  {
2186  foreach (Action<ScenePresence> d in handlerMakeRootAgent.GetInvocationList())
2187  {
2188  try
2189  {
2190  d(presence);
2191  }
2192  catch (Exception e)
2193  {
2194  m_log.ErrorFormat(
2195  "[EVENT MANAGER]: Delegate for TriggerOnMakeRootAgent failed - continuing. {0} {1}",
2196  e.Message, e.StackTrace);
2197  }
2198  }
2199  }
2200  }
2201 
2203  {
2204  OnIncomingSceneObjectDelegate handlerIncomingSceneObject = OnIncomingSceneObject;
2205  if (handlerIncomingSceneObject != null)
2206  {
2207  foreach (OnIncomingSceneObjectDelegate d in handlerIncomingSceneObject.GetInvocationList())
2208  {
2209  try
2210  {
2211  d(so);
2212  }
2213  catch (Exception e)
2214  {
2215  m_log.ErrorFormat(
2216  "[EVENT MANAGER]: Delegate for TriggerOnIncomingSceneObject failed - continuing. {0} {1}",
2217  e.Message, e.StackTrace);
2218  }
2219  }
2220  }
2221  }
2222 
2223  public void TriggerOnRegisterCaps(UUID agentID, Caps caps)
2224  {
2225  RegisterCapsEvent handlerRegisterCaps = OnRegisterCaps;
2226  if (handlerRegisterCaps != null)
2227  {
2228  foreach (RegisterCapsEvent d in handlerRegisterCaps.GetInvocationList())
2229  {
2230  try
2231  {
2232  d(agentID, caps);
2233  }
2234  catch (Exception e)
2235  {
2236  m_log.ErrorFormat(
2237  "[EVENT MANAGER]: Delegate for TriggerOnRegisterCaps failed - continuing. {0} {1}",
2238  e.Message, e.StackTrace);
2239  }
2240  }
2241  }
2242  }
2243 
2244  public void TriggerOnDeregisterCaps(UUID agentID, Caps caps)
2245  {
2246  DeregisterCapsEvent handlerDeregisterCaps = OnDeregisterCaps;
2247  if (handlerDeregisterCaps != null)
2248  {
2249  foreach (DeregisterCapsEvent d in handlerDeregisterCaps.GetInvocationList())
2250  {
2251  try
2252  {
2253  d(agentID, caps);
2254  }
2255  catch (Exception e)
2256  {
2257  m_log.ErrorFormat(
2258  "[EVENT MANAGER]: Delegate for TriggerOnDeregisterCaps failed - continuing. {0} {1}",
2259  e.Message, e.StackTrace);
2260  }
2261  }
2262  }
2263  }
2264 
2265  public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, AssetType type, UUID AssetID, String AssetName, int userlevel)
2266  {
2267  NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete;
2268  if (handlerNewInventoryItemUpdateComplete != null)
2269  {
2270  foreach (NewInventoryItemUploadComplete d in handlerNewInventoryItemUpdateComplete.GetInvocationList())
2271  {
2272  try
2273  {
2274  d(agentID, type, AssetID, AssetName, userlevel);
2275  }
2276  catch (Exception e)
2277  {
2278  m_log.ErrorFormat(
2279  "[EVENT MANAGER]: Delegate for TriggerOnNewInventoryItemUploadComplete failed - continuing. {0} {1}",
2280  e.Message, e.StackTrace);
2281  }
2282  }
2283  }
2284  }
2285 
2286  public void TriggerLandBuy(Object sender, LandBuyArgs args)
2287  {
2288  LandBuy handlerLandBuy = OnLandBuy;
2289  if (handlerLandBuy != null)
2290  {
2291  foreach (LandBuy d in handlerLandBuy.GetInvocationList())
2292  {
2293  try
2294  {
2295  d(sender, args);
2296  }
2297  catch (Exception e)
2298  {
2299  m_log.ErrorFormat(
2300  "[EVENT MANAGER]: Delegate for TriggerLandBuy failed - continuing. {0} {1}",
2301  e.Message, e.StackTrace);
2302  }
2303  }
2304  }
2305  }
2306 
2307  public void TriggerValidateLandBuy(Object sender, LandBuyArgs args)
2308  {
2309  LandBuy handlerValidateLandBuy = OnValidateLandBuy;
2310  if (handlerValidateLandBuy != null)
2311  {
2312  foreach (LandBuy d in handlerValidateLandBuy.GetInvocationList())
2313  {
2314  try
2315  {
2316  d(sender, args);
2317  }
2318  catch (Exception e)
2319  {
2320  m_log.ErrorFormat(
2321  "[EVENT MANAGER]: Delegate for TriggerValidateLandBuy failed - continuing. {0} {1}",
2322  e.Message, e.StackTrace);
2323  }
2324  }
2325  }
2326  }
2327 
2328  public void TriggerAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 currentpos)
2329  {
2330  ScriptAtTargetEvent handlerScriptAtTargetEvent = OnScriptAtTargetEvent;
2331  if (handlerScriptAtTargetEvent != null)
2332  {
2333  foreach (ScriptAtTargetEvent d in handlerScriptAtTargetEvent.GetInvocationList())
2334  {
2335  try
2336  {
2337  d(localID, handle, targetpos, currentpos);
2338  }
2339  catch (Exception e)
2340  {
2341  m_log.ErrorFormat(
2342  "[EVENT MANAGER]: Delegate for TriggerAtTargetEvent failed - continuing. {0} {1}",
2343  e.Message, e.StackTrace);
2344  }
2345  }
2346  }
2347  }
2348 
2349  public void TriggerNotAtTargetEvent(uint localID)
2350  {
2351  ScriptNotAtTargetEvent handlerScriptNotAtTargetEvent = OnScriptNotAtTargetEvent;
2352  if (handlerScriptNotAtTargetEvent != null)
2353  {
2354  foreach (ScriptNotAtTargetEvent d in handlerScriptNotAtTargetEvent.GetInvocationList())
2355  {
2356  try
2357  {
2358  d(localID);
2359  }
2360  catch (Exception e)
2361  {
2362  m_log.ErrorFormat(
2363  "[EVENT MANAGER]: Delegate for TriggerNotAtTargetEvent failed - continuing. {0} {1}",
2364  e.Message, e.StackTrace);
2365  }
2366  }
2367  }
2368  }
2369 
2370  public void TriggerAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion currentrot)
2371  {
2372  ScriptAtRotTargetEvent handlerScriptAtRotTargetEvent = OnScriptAtRotTargetEvent;
2373  if (handlerScriptAtRotTargetEvent != null)
2374  {
2375  foreach (ScriptAtRotTargetEvent d in handlerScriptAtRotTargetEvent.GetInvocationList())
2376  {
2377  try
2378  {
2379  d(localID, handle, targetrot, currentrot);
2380  }
2381  catch (Exception e)
2382  {
2383  m_log.ErrorFormat(
2384  "[EVENT MANAGER]: Delegate for TriggerAtRotTargetEvent failed - continuing. {0} {1}",
2385  e.Message, e.StackTrace);
2386  }
2387  }
2388  }
2389  }
2390 
2391  public void TriggerNotAtRotTargetEvent(uint localID)
2392  {
2393  ScriptNotAtRotTargetEvent handlerScriptNotAtRotTargetEvent = OnScriptNotAtRotTargetEvent;
2394  if (handlerScriptNotAtRotTargetEvent != null)
2395  {
2396  foreach (ScriptNotAtRotTargetEvent d in handlerScriptNotAtRotTargetEvent.GetInvocationList())
2397  {
2398  try
2399  {
2400  d(localID);
2401  }
2402  catch (Exception e)
2403  {
2404  m_log.ErrorFormat(
2405  "[EVENT MANAGER]: Delegate for TriggerNotAtRotTargetEvent failed - continuing. {0} {1}",
2406  e.Message, e.StackTrace);
2407  }
2408  }
2409  }
2410  }
2411 
2412  public void TriggerMovingStartEvent(uint localID)
2413  {
2414  ScriptMovingStartEvent handlerScriptMovingStartEvent = OnScriptMovingStartEvent;
2415  if (handlerScriptMovingStartEvent != null)
2416  {
2417  foreach (ScriptMovingStartEvent d in handlerScriptMovingStartEvent.GetInvocationList())
2418  {
2419  try
2420  {
2421  d(localID);
2422  }
2423  catch (Exception e)
2424  {
2425  m_log.ErrorFormat(
2426  "[EVENT MANAGER]: Delegate for TriggerMovingStartEvent failed - continuing. {0} {1}",
2427  e.Message, e.StackTrace);
2428  }
2429  }
2430  }
2431  }
2432 
2433  public void TriggerMovingEndEvent(uint localID)
2434  {
2435  ScriptMovingEndEvent handlerScriptMovingEndEvent = OnScriptMovingEndEvent;
2436  if (handlerScriptMovingEndEvent != null)
2437  {
2438  foreach (ScriptMovingEndEvent d in handlerScriptMovingEndEvent.GetInvocationList())
2439  {
2440  try
2441  {
2442  d(localID);
2443  }
2444  catch (Exception e)
2445  {
2446  m_log.ErrorFormat(
2447  "[EVENT MANAGER]: Delegate for TriggerMovingEndEvent failed - continuing. {0} {1}",
2448  e.Message, e.StackTrace);
2449  }
2450  }
2451  }
2452  }
2453 
2454  public void TriggerRequestChangeWaterHeight(float height)
2455  {
2456  if (height < 0)
2457  {
2458  // ignore negative water height
2459  return;
2460  }
2461 
2462  RequestChangeWaterHeight handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight;
2463  if (handlerRequestChangeWaterHeight != null)
2464  {
2465  foreach (RequestChangeWaterHeight d in handlerRequestChangeWaterHeight.GetInvocationList())
2466  {
2467  try
2468  {
2469  d(height);
2470  }
2471  catch (Exception e)
2472  {
2473  m_log.ErrorFormat(
2474  "[EVENT MANAGER]: Delegate for TriggerRequestChangeWaterHeight failed - continuing. {0} {1}",
2475  e.Message, e.StackTrace);
2476  }
2477  }
2478  }
2479  }
2480 
2481  public void TriggerAvatarKill(uint KillerObjectLocalID, ScenePresence DeadAvatar)
2482  {
2483  AvatarKillData handlerAvatarKill = OnAvatarKilled;
2484  if (handlerAvatarKill != null)
2485  {
2486  foreach (AvatarKillData d in handlerAvatarKill.GetInvocationList())
2487  {
2488  try
2489  {
2490  d(KillerObjectLocalID, DeadAvatar);
2491  }
2492  catch (Exception e)
2493  {
2494  m_log.ErrorFormat(
2495  "[EVENT MANAGER]: Delegate for TriggerAvatarKill failed - continuing. {0} {1}",
2496  e.Message, e.StackTrace);
2497  }
2498  }
2499  }
2500  }
2501 
2503  {
2504  Action<ScenePresence> handlerSignificantClientMovement = OnSignificantClientMovement;
2505  if (handlerSignificantClientMovement != null)
2506  {
2507  foreach (Action<ScenePresence> d in handlerSignificantClientMovement.GetInvocationList())
2508  {
2509  try
2510  {
2511  d(presence);
2512  }
2513  catch (Exception e)
2514  {
2515  m_log.ErrorFormat(
2516  "[EVENT MANAGER]: Delegate for TriggerSignificantClientMovement failed - continuing. {0} {1}",
2517  e.Message, e.StackTrace);
2518  }
2519  }
2520  }
2521  }
2522 
2523  public void TriggerOnChatFromWorld(Object sender, OSChatMessage chat)
2524  {
2525  ChatFromWorldEvent handlerChatFromWorld = OnChatFromWorld;
2526  if (handlerChatFromWorld != null)
2527  {
2528  foreach (ChatFromWorldEvent d in handlerChatFromWorld.GetInvocationList())
2529  {
2530  try
2531  {
2532  d(sender, chat);
2533  }
2534  catch (Exception e)
2535  {
2536  m_log.ErrorFormat(
2537  "[EVENT MANAGER]: Delegate for TriggerOnChatFromWorld failed - continuing. {0} {1}",
2538  e.Message, e.StackTrace);
2539  }
2540  }
2541  }
2542  }
2543 
2544  public void TriggerOnChatFromClient(Object sender, OSChatMessage chat)
2545  {
2546  ChatFromClientEvent handlerChatFromClient = OnChatFromClient;
2547  if (handlerChatFromClient != null)
2548  {
2549  foreach (ChatFromClientEvent d in handlerChatFromClient.GetInvocationList())
2550  {
2551  try
2552  {
2553  d(sender, chat);
2554  }
2555  catch (Exception e)
2556  {
2557  m_log.ErrorFormat(
2558  "[EVENT MANAGER]: Delegate for TriggerOnChatFromClient failed - continuing. {0} {1}",
2559  e.Message, e.StackTrace);
2560  }
2561  }
2562  }
2563  }
2564 
2566  UUID senderID, HashSet<UUID> receiverIDs,
2567  string message, ChatTypeEnum type, Vector3 fromPos, string fromName,
2568  ChatSourceType src, ChatAudibleLevel level)
2569  {
2570  ChatToClientsEvent handler = OnChatToClients;
2571  if (handler != null)
2572  {
2573  foreach (ChatToClientsEvent d in handler.GetInvocationList())
2574  {
2575  try
2576  {
2577  d(senderID, receiverIDs, message, type, fromPos, fromName, src, level);
2578  }
2579  catch (Exception e)
2580  {
2581  m_log.ErrorFormat(
2582  "[EVENT MANAGER]: Delegate for TriggerOnChatToClients failed - continuing. {0} {1}",
2583  e.Message, e.StackTrace);
2584  }
2585  }
2586  }
2587  }
2588 
2589  public void TriggerOnChatBroadcast(Object sender, OSChatMessage chat)
2590  {
2591  ChatBroadcastEvent handlerChatBroadcast = OnChatBroadcast;
2592  if (handlerChatBroadcast != null)
2593  {
2594  foreach (ChatBroadcastEvent d in handlerChatBroadcast.GetInvocationList())
2595  {
2596  try
2597  {
2598  d(sender, chat);
2599  }
2600  catch (Exception e)
2601  {
2602  m_log.ErrorFormat(
2603  "[EVENT MANAGER]: Delegate for TriggerOnChatBroadcast failed - continuing. {0} {1}",
2604  e.Message, e.StackTrace);
2605  }
2606  }
2607  }
2608  }
2609 
2610  internal void TriggerControlEvent(UUID scriptUUID, UUID avatarID, uint held, uint _changed)
2611  {
2612  ScriptControlEvent handlerScriptControlEvent = OnScriptControlEvent;
2613  if (handlerScriptControlEvent != null)
2614  {
2615  foreach (ScriptControlEvent d in handlerScriptControlEvent.GetInvocationList())
2616  {
2617  try
2618  {
2619  d(scriptUUID, avatarID, held, _changed);
2620  }
2621  catch (Exception e)
2622  {
2623  m_log.ErrorFormat(
2624  "[EVENT MANAGER]: Delegate for TriggerControlEvent failed - continuing. {0} {1}",
2625  e.Message, e.StackTrace);
2626  }
2627  }
2628  }
2629  }
2630 
2632  {
2633  NoticeNoLandDataFromStorage handlerNoticeNoLandDataFromStorage = OnNoticeNoLandDataFromStorage;
2634  if (handlerNoticeNoLandDataFromStorage != null)
2635  {
2636  foreach (NoticeNoLandDataFromStorage d in handlerNoticeNoLandDataFromStorage.GetInvocationList())
2637  {
2638  try
2639  {
2640  d();
2641  }
2642  catch (Exception e)
2643  {
2644  m_log.ErrorFormat(
2645  "[EVENT MANAGER]: Delegate for TriggerNoticeNoLandDataFromStorage failed - continuing. {0} {1}",
2646  e.Message, e.StackTrace);
2647  }
2648  }
2649  }
2650  }
2651 
2652  public void TriggerIncomingLandDataFromStorage(List<LandData> landData)
2653  {
2654  IncomingLandDataFromStorage handlerIncomingLandDataFromStorage = OnIncomingLandDataFromStorage;
2655  if (handlerIncomingLandDataFromStorage != null)
2656  {
2657  foreach (IncomingLandDataFromStorage d in handlerIncomingLandDataFromStorage.GetInvocationList())
2658  {
2659  try
2660  {
2661  d(landData);
2662  }
2663  catch (Exception e)
2664  {
2665  m_log.ErrorFormat(
2666  "[EVENT MANAGER]: Delegate for TriggerIncomingLandDataFromStorage failed - continuing. {0} {1}",
2667  e.Message, e.StackTrace);
2668  }
2669  }
2670  }
2671  }
2672 
2673  public void TriggerSetAllowForcefulBan(bool allow)
2674  {
2675  SetAllowForcefulBan handlerSetAllowForcefulBan = OnSetAllowForcefulBan;
2676  if (handlerSetAllowForcefulBan != null)
2677  {
2678  foreach (SetAllowForcefulBan d in handlerSetAllowForcefulBan.GetInvocationList())
2679  {
2680  try
2681  {
2682  d(allow);
2683  }
2684  catch (Exception e)
2685  {
2686  m_log.ErrorFormat(
2687  "[EVENT MANAGER]: Delegate for TriggerSetAllowForcefulBan failed - continuing. {0} {1}",
2688  e.Message, e.StackTrace);
2689  }
2690  }
2691  }
2692  }
2693 
2695  {
2696  RequestParcelPrimCountUpdate handlerRequestParcelPrimCountUpdate = OnRequestParcelPrimCountUpdate;
2697  if (handlerRequestParcelPrimCountUpdate != null)
2698  {
2699  foreach (RequestParcelPrimCountUpdate d in handlerRequestParcelPrimCountUpdate.GetInvocationList())
2700  {
2701  try
2702  {
2703  d();
2704  }
2705  catch (Exception e)
2706  {
2707  m_log.ErrorFormat(
2708  "[EVENT MANAGER]: Delegate for TriggerRequestParcelPrimCountUpdate failed - continuing. {0} {1}",
2709  e.Message, e.StackTrace);
2710  }
2711  }
2712  }
2713  }
2714 
2716  {
2717  ParcelPrimCountTainted handlerParcelPrimCountTainted = OnParcelPrimCountTainted;
2718  if (handlerParcelPrimCountTainted != null)
2719  {
2720  foreach (ParcelPrimCountTainted d in handlerParcelPrimCountTainted.GetInvocationList())
2721  {
2722  try
2723  {
2724  d();
2725  }
2726  catch (Exception e)
2727  {
2728  m_log.ErrorFormat(
2729  "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountTainted failed - continuing. {0} {1}",
2730  e.Message, e.StackTrace);
2731  }
2732  }
2733  }
2734  }
2735 
2741  public void TriggerTimerEvent(uint objLocalID, double Interval)
2742  {
2743  throw new NotImplementedException("TriggerTimerEvent was thought to be not used anymore and the registration for the event from scene object part has been commented out due to a memory leak");
2744  //handlerScriptTimerEvent = OnScriptTimerEvent;
2745  //if (handlerScriptTimerEvent != null)
2746  //{
2747  // handlerScriptTimerEvent(objLocalID, Interval);
2748  //}
2749  }
2750 
2755  public void TriggerEstateToolsSunUpdate(ulong regionHandle)
2756  {
2757  EstateToolsSunUpdate handlerEstateToolsSunUpdate = OnEstateToolsSunUpdate;
2758  if (handlerEstateToolsSunUpdate != null)
2759  {
2760  foreach (EstateToolsSunUpdate d in handlerEstateToolsSunUpdate.GetInvocationList())
2761  {
2762  try
2763  {
2764  d(regionHandle);
2765  }
2766  catch (Exception e)
2767  {
2768  m_log.ErrorFormat(
2769  "[EVENT MANAGER]: Delegate for TriggerEstateToolsSunUpdate failed - continuing. {0} {1}",
2770  e.Message, e.StackTrace);
2771  }
2772  }
2773  }
2774  }
2775 
2777  {
2778  SunLindenHour handlerCurrentTimeAsLindenSunHour = OnGetCurrentTimeAsLindenSunHour;
2779  if (handlerCurrentTimeAsLindenSunHour != null)
2780  {
2781  foreach (SunLindenHour d in handlerCurrentTimeAsLindenSunHour.GetInvocationList())
2782  {
2783  try
2784  {
2785  return d();
2786  }
2787  catch (Exception e)
2788  {
2789  m_log.ErrorFormat(
2790  "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}",
2791  e.Message, e.StackTrace);
2792  }
2793  }
2794  }
2795 
2796  return 6;
2797  }
2798 
2799  public void TriggerOarFileLoaded(Guid requestId, List<UUID> loadedScenes, string message)
2800  {
2801  OarFileLoaded handlerOarFileLoaded = OnOarFileLoaded;
2802  if (handlerOarFileLoaded != null)
2803  {
2804  foreach (OarFileLoaded d in handlerOarFileLoaded.GetInvocationList())
2805  {
2806  try
2807  {
2808  d(requestId, loadedScenes, message);
2809  }
2810  catch (Exception e)
2811  {
2812  m_log.ErrorFormat(
2813  "[EVENT MANAGER]: Delegate for TriggerOarFileLoaded failed - continuing. {0} {1}",
2814  e.Message, e.StackTrace);
2815  }
2816  }
2817  }
2818  }
2819 
2820  public void TriggerOarFileSaved(Guid requestId, string message)
2821  {
2822  OarFileSaved handlerOarFileSaved = OnOarFileSaved;
2823  if (handlerOarFileSaved != null)
2824  {
2825  foreach (OarFileSaved d in handlerOarFileSaved.GetInvocationList())
2826  {
2827  try
2828  {
2829  d(requestId, message);
2830  }
2831  catch (Exception e)
2832  {
2833  m_log.ErrorFormat(
2834  "[EVENT MANAGER]: Delegate for TriggerOarFileSaved failed - continuing. {0} {1}",
2835  e.Message, e.StackTrace);
2836  }
2837  }
2838  }
2839  }
2840 
2841  public void TriggerEmptyScriptCompileQueue(int numScriptsFailed, string message)
2842  {
2843  EmptyScriptCompileQueue handlerEmptyScriptCompileQueue = OnEmptyScriptCompileQueue;
2844  if (handlerEmptyScriptCompileQueue != null)
2845  {
2846  foreach (EmptyScriptCompileQueue d in handlerEmptyScriptCompileQueue.GetInvocationList())
2847  {
2848  try
2849  {
2850  d(numScriptsFailed, message);
2851  }
2852  catch (Exception e)
2853  {
2854  m_log.ErrorFormat(
2855  "[EVENT MANAGER]: Delegate for TriggerEmptyScriptCompileQueue failed - continuing. {0} {1}",
2856  e.Message, e.StackTrace);
2857  }
2858  }
2859  }
2860  }
2861 
2862  public void TriggerScriptCollidingStart(uint localId, ColliderArgs colliders)
2863  {
2864  ScriptColliding handlerCollidingStart = OnScriptColliderStart;
2865  if (handlerCollidingStart != null)
2866  {
2867  foreach (ScriptColliding d in handlerCollidingStart.GetInvocationList())
2868  {
2869  try
2870  {
2871  d(localId, colliders);
2872  }
2873  catch (Exception e)
2874  {
2875  m_log.ErrorFormat(
2876  "[EVENT MANAGER]: Delegate for TriggerScriptCollidingStart failed - continuing. {0} {1}",
2877  e.Message, e.StackTrace);
2878  }
2879  }
2880  }
2881  }
2882 
2883  public void TriggerScriptColliding(uint localId, ColliderArgs colliders)
2884  {
2885  ScriptColliding handlerColliding = OnScriptColliding;
2886  if (handlerColliding != null)
2887  {
2888  foreach (ScriptColliding d in handlerColliding.GetInvocationList())
2889  {
2890  try
2891  {
2892  d(localId, colliders);
2893  }
2894  catch (Exception e)
2895  {
2896  m_log.ErrorFormat(
2897  "[EVENT MANAGER]: Delegate for TriggerScriptColliding failed - continuing. {0} {1}",
2898  e.Message, e.StackTrace);
2899  }
2900  }
2901  }
2902  }
2903 
2904  public void TriggerScriptCollidingEnd(uint localId, ColliderArgs colliders)
2905  {
2906  ScriptColliding handlerCollidingEnd = OnScriptCollidingEnd;
2907  if (handlerCollidingEnd != null)
2908  {
2909  foreach (ScriptColliding d in handlerCollidingEnd.GetInvocationList())
2910  {
2911  try
2912  {
2913  d(localId, colliders);
2914  }
2915  catch (Exception e)
2916  {
2917  m_log.ErrorFormat(
2918  "[EVENT MANAGER]: Delegate for TriggerScriptCollidingEnd failed - continuing. {0} {1}",
2919  e.Message, e.StackTrace);
2920  }
2921  }
2922  }
2923  }
2924 
2925  public void TriggerScriptLandCollidingStart(uint localId, ColliderArgs colliders)
2926  {
2927  ScriptColliding handlerLandCollidingStart = OnScriptLandColliderStart;
2928  if (handlerLandCollidingStart != null)
2929  {
2930  foreach (ScriptColliding d in handlerLandCollidingStart.GetInvocationList())
2931  {
2932  try
2933  {
2934  d(localId, colliders);
2935  }
2936  catch (Exception e)
2937  {
2938  m_log.ErrorFormat(
2939  "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingStart failed - continuing. {0} {1}",
2940  e.Message, e.StackTrace);
2941  }
2942  }
2943  }
2944  }
2945 
2946  public void TriggerScriptLandColliding(uint localId, ColliderArgs colliders)
2947  {
2948  ScriptColliding handlerLandColliding = OnScriptLandColliding;
2949  if (handlerLandColliding != null)
2950  {
2951  foreach (ScriptColliding d in handlerLandColliding.GetInvocationList())
2952  {
2953  try
2954  {
2955  d(localId, colliders);
2956  }
2957  catch (Exception e)
2958  {
2959  m_log.ErrorFormat(
2960  "[EVENT MANAGER]: Delegate for TriggerScriptLandColliding failed - continuing. {0} {1}",
2961  e.Message, e.StackTrace);
2962  }
2963  }
2964  }
2965  }
2966 
2967  public void TriggerScriptLandCollidingEnd(uint localId, ColliderArgs colliders)
2968  {
2969  ScriptColliding handlerLandCollidingEnd = OnScriptLandColliderEnd;
2970  if (handlerLandCollidingEnd != null)
2971  {
2972  foreach (ScriptColliding d in handlerLandCollidingEnd.GetInvocationList())
2973  {
2974  try
2975  {
2976  d(localId, colliders);
2977  }
2978  catch (Exception e)
2979  {
2980  m_log.ErrorFormat(
2981  "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingEnd failed - continuing. {0} {1}",
2982  e.Message, e.StackTrace);
2983  }
2984  }
2985  }
2986  }
2987 
2988  public void TriggerSetRootAgentScene(UUID agentID, Scene scene)
2989  {
2990  OnSetRootAgentSceneDelegate handlerSetRootAgentScene = OnSetRootAgentScene;
2991  if (handlerSetRootAgentScene != null)
2992  {
2993  foreach (OnSetRootAgentSceneDelegate d in handlerSetRootAgentScene.GetInvocationList())
2994  {
2995  try
2996  {
2997  d(agentID, scene);
2998  }
2999  catch (Exception e)
3000  {
3001  m_log.ErrorFormat(
3002  "[EVENT MANAGER]: Delegate for TriggerSetRootAgentScene failed - continuing. {0} {1}",
3003  e.Message, e.StackTrace);
3004  }
3005  }
3006  }
3007  }
3008 
3009  public void TriggerOnRegionUp(GridRegion otherRegion)
3010  {
3011  RegionUp handlerOnRegionUp = OnRegionUp;
3012  if (handlerOnRegionUp != null)
3013  {
3014  foreach (RegionUp d in handlerOnRegionUp.GetInvocationList())
3015  {
3016  try
3017  {
3018  d(otherRegion);
3019  }
3020  catch (Exception e)
3021  {
3022  m_log.ErrorFormat(
3023  "[EVENT MANAGER]: Delegate for TriggerOnRegionUp failed - continuing. {0} {1}",
3024  e.Message, e.StackTrace);
3025  }
3026  }
3027  }
3028  }
3029 
3031  {
3032  SceneObjectDelegate handler = OnSceneObjectLoaded;
3033  if (handler != null)
3034  {
3035  foreach (SceneObjectDelegate d in handler.GetInvocationList())
3036  {
3037  try
3038  {
3039  d(so);
3040  }
3041  catch (Exception e)
3042  {
3043  m_log.ErrorFormat(
3044  "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectLoaded failed - continuing. {0} {1}",
3045  e.Message, e.StackTrace);
3046  }
3047  }
3048  }
3049  }
3050 
3051  public void TriggerOnSceneObjectPreSave(SceneObjectGroup persistingSo, SceneObjectGroup originalSo)
3052  {
3053  SceneObjectPreSaveDelegate handler = OnSceneObjectPreSave;
3054  if (handler != null)
3055  {
3056  foreach (SceneObjectPreSaveDelegate d in handler.GetInvocationList())
3057  {
3058  try
3059  {
3060  d(persistingSo, originalSo);
3061  }
3062  catch (Exception e)
3063  {
3064  m_log.ErrorFormat(
3065  "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPreSave failed - continuing. {0} {1}",
3066  e.Message, e.StackTrace);
3067  }
3068  }
3069  }
3070  }
3071 
3072  public void TriggerOnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed)
3073  {
3074  SceneObjectPartCopyDelegate handler = OnSceneObjectPartCopy;
3075  if (handler != null)
3076  {
3077  foreach (SceneObjectPartCopyDelegate d in handler.GetInvocationList())
3078  {
3079  try
3080  {
3081  d(copy, original, userExposed);
3082  }
3083  catch (Exception e)
3084  {
3085  m_log.ErrorFormat(
3086  "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPartCopy failed - continuing. {0} {1}",
3087  e.Message, e.StackTrace);
3088  }
3089  }
3090  }
3091  }
3092 
3094  {
3095  SceneObjectPartUpdated handler = OnSceneObjectPartUpdated;
3096  if (handler != null)
3097  {
3098  foreach (SceneObjectPartUpdated d in handler.GetInvocationList())
3099  {
3100  try
3101  {
3102  d(sop, full);
3103  }
3104  catch (Exception e)
3105  {
3106  m_log.ErrorFormat(
3107  "[EVENT MANAGER]: Delegate for TriggerSceneObjectPartUpdated failed - continuing. {0} {1}",
3108  e.Message, e.StackTrace);
3109  }
3110  }
3111  }
3112  }
3113 
3115  {
3116  ScenePresenceUpdated handler = OnScenePresenceUpdated;
3117  if (handler != null)
3118  {
3119  foreach (ScenePresenceUpdated d in handler.GetInvocationList())
3120  {
3121  try
3122  {
3123  d(sp);
3124  }
3125  catch (Exception e)
3126  {
3127  m_log.ErrorFormat(
3128  "[EVENT MANAGER]: Delegate for TriggerScenePresenceUpdated failed - continuing. {0} {1}",
3129  e.Message, e.StackTrace);
3130  }
3131  }
3132  }
3133  }
3134 
3136  int local_id, IClientAPI remote_client)
3137  {
3138  ParcelPropertiesUpdateRequest handler = OnParcelPropertiesUpdateRequest;
3139  if (handler != null)
3140  {
3141  foreach (ParcelPropertiesUpdateRequest d in handler.GetInvocationList())
3142  {
3143  try
3144  {
3145  d(args, local_id, remote_client);
3146  }
3147  catch (Exception e)
3148  {
3149  m_log.ErrorFormat(
3150  "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPartCopy failed - continuing. {0} {1}",
3151  e.Message, e.StackTrace);
3152  }
3153  }
3154  }
3155  }
3156 
3158  {
3159  Action<Scene> handler = OnSceneShuttingDown;
3160  if (handler != null)
3161  {
3162  foreach (Action<Scene> d in handler.GetInvocationList())
3163  {
3164  m_log.InfoFormat("[EVENT MANAGER]: TriggerSceneShuttingDown invoque {0}", d.Method.Name.ToString());
3165  try
3166  {
3167  d(s);
3168  }
3169  catch (Exception e)
3170  {
3171  m_log.ErrorFormat(
3172  "[EVENT MANAGER]: Delegate for TriggerSceneShuttingDown failed - continuing. {0} {1}",
3173  e.Message, e.StackTrace);
3174  }
3175  }
3176  }
3177  m_log.Info("[EVENT MANAGER]: TriggerSceneShuttingDown done");
3178  }
3179 
3180  public void TriggerOnRegionStarted(Scene scene)
3181  {
3182  RegionStarted handler = OnRegionStarted;
3183 
3184  if (handler != null)
3185  {
3186  foreach (RegionStarted d in handler.GetInvocationList())
3187  {
3188  try
3189  {
3190  d(scene);
3191  }
3192  catch (Exception e)
3193  {
3194  m_log.ErrorFormat("[EVENT MANAGER]: Delegate for RegionStarted failed - continuing {0} - {1}",
3195  e.Message, e.StackTrace);
3196  }
3197  }
3198  }
3199  }
3200 
3202  {
3203  RegionHeartbeatStart handler = OnRegionHeartbeatStart;
3204 
3205  if (handler != null)
3206  {
3207  foreach (RegionHeartbeatStart d in handler.GetInvocationList())
3208  {
3209  try
3210  {
3211  d(scene);
3212  }
3213  catch (Exception e)
3214  {
3215  m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionHeartbeatStart failed - continuing {0} - {1}",
3216  e.Message, e.StackTrace);
3217  }
3218  }
3219  }
3220  }
3221 
3223  {
3224  RegionHeartbeatEnd handler = OnRegionHeartbeatEnd;
3225 
3226  if (handler != null)
3227  {
3228  foreach (RegionHeartbeatEnd d in handler.GetInvocationList())
3229  {
3230  try
3231  {
3232  d(scene);
3233  }
3234  catch (Exception e)
3235  {
3236  m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionHeartbeatEnd failed - continuing {0} - {1}",
3237  e.Message, e.StackTrace);
3238  }
3239  }
3240  }
3241  }
3242 
3244  {
3245  RegionLoginsStatusChange handler = OnRegionLoginsStatusChange;
3246 
3247  if (handler != null)
3248  {
3249  foreach (RegionLoginsStatusChange d in handler.GetInvocationList())
3250  {
3251  try
3252  {
3253  d(scene);
3254  }
3255  catch (Exception e)
3256  {
3257  m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionLoginsStatusChange failed - continuing {0} - {1}",
3258  e.Message, e.StackTrace);
3259  }
3260  }
3261  }
3262  }
3263 
3265  {
3266  Action<IScene> handler = OnRegionReadyStatusChange;
3267 
3268  if (handler != null)
3269  {
3270  foreach (Action<IScene> d in handler.GetInvocationList())
3271  {
3272  try
3273  {
3274  d(scene);
3275  }
3276  catch (Exception e)
3277  {
3278  m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionReadyStatusChange failed - continuing {0} - {1}",
3279  e.Message, e.StackTrace);
3280  }
3281  }
3282  }
3283  }
3284 
3285  public void TriggerPrimsLoaded(Scene s)
3286  {
3287  PrimsLoaded handler = OnPrimsLoaded;
3288 
3289  if (handler != null)
3290  {
3291  foreach (PrimsLoaded d in handler.GetInvocationList())
3292  {
3293  try
3294  {
3295  d(s);
3296  }
3297  catch (Exception e)
3298  {
3299  m_log.ErrorFormat("[EVENT MANAGER]: Delegate for PrimsLoaded failed - continuing {0} - {1}",
3300  e.Message, e.StackTrace);
3301  }
3302  }
3303  }
3304  }
3305 
3306  public void TriggerTeleportStart(IClientAPI client, GridRegion destination, GridRegion finalDestination, uint teleportFlags, bool gridLogout)
3307  {
3308  TeleportStart handler = OnTeleportStart;
3309 
3310  if (handler != null)
3311  {
3312  foreach (TeleportStart d in handler.GetInvocationList())
3313  {
3314  try
3315  {
3316  d(client, destination, finalDestination, teleportFlags, gridLogout);
3317  }
3318  catch (Exception e)
3319  {
3320  m_log.ErrorFormat("[EVENT MANAGER]: Delegate for TeleportStart failed - continuing {0} - {1}",
3321  e.Message, e.StackTrace);
3322  }
3323  }
3324  }
3325  }
3326 
3327  public void TriggerTeleportFail(IClientAPI client, bool gridLogout)
3328  {
3329  TeleportFail handler = OnTeleportFail;
3330 
3331  if (handler != null)
3332  {
3333  foreach (TeleportFail d in handler.GetInvocationList())
3334  {
3335  try
3336  {
3337  d(client, gridLogout);
3338  }
3339  catch (Exception e)
3340  {
3341  m_log.ErrorFormat("[EVENT MANAGER]: Delegate for TeleportFail failed - continuing {0} - {1}",
3342  e.Message, e.StackTrace);
3343  }
3344  }
3345  }
3346  }
3347 
3348  public void TriggerExtraSettingChanged(Scene scene, string name, string val)
3349  {
3350  ExtraSettingChangedDelegate handler = OnExtraSettingChanged;
3351 
3352  if (handler != null)
3353  {
3354  foreach (ExtraSettingChangedDelegate d in handler.GetInvocationList())
3355  {
3356  try
3357  {
3358  d(scene, name, val);
3359  }
3360  catch (Exception e)
3361  {
3362  m_log.ErrorFormat("[EVENT MANAGER]: Delegate for ExtraSettingChanged failed - continuing {0} - {1}",
3363  e.Message, e.StackTrace);
3364  }
3365  }
3366  }
3367  }
3368 
3369  public void TriggerThrottleUpdate(ScenePresence scenePresence)
3370  {
3371  ThrottleUpdate handler = OnThrottleUpdate;
3372  if (handler != null)
3373  {
3374  handler(scenePresence);
3375  }
3376  }
3377 
3378 // public void TriggerGatherUuids(SceneObjectPart sop, IDictionary<UUID, AssetType> assetUuids)
3379 // {
3380 // GatherUuids handler = OnGatherUuids;
3381 //
3382 // if (handler != null)
3383 // {
3384 // foreach (GatherUuids d in handler.GetInvocationList())
3385 // {
3386 // try
3387 // {
3388 // d(sop, assetUuids);
3389 // }
3390 // catch (Exception e)
3391 // {
3392 // m_log.ErrorFormat("[EVENT MANAGER]: Delegate for TriggerUuidGather failed - continuing {0} - {1}",
3393 // e.Message, e.StackTrace);
3394 // }
3395 // }
3396 // }
3397 // }
3398  }
3399 }
void TriggerSetRootAgentScene(UUID agentID, Scene scene)
SceneObjectPreSaveDelegate OnSceneObjectPreSave
Called immediately before an object is saved to storage.
bool TriggerDeRezRequested(IClientAPI client, List< SceneObjectGroup > objs, DeRezAction action)
ObjectGrabDelegate OnObjectGrabbing
Triggered when an object is being touched/grabbed continuously.
ScriptColliding OnScriptColliderStart
Triggered when a physical collision has started between a prim and something other than the region te...
void TriggerValidateLandBuy(Object sender, LandBuyArgs args)
OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile
ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest
Triggered after parcel properties have been updated.
bool TriggerGroupMove(UUID groupID, Vector3 delta)
OnClientConnectCoreDelegate OnClientConnect
Triggered when a new client connects to the scene.
void TriggerRemoveScript(uint localID, UUID itemID)
ScriptChangedEvent OnScriptChangedEvent
Triggered when some scene object properties change.
void TriggerOnSendNewWindlightProfileTargeted(RegionLightShareData wl, UUID user)
void TriggerObjectGrab(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs)
ParcelPrimCountTainted OnParcelPrimCountTainted
Triggered when the parcel prim count has been altered.
void TriggerOarFileLoaded(Guid requestId, List< UUID > loadedScenes, string message)
ScriptColliding OnScriptLandColliding
Triggered when an object that previously collided with the region terrain has not yet stopped collidi...
void TriggerTimerEvent(uint objLocalID, double Interval)
this lets us keep track of nasty script events like timer, etc.
ScriptNotAtRotTargetEvent OnScriptNotAtRotTargetEvent
Triggered when an object has a rotation target but has not arrived within a tolerance rotation...
void TriggerOnIncomingSceneObject(SceneObjectGroup so)
void TriggerOnSceneObjectLoaded(SceneObjectGroup so)
void TriggerAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID)
TeleportFail OnTeleportFail
Trigered when a teleport fails.
TeleportStart OnTeleportStart
Triggered when a teleport starts
void TriggerAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion currentrot)
MoneyTransferEvent OnMoneyTransfer
Triggered when an attempt to transfer grid currency occurs
void TriggerAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 currentpos)
NewScript OnNewScript
Fired when a script is created.
void TriggerOnNewInventoryItemUploadComplete(UUID agentID, AssetType type, UUID AssetID, String AssetName, int userlevel)
RequestChangeWaterHeight OnRequestChangeWaterHeight
AvatarKillData OnAvatarKilled
Fired if any avatar is 'killed' due to its health falling to zero
void TriggerScriptLandCollidingStart(uint localId, ColliderArgs colliders)
SceneGroupGrabed OnSceneGroupGrab
Triggered when an object is grabbed.
void TriggerObjectDeGrab(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs)
void TriggerOnDeregisterCaps(UUID agentID, Caps caps)
Action< IClientAPI > OnClientLogin
Fired if the client entering this sim is doing so as a new login
void TriggerPermissionError(UUID user, string reason)
LandBuyArgs(UUID pagentId, UUID pgroupId, bool pfinal, bool pgroupOwned, bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice, bool pauthenticated)
void TriggerClientClosed(UUID ClientID, Scene scene)
OnSetRootAgentSceneDelegate OnSetRootAgentScene
Triggered before the grunt work for adding a root agent to a scene has been performed (resuming attac...
A scene object group is conceptually an object in the scene. The object is constituted of SceneObject...
MoneyTransferArgs(UUID asender, UUID areceiver, int aamount, int atransactiontype, string adescription)
AvatarAppearanceChange OnAvatarAppearanceChange
void TriggerOnRegionUp(GridRegion otherRegion)
void TriggerOnSceneObjectPreSave(SceneObjectGroup persistingSo, SceneObjectGroup originalSo)
void TriggerObjectRemovedFromPhysicalScene(SceneObjectPart obj)
void TriggerOnMakeChildAgent(ScenePresence presence)
OpenSim.Framework.Capabilities.Caps Caps
void TriggerObjectGrabbing(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs)
void TriggerLandObjectAdded(ILandObject newParcel)
void TriggerScriptColliding(uint localId, ColliderArgs colliders)
void TriggerAvatarAppearanceChanged(ScenePresence avatar)
SceneGroupMoved OnSceneGroupMove
Triggered when an object is moved.
RegionLoginsStatusChange OnRegionLoginsStatusChange
Fired when logins to a region are enabled or disabled.
void TriggerOnMakeRootAgent(ScenePresence presence)
void TriggerObjectBeingRemovedFromScene(SceneObjectGroup obj)
OnTerrainCheckUpdatesDelegate OnTerrainCheckUpdates
Definition: EventManager.cs:93
SceneGroupSpun OnSceneGroupSpin
Triggered when an object is being spun.
IncomingLandDataFromStorage OnIncomingLandDataFromStorage
void TriggerStartScript(uint localID, UUID itemID)
ScriptResetDelegate OnScriptReset
Triggered when a script resets.
UpdateScript OnUpdateScript
An indication that the script has changed.
SceneObjectDelegate OnSceneObjectLoaded
Called immediately after an object is loaded from storage.
ScriptMovingStartEvent OnScriptMovingStartEvent
TODO: Should be triggered when a physics object starts moving.
void TriggerScriptLandColliding(uint localId, ColliderArgs colliders)
ObjectDeGrabDelegate OnObjectDeGrab
Triggered when an object stops being touched/grabbed.
StartScript OnStartScript
Triggered when a script starts.
OnParcelPrimCountAddDelegate OnParcelPrimCountAdd
Triggered in response to OnParcelPrimCountUpdate for objects that actually contribute to parcel prim ...
Action OnShutdown
Triggered when the entire simulator is shutdown.
OpenSim.Services.Interfaces.GridRegion GridRegion
Definition: EventManager.cs:37
LandBuy OnLandBuy
Triggered after after OnValidateLandBuy
Action< ScenePresence > OnMakeRootAgent
Triggered after the grunt work for adding a root agent to a scene has been performed (resuming attach...
void TriggerMoneyTransfer(Object sender, MoneyTransferArgs args)
OnRemovePresenceDelegate OnRemovePresence
Triggered when a presence is removed from the scene
void TriggerIncomingLandDataFromStorage(List< LandData > landData)
void TriggerObjectAddedToPhysicalScene(SceneObjectPart obj)
void TriggerAvatarKill(uint KillerObjectLocalID, ScenePresence DeadAvatar)
void TriggerOnChatFromWorld(Object sender, OSChatMessage chat)
AvatarEnteringNewParcel OnAvatarEnteringNewParcel
EmptyScriptCompileQueue OnEmptyScriptCompileQueue
void TriggerOnParcelPropertiesUpdateRequest(LandUpdateArgs args, int local_id, IClientAPI remote_client)
void TriggerLandObjectUpdated(uint localParcelID, ILandObject newParcel)
void TriggerOnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed)
void TriggerOnRegisterCaps(UUID agentID, Caps caps)
RequestParcelPrimCountUpdate OnRequestParcelPrimCountUpdate
void TriggerIncomingInstantMessage(GridInstantMessage message)
OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion rotation
Definition: ICM_Api.cs:32
void TriggerScenePresenceUpdated(ScenePresence sp)
void TriggerStopScript(uint localID, UUID itemID)
IncomingInstantMessage OnIncomingInstantMessage
SceneObjectPartUpdated OnSceneObjectPartUpdated
SceneGroupSpinStarted OnSceneGroupSpinStart
Triggered when an object starts to spin.
ChatFromViewer Arguments
void TriggerOnBackup(ISimulationDataService dstore, bool forced)
void TriggerOnNewPresence(ScenePresence presence)
void TriggerEstateToolsSunUpdate(ulong regionHandle)
Called when the sun's position parameters have changed in the Region and/or Estate ...
void TriggerExtraSettingChanged(Scene scene, string name, string val)
void TriggerScriptCollidingEnd(uint localId, ColliderArgs colliders)
void TriggerLandBuy(Object sender, LandBuyArgs args)
Action< SceneObjectPart > OnObjectRemovedFromPhysicalScene
Triggered when an object is removed from the physical scene (PhysicsActor destroyed).
Action< SceneObjectGroup > OnObjectAddedToScene
Triggered when an object is added to the scene.
void TriggerOnChatBroadcast(Object sender, OSChatMessage chat)
ScriptAtTargetEvent OnScriptAtTargetEvent
Triggered when an object has arrived within a tolerance distance of a motion target.
ScriptAtRotTargetEvent OnScriptAtRotTargetEvent
Triggered when an object has arrived within a tolerance rotation of a rotation target.
DeRezRequested OnDeRezRequested
When a client sends a derez request for an object inworld but before the object is deleted ...
OnTerrainTaintedDelegate OnTerrainTainted
Triggered if the terrain has been edited
Definition: EventManager.cs:80
Action< IScene > OnRegionReadyStatusChange
Fired when a region is considered ready for use.
ExtraSettingChangedDelegate OnExtraSettingChanged
ScriptMovingEndEvent OnScriptMovingEndEvent
TODO: Should be triggered when a physics object stops moving.
SceneObjectPartCopyDelegate OnSceneObjectPartCopy
Called when a scene object part is cloned within the region.
void TriggerOnScriptChangedEvent(uint localID, uint change)
OnBackupDelegate OnBackup
Triggered when a region is backed up/persisted to storage
NewRezScript OnRezScript
Fired when a script is run.
void TriggerCrossAgentToNewRegion(ScenePresence agent, bool isFlying, GridRegion newRegion)
ScriptColliding OnScriptCollidingEnd
Triggered when something that previously collided with a prim has stopped colliding with it...
void TriggerEmptyScriptCompileQueue(int numScriptsFailed, string message)
bool TriggerGroupSpin(UUID groupID, Quaternion rotation)
A class for triggering remote scene events.
Definition: EventManager.cs:44
NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete
OnSendNewWindlightProfileTargetedDelegate OnSendNewWindlightProfileTargeted
OnParcelPrimCountUpdateDelegate OnParcelPrimCountUpdate
Triggered whenever the prim count may have been altered, or prior to an action that requires the curr...
ObjectBeingRemovedFromScene OnObjectBeingRemovedFromScene
Triggered when an object is removed from the scene.
OnTerrainTickDelegate OnTerrainTick
Triggered if the terrain has been edited
Definition: EventManager.cs:92
void TriggerOnClientMovement(ScenePresence avatar)
void TriggerParcelPrimCountAdd(SceneObjectGroup obj)
OnMakeChildAgentDelegate OnMakeChildAgent
Triggered when an agent has been made a child agent of a scene.
virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID)
void TriggerTeleportStart(IClientAPI client, GridRegion destination, GridRegion finalDestination, uint teleportFlags, bool gridLogout)
OpenSim.Framework.Capabilities.Caps Caps
Definition: EventManager.cs:36
OnNewClientDelegate OnNewClient
Triggered when a new client is added to the scene.
NoticeNoLandDataFromStorage OnNoticeNoLandDataFromStorage
void TriggerObjectAddedToScene(SceneObjectGroup obj)
RemoveScript OnRemoveScript
Triggered when a script is removed from an object.
ClientClosed OnClientClosed
Fired when a client is removed from a scene whether it's a child or a root agent. ...
StopScript OnStopScript
Triggered when a script stops.
ClientMovement OnClientMovement
Trigerred when an agent moves.
Definition: EventManager.cs:69
OnIncomingSceneObjectDelegate OnIncomingSceneObject
Triggered when an object or attachment enters a scene
ScriptControlEvent OnScriptControlEvent
Triggered when a script receives control input from an agent.
Action< SceneObjectPart > OnObjectAddedToPhysicalScene
Triggered when an object is placed into the physical scene (PhysicsActor created).
virtual void TriggerNewScript(UUID clientID, SceneObjectPart part, UUID itemID)
Action< ScenePresence > OnSignificantClientMovement
ScriptNotAtTargetEvent OnScriptNotAtTargetEvent
Triggered when an object has a motion target but has not arrived within a tolerance distance...
ScriptColliding OnScriptLandColliderEnd
Triggered when an object that previously collided with the region terrain has stopped colliding with ...
Action< Scene > OnSceneShuttingDown
Triggered when an individual scene is shutdown.
IncomingInstantMessage OnUnhandledInstantMessage
void TriggerScriptCollidingStart(uint localId, ColliderArgs colliders)
void TriggerGroupGrab(UUID groupID, Vector3 offset, UUID userID)
void TriggerThrottleUpdate(ScenePresence scenePresence)
OpenSim.Services.Interfaces.GridRegion GridRegion
void TriggerRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource)
void TriggerUnhandledInstantMessage(GridInstantMessage message)
delegate void ParcelPropertiesUpdateRequest(LandUpdateArgs args, int local_id, IClientAPI remote_client)
void TriggerOnChatFromClient(Object sender, OSChatMessage chat)
void TriggerOnChatToClients(UUID senderID, HashSet< UUID > receiverIDs, string message, ChatTypeEnum type, Vector3 fromPos, string fromName, ChatSourceType src, ChatAudibleLevel level)
OnPermissionErrorDelegate OnPermissionError
void TriggerTeleportFail(IClientAPI client, bool gridLogout)
void TriggerOarFileSaved(Guid requestId, string message)
ScriptColliding OnScriptColliding
Triggered when something that previously collided with a prim has not stopped colliding with it...
OnNewPresenceDelegate OnNewPresence
Triggered when a new presence is added to the scene
ObjectGrabDelegate OnObjectGrab
Fired when an object is touched/grabbed.
OnPluginConsoleDelegate OnPluginConsole
Triggered after OpenSim.IApplicationPlugin.PostInitialise has been called for all OpenSim...
void TriggerSceneObjectPartUpdated(SceneObjectPart sop, bool full)
void TriggerOnAttach(uint localID, UUID itemID, UUID avatarID)
void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID)
void TriggerScriptReset(uint localID, UUID itemID)
OnFrameDelegate OnFrame
Triggered on each sim frame.
Definition: EventManager.cs:58
void TriggerSignificantClientMovement(ScenePresence presence)
LandBuy OnValidateLandBuy
Triggered to allow or prevent a real estate transaction
delegate void GetScriptRunning(IClientAPI remoteClient, UUID objectID, UUID itemID)
ScriptColliding OnScriptLandColliderStart
Triggered when a physical collision has started between an object and the region terrain.
void TriggerScriptLandCollidingEnd(uint localId, ColliderArgs colliders)