2007-10-15 07:10:21 +00:00
/ *
2008-03-18 05:16:43 +00:00
* Copyright ( c ) Contributors , http : //opensimulator.org/
* See CONTRIBUTORS . TXT for a full list of copyright holders .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
* * Redistributions of source code must retain the above copyright
* notice , this list of conditions and the following disclaimer .
* * Redistributions in binary form must reproduce the above copyright
* notice , this list of conditions and the following disclaimer in the
* documentation and / or other materials provided with the distribution .
2009-06-01 06:37:14 +00:00
* * Neither the name of the OpenSimulator Project nor the
2008-03-18 05:16:43 +00:00
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission .
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ` ` AS IS ' ' AND ANY
* EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED . IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES
* ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ;
* LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
* ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
* /
2007-10-15 07:10:21 +00:00
2008-01-01 06:12:04 +00:00
using System ;
2009-02-12 09:53:12 +00:00
using System.Collections.Generic ;
2008-09-06 07:52:41 +00:00
using OpenMetaverse ;
2007-10-29 21:46:25 +00:00
using OpenSim.Framework ;
2008-11-08 17:46:10 +00:00
using OpenSim.Framework.Client ;
2009-02-06 16:55:34 +00:00
using OpenSim.Region.Framework.Interfaces ;
2009-06-18 14:33:35 +00:00
using Caps = OpenSim . Framework . Capabilities . Caps ;
2009-09-27 17:14:10 +00:00
using GridRegion = OpenSim . Services . Interfaces . GridRegion ;
2007-07-16 15:40:11 +00:00
2009-02-06 16:55:34 +00:00
namespace OpenSim.Region.Framework.Scenes
2007-07-16 15:40:11 +00:00
{
/// <summary>
/// A class for triggering remote scene events.
/// </summary>
public class EventManager
{
2008-05-01 18:04:42 +00:00
public delegate void OnFrameDelegate ( ) ;
2008-05-01 16:35:00 +00:00
2008-05-01 18:04:42 +00:00
public event OnFrameDelegate OnFrame ;
2007-07-16 15:40:11 +00:00
2007-12-20 03:24:34 +00:00
public delegate void ClientMovement ( ScenePresence client ) ;
2008-05-01 18:04:42 +00:00
public event ClientMovement OnClientMovement ;
2007-09-19 00:30:55 +00:00
2008-05-01 18:04:42 +00:00
public delegate void OnTerrainTickDelegate ( ) ;
2007-07-16 15:40:11 +00:00
2008-05-01 18:04:42 +00:00
public event OnTerrainTickDelegate OnTerrainTick ;
2007-09-19 00:30:55 +00:00
2009-02-04 16:00:39 +00:00
public delegate void OnBackupDelegate ( IRegionDataStore datastore , bool forceBackup ) ;
2007-07-16 15:40:11 +00:00
2008-05-01 18:04:42 +00:00
public event OnBackupDelegate OnBackup ;
2007-09-19 00:30:55 +00:00
2008-11-08 17:46:10 +00:00
public delegate void OnClientConnectCoreDelegate ( IClientCore client ) ;
public event OnClientConnectCoreDelegate OnClientConnect ;
2008-05-01 16:35:00 +00:00
public delegate void OnNewClientDelegate ( IClientAPI client ) ;
2008-11-08 17:46:10 +00:00
/// <summary>
2009-08-14 08:16:41 +00:00
/// Deprecated in favour of OnClientConnect.
2008-11-08 17:46:10 +00:00
/// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces.
/// </summary>
2008-05-01 18:04:42 +00:00
public event OnNewClientDelegate OnNewClient ;
2008-05-01 16:35:00 +00:00
2008-05-01 18:04:42 +00:00
public delegate void OnNewPresenceDelegate ( ScenePresence presence ) ;
2007-07-16 15:40:11 +00:00
2008-05-01 18:04:42 +00:00
public event OnNewPresenceDelegate OnNewPresence ;
2007-09-19 00:30:55 +00:00
2008-09-06 07:52:41 +00:00
public delegate void OnRemovePresenceDelegate ( UUID agentId ) ;
2007-07-16 15:40:11 +00:00
2008-05-01 18:04:42 +00:00
public event OnRemovePresenceDelegate OnRemovePresence ;
2008-05-01 16:35:00 +00:00
2008-05-01 18:04:42 +00:00
public delegate void OnParcelPrimCountUpdateDelegate ( ) ;
2008-05-01 16:35:00 +00:00
2008-05-01 18:04:42 +00:00
public event OnParcelPrimCountUpdateDelegate OnParcelPrimCountUpdate ;
2008-05-01 16:35:00 +00:00
2008-05-01 18:04:42 +00:00
public delegate void OnParcelPrimCountAddDelegate ( SceneObjectGroup obj ) ;
2008-05-01 16:35:00 +00:00
2008-05-01 18:04:42 +00:00
public event OnParcelPrimCountAddDelegate OnParcelPrimCountAdd ;
2008-05-01 16:35:00 +00:00
2008-05-01 18:04:42 +00:00
public delegate void OnPluginConsoleDelegate ( string [ ] args ) ;
2008-05-01 16:35:00 +00:00
2008-05-01 18:04:42 +00:00
public event OnPluginConsoleDelegate OnPluginConsole ;
2008-05-01 16:35:00 +00:00
2008-05-01 18:04:42 +00:00
public delegate void OnShutdownDelegate ( ) ;
2008-05-01 16:35:00 +00:00
2008-05-01 18:04:42 +00:00
public event OnShutdownDelegate OnShutdown ;
2008-05-01 16:35:00 +00:00
2008-12-05 16:48:47 +00:00
public delegate void ObjectGrabDelegate ( uint localID , uint originalID , Vector3 offsetPos , IClientAPI remoteClient , SurfaceTouchEventArgs surfaceArgs ) ;
2009-06-19 12:21:20 +00:00
public delegate void ObjectDeGrabDelegate ( uint localID , uint originalID , IClientAPI remoteClient , SurfaceTouchEventArgs surfaceArgs ) ;
2008-09-06 07:52:41 +00:00
public delegate void ScriptResetDelegate ( uint localID , UUID itemID ) ;
2008-05-01 16:35:00 +00:00
2008-09-06 07:52:41 +00:00
public delegate void OnPermissionErrorDelegate ( UUID user , string reason ) ;
2007-09-19 00:30:55 +00:00
2008-11-22 23:38:25 +00:00
public delegate void OnSetRootAgentSceneDelegate ( UUID agentID , Scene scene ) ;
2008-11-22 22:56:00 +00:00
public event OnSetRootAgentSceneDelegate OnSetRootAgentScene ;
2007-08-13 20:11:35 +00:00
public event ObjectGrabDelegate OnObjectGrab ;
2008-04-27 22:15:38 +00:00
public event ObjectDeGrabDelegate OnObjectDeGrab ;
2008-05-26 16:16:48 +00:00
public event ScriptResetDelegate OnScriptReset ;
2007-12-20 02:36:27 +00:00
2007-08-15 14:10:26 +00:00
public event OnPermissionErrorDelegate OnPermissionError ;
2008-11-09 19:30:40 +00:00
public delegate void NewRezScript ( uint localID , UUID itemID , string script , int startParam , bool postOnRez , string engine , int stateSource ) ;
2008-05-01 18:04:42 +00:00
2007-08-21 21:03:18 +00:00
public event NewRezScript OnRezScript ;
2008-09-06 07:52:41 +00:00
public delegate void RemoveScript ( uint localID , UUID itemID ) ;
2008-05-01 18:04:42 +00:00
2007-08-22 18:36:47 +00:00
public event RemoveScript OnRemoveScript ;
2007-08-15 14:10:26 +00:00
2008-09-06 07:52:41 +00:00
public delegate void StartScript ( uint localID , UUID itemID ) ;
2008-06-28 16:08:12 +00:00
public event StartScript OnStartScript ;
2008-09-06 07:52:41 +00:00
public delegate void StopScript ( uint localID , UUID itemID ) ;
2008-06-28 16:08:12 +00:00
public event StopScript OnStopScript ;
2008-09-06 07:52:41 +00:00
public delegate bool SceneGroupMoved ( UUID groupID , Vector3 delta ) ;
2008-05-01 18:04:42 +00:00
2007-10-12 15:26:19 +00:00
public event SceneGroupMoved OnSceneGroupMove ;
2008-09-06 07:52:41 +00:00
public delegate void SceneGroupGrabed ( UUID groupID , Vector3 offset , UUID userID ) ;
2008-05-01 18:04:42 +00:00
2007-10-12 15:26:19 +00:00
public event SceneGroupGrabed OnSceneGroupGrab ;
2009-04-10 06:39:52 +00:00
public delegate bool SceneGroupSpinStarted ( UUID groupID ) ;
public event SceneGroupSpinStarted OnSceneGroupSpinStart ;
public delegate bool SceneGroupSpun ( UUID groupID , Quaternion rotation ) ;
public event SceneGroupSpun OnSceneGroupSpin ;
2008-05-01 18:04:42 +00:00
public delegate void LandObjectAdded ( ILandObject newParcel ) ;
2007-12-20 02:36:27 +00:00
public event LandObjectAdded OnLandObjectAdded ;
2007-12-27 21:41:48 +00:00
2008-09-06 07:52:41 +00:00
public delegate void LandObjectRemoved ( UUID globalID ) ;
2008-05-01 18:04:42 +00:00
2007-12-20 02:36:27 +00:00
public event LandObjectRemoved OnLandObjectRemoved ;
2008-09-06 07:52:41 +00:00
public delegate void AvatarEnteringNewParcel ( ScenePresence avatar , int localLandID , UUID regionID ) ;
2008-05-01 18:04:42 +00:00
2007-12-20 02:36:27 +00:00
public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel ;
2008-05-09 17:40:39 +00:00
public delegate void SignificantClientMovement ( IClientAPI remote_client ) ;
public event SignificantClientMovement OnSignificantClientMovement ;
2008-11-16 00:47:21 +00:00
public delegate void IncomingInstantMessage ( GridInstantMessage message ) ;
2008-05-01 18:04:42 +00:00
2008-11-16 00:47:21 +00:00
public event IncomingInstantMessage OnIncomingInstantMessage ;
public event IncomingInstantMessage OnUnhandledInstantMessage ;
2008-01-01 06:12:04 +00:00
2009-06-19 20:46:17 +00:00
public delegate void ClientClosed ( UUID clientID , Scene scene ) ;
2008-05-01 18:04:42 +00:00
2008-02-05 05:26:18 +00:00
public event ClientClosed OnClientClosed ;
2008-05-01 18:04:42 +00:00
public delegate void ScriptChangedEvent ( uint localID , uint change ) ;
2008-01-17 02:23:48 +00:00
public event ScriptChangedEvent OnScriptChangedEvent ;
2008-01-01 06:12:04 +00:00
2008-09-06 07:52:41 +00:00
public delegate void ScriptControlEvent ( uint localID , UUID item , UUID avatarID , uint held , uint changed ) ;
2008-05-07 19:41:03 +00:00
public event ScriptControlEvent OnScriptControlEvent ;
2008-09-06 07:52:41 +00:00
public delegate void ScriptAtTargetEvent ( uint localID , uint handle , Vector3 targetpos , Vector3 atpos ) ;
2008-05-01 18:04:42 +00:00
2008-04-25 01:00:55 +00:00
public event ScriptAtTargetEvent OnScriptAtTargetEvent ;
2008-05-01 18:04:42 +00:00
public delegate void ScriptNotAtTargetEvent ( uint localID ) ;
2008-08-18 00:39:10 +00:00
2008-04-25 01:00:55 +00:00
public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent ;
2008-06-05 13:24:59 +00:00
public delegate void ScriptColliding ( uint localID , ColliderArgs colliders ) ;
public event ScriptColliding OnScriptColliderStart ;
public event ScriptColliding OnScriptColliding ;
public event ScriptColliding OnScriptCollidingEnd ;
2008-05-23 16:07:47 +00:00
public delegate void OnMakeChildAgentDelegate ( ScenePresence presence ) ;
public event OnMakeChildAgentDelegate OnMakeChildAgent ;
public delegate void OnMakeRootAgentDelegate ( ScenePresence presence ) ;
public event OnMakeRootAgentDelegate OnMakeRootAgent ;
2008-02-28 05:20:23 +00:00
2008-09-06 07:52:41 +00:00
public delegate void NewInventoryItemUploadComplete ( UUID avatarID , UUID assetID , string name , int userlevel ) ;
2008-05-01 18:04:42 +00:00
2008-04-10 09:36:55 +00:00
public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete ;
2008-05-03 17:11:21 +00:00
public delegate void RequestChangeWaterHeight ( float height ) ;
public event RequestChangeWaterHeight OnRequestChangeWaterHeight ;
2008-05-03 15:39:40 +00:00
public delegate void AvatarKillData ( uint KillerLocalID , ScenePresence avatar ) ;
public event AvatarKillData OnAvatarKilled ;
2008-05-25 20:50:45 +00:00
public delegate void ScriptTimerEvent ( uint localID , double timerinterval ) ;
public event ScriptTimerEvent OnScriptTimerEvent ;
2008-05-23 15:12:15 +00:00
2009-03-13 23:45:02 +00:00
public delegate void EstateToolsSunUpdate ( ulong regionHandle , bool FixedTime , bool EstateSun , float LindenHour ) ;
2008-09-25 05:13:44 +00:00
public delegate void GetScriptRunning ( IClientAPI controllingClient , UUID objectID , UUID itemID ) ;
2009-03-13 23:45:02 +00:00
public event EstateToolsSunUpdate OnEstateToolsSunUpdate ;
2008-05-23 15:12:15 +00:00
public delegate void ObjectBeingRemovedFromScene ( SceneObjectGroup obj ) ;
public event ObjectBeingRemovedFromScene OnObjectBeingRemovedFromScene ;
public delegate void NoticeNoLandDataFromStorage ( ) ;
public event NoticeNoLandDataFromStorage OnNoticeNoLandDataFromStorage ;
public delegate void IncomingLandDataFromStorage ( List < LandData > data ) ;
public event IncomingLandDataFromStorage OnIncomingLandDataFromStorage ;
public delegate void SetAllowForcefulBan ( bool allow ) ;
public event SetAllowForcefulBan OnSetAllowForcefulBan ;
public delegate void RequestParcelPrimCountUpdate ( ) ;
public event RequestParcelPrimCountUpdate OnRequestParcelPrimCountUpdate ;
public delegate void ParcelPrimCountTainted ( ) ;
public event ParcelPrimCountTainted OnParcelPrimCountTainted ;
2008-09-25 05:13:44 +00:00
public event GetScriptRunning OnGetScriptRunning ;
2008-05-23 15:12:15 +00:00
2008-05-01 18:04:42 +00:00
/// <summary>
/// RegisterCapsEvent is called by Scene after the Caps object
/// has been instantiated and before it is return to the
/// client and provides region modules to add their caps.
/// </summary>
2008-09-06 07:52:41 +00:00
public delegate void RegisterCapsEvent ( UUID agentID , Caps caps ) ;
2008-04-03 15:44:20 +00:00
public event RegisterCapsEvent OnRegisterCaps ;
2008-12-12 18:48:29 +00:00
2008-05-01 18:04:42 +00:00
/// <summary>
/// DeregisterCapsEvent is called by Scene when the caps
/// handler for an agent are removed.
/// </summary>
2008-09-06 07:52:41 +00:00
public delegate void DeregisterCapsEvent ( UUID agentID , Caps caps ) ;
2008-05-01 16:35:00 +00:00
public event DeregisterCapsEvent OnDeregisterCaps ;
2008-12-12 18:48:29 +00:00
2008-05-23 10:24:26 +00:00
/// <summary>
/// ChatFromWorldEvent is called via Scene when a chat message
2008-10-03 14:53:11 +00:00
/// from world comes in.
2008-05-23 10:24:26 +00:00
/// </summary>
2008-07-25 10:05:50 +00:00
public delegate void ChatFromWorldEvent ( Object sender , OSChatMessage chat ) ;
2008-05-23 10:24:26 +00:00
public event ChatFromWorldEvent OnChatFromWorld ;
2008-12-12 18:48:29 +00:00
2008-05-26 11:56:04 +00:00
/// <summary>
2008-10-03 14:53:11 +00:00
/// ChatFromClientEvent is triggered via ChatModule (or
/// substitutes thereof) when a chat message
/// from the client comes in.
/// </summary>
public delegate void ChatFromClientEvent ( Object sender , OSChatMessage chat ) ;
public event ChatFromClientEvent OnChatFromClient ;
2008-12-12 18:48:29 +00:00
2008-10-03 14:53:11 +00:00
/// <summary>
2008-05-26 11:56:04 +00:00
/// ChatBroadcastEvent is called via Scene when a broadcast chat message
2008-10-03 14:53:11 +00:00
/// from world comes in
2008-05-26 11:56:04 +00:00
/// </summary>
2008-07-25 10:05:50 +00:00
public delegate void ChatBroadcastEvent ( Object sender , OSChatMessage chat ) ;
2008-05-26 11:56:04 +00:00
public event ChatBroadcastEvent OnChatBroadcast ;
2008-02-04 10:39:30 +00:00
2008-06-02 10:01:02 +00:00
public delegate float SunLindenHour ( ) ;
2009-03-13 23:45:02 +00:00
public event SunLindenHour OnGetCurrentTimeAsLindenSunHour ;
2008-06-02 10:01:02 +00:00
2009-01-28 09:22:12 +00:00
/// <summary>
/// Called when oar file has finished loading, although
/// the scripts may not have started yet
/// Message is non empty string if there were problems loading the oar file
/// </summary>
2009-04-15 19:12:37 +00:00
public delegate void OarFileLoaded ( Guid guid , string message ) ;
2009-01-28 09:22:12 +00:00
public event OarFileLoaded OnOarFileLoaded ;
2009-02-02 20:59:12 +00:00
/// <summary>
/// Called when an oar file has finished saving
/// Message is non empty string if there were problems saving the oar file
2009-04-15 19:12:37 +00:00
/// If a guid was supplied on the original call to identify, the request, this is returned. Otherwise
/// Guid.Empty is returned.
2009-02-02 20:59:12 +00:00
/// </summary>
2009-04-15 19:12:37 +00:00
public delegate void OarFileSaved ( Guid guid , string message ) ;
2009-02-02 20:59:12 +00:00
public event OarFileSaved OnOarFileSaved ;
2009-01-28 09:22:12 +00:00
/// <summary>
/// Called when the script compile queue becomes empty
/// Returns the number of scripts which failed to start
/// </summary>
public delegate void EmptyScriptCompileQueue ( int numScriptsFailed , string message ) ;
public event EmptyScriptCompileQueue OnEmptyScriptCompileQueue ;
2009-08-04 01:43:08 +00:00
/// <summary>
/// Called whenever an object is attached, or detached
/// from an in-world presence.
/// </summary>
public delegate void Attach ( uint localID , UUID itemID , UUID avatarID ) ;
public event Attach OnAttach ;
2009-09-27 17:14:10 +00:00
public delegate void RegionUp ( GridRegion region ) ;
public event RegionUp OnRegionUp ;
2008-05-16 01:22:11 +00:00
public class MoneyTransferArgs : EventArgs
2008-05-01 18:04:42 +00:00
{
2008-09-06 07:52:41 +00:00
public UUID sender ;
public UUID receiver ;
2008-05-01 18:04:42 +00:00
// Always false. The SL protocol sucks.
public bool authenticated = false ;
public int amount ;
public int transactiontype ;
public string description ;
2008-09-06 07:52:41 +00:00
public MoneyTransferArgs ( UUID asender , UUID areceiver , int aamount , int atransactiontype , string adescription )
2008-05-14 05:33:32 +00:00
{
2008-05-01 18:04:42 +00:00
sender = asender ;
receiver = areceiver ;
amount = aamount ;
transactiontype = atransactiontype ;
description = adescription ;
}
}
public class LandBuyArgs : EventArgs
{
2008-09-06 07:52:41 +00:00
public UUID agentId = UUID . Zero ;
2008-05-16 01:22:11 +00:00
2008-09-06 07:52:41 +00:00
public UUID groupId = UUID . Zero ;
2008-05-01 18:04:42 +00:00
2008-09-06 07:52:41 +00:00
public UUID parcelOwnerID = UUID . Zero ;
2008-05-01 18:04:42 +00:00
public bool final = false ;
public bool groupOwned = false ;
public bool removeContribution = false ;
public int parcelLocalID = 0 ;
public int parcelArea = 0 ;
public int parcelPrice = 0 ;
public bool authenticated = false ;
public bool landValidated = false ;
public bool economyValidated = false ;
public int transactionID = 0 ;
public int amountDebited = 0 ;
2008-09-06 07:52:41 +00:00
public LandBuyArgs ( UUID pagentId , UUID pgroupId , bool pfinal , bool pgroupOwned ,
2008-05-16 01:22:11 +00:00
bool premoveContribution , int pparcelLocalID , int pparcelArea , int pparcelPrice ,
2008-05-01 18:04:42 +00:00
bool pauthenticated )
{
agentId = pagentId ;
groupId = pgroupId ;
final = pfinal ;
groupOwned = pgroupOwned ;
removeContribution = premoveContribution ;
parcelLocalID = pparcelLocalID ;
parcelArea = pparcelArea ;
parcelPrice = pparcelPrice ;
authenticated = pauthenticated ;
}
}
public delegate void MoneyTransferEvent ( Object sender , MoneyTransferArgs e ) ;
public delegate void LandBuy ( Object sender , LandBuyArgs e ) ;
2008-04-14 17:13:38 +00:00
public event MoneyTransferEvent OnMoneyTransfer ;
public event LandBuy OnLandBuy ;
2008-04-17 19:42:54 +00:00
public event LandBuy OnValidateLandBuy ;
2008-02-22 19:08:24 +00:00
/* Designated Event Deletage Instances */
2008-05-01 18:04:42 +00:00
private ScriptChangedEvent handlerScriptChangedEvent = null ; //OnScriptChangedEvent;
private ScriptAtTargetEvent handlerScriptAtTargetEvent = null ;
private ScriptNotAtTargetEvent handlerScriptNotAtTargetEvent = null ;
private ClientMovement handlerClientMovement = null ; //OnClientMovement;
private OnPermissionErrorDelegate handlerPermissionError = null ; //OnPermissionError;
private OnPluginConsoleDelegate handlerPluginConsole = null ; //OnPluginConsole;
private OnFrameDelegate handlerFrame = null ; //OnFrame;
private OnNewClientDelegate handlerNewClient = null ; //OnNewClient;
2008-11-08 17:46:10 +00:00
private OnClientConnectCoreDelegate handlerClientConnect = null ; //OnClientConnect
2008-05-01 18:04:42 +00:00
private OnNewPresenceDelegate handlerNewPresence = null ; //OnNewPresence;
private OnRemovePresenceDelegate handlerRemovePresence = null ; //OnRemovePresence;
private OnBackupDelegate handlerBackup = null ; //OnBackup;
private OnParcelPrimCountUpdateDelegate handlerParcelPrimCountUpdate = null ; //OnParcelPrimCountUpdate;
private MoneyTransferEvent handlerMoneyTransfer = null ; //OnMoneyTransfer;
private OnParcelPrimCountAddDelegate handlerParcelPrimCountAdd = null ; //OnParcelPrimCountAdd;
private OnShutdownDelegate handlerShutdown = null ; //OnShutdown;
private ObjectGrabDelegate handlerObjectGrab = null ; //OnObjectGrab;
private ObjectDeGrabDelegate handlerObjectDeGrab = null ; //OnObjectDeGrab;
2008-05-26 16:16:48 +00:00
private ScriptResetDelegate handlerScriptReset = null ; // OnScriptReset
2008-05-01 18:04:42 +00:00
private NewRezScript handlerRezScript = null ; //OnRezScript;
private RemoveScript handlerRemoveScript = null ; //OnRemoveScript;
2008-06-28 16:08:12 +00:00
private StartScript handlerStartScript = null ; //OnStartScript;
private StopScript handlerStopScript = null ; //OnStopScript;
2008-05-01 18:04:42 +00:00
private SceneGroupMoved handlerSceneGroupMove = null ; //OnSceneGroupMove;
private SceneGroupGrabed handlerSceneGroupGrab = null ; //OnSceneGroupGrab;
2009-04-10 06:39:52 +00:00
private SceneGroupSpinStarted handlerSceneGroupSpinStarted = null ; //OnSceneGroupSpinStart;
private SceneGroupSpun handlerSceneGroupSpin = null ; //OnSceneGroupSpin;
2008-05-01 18:04:42 +00:00
private LandObjectAdded handlerLandObjectAdded = null ; //OnLandObjectAdded;
private LandObjectRemoved handlerLandObjectRemoved = null ; //OnLandObjectRemoved;
private AvatarEnteringNewParcel handlerAvatarEnteringNewParcel = null ; //OnAvatarEnteringNewParcel;
2008-11-16 00:47:21 +00:00
private IncomingInstantMessage handlerIncomingInstantMessage = null ; //OnIncomingInstantMessage;
private IncomingInstantMessage handlerUnhandledInstantMessage = null ; //OnUnhandledInstantMessage;
2008-05-01 18:04:42 +00:00
private ClientClosed handlerClientClosed = null ; //OnClientClosed;
2008-05-23 16:07:47 +00:00
private OnMakeChildAgentDelegate handlerMakeChildAgent = null ; //OnMakeChildAgent;
private OnMakeRootAgentDelegate handlerMakeRootAgent = null ; //OnMakeRootAgent;
2008-05-01 18:04:42 +00:00
private OnTerrainTickDelegate handlerTerrainTick = null ; // OnTerainTick;
private RegisterCapsEvent handlerRegisterCaps = null ; // OnRegisterCaps;
private DeregisterCapsEvent handlerDeregisterCaps = null ; // OnDeregisterCaps;
2008-05-23 10:24:26 +00:00
private ChatFromWorldEvent handlerChatFromWorld = null ; // OnChatFromWorld;
2008-10-03 14:53:11 +00:00
private ChatFromClientEvent handlerChatFromClient = null ; // OnChatFromClient;
2008-05-26 11:56:04 +00:00
private ChatBroadcastEvent handlerChatBroadcast = null ; // OnChatBroadcast;
2008-05-01 18:04:42 +00:00
private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null ;
2008-05-03 17:11:21 +00:00
private RequestChangeWaterHeight handlerRequestChangeWaterHeight = null ; //OnRequestChangeWaterHeight
2008-05-07 19:41:03 +00:00
private ScriptControlEvent handlerScriptControlEvent = null ;
2008-05-09 17:40:39 +00:00
private SignificantClientMovement handlerSignificantClientMovement = null ;
2008-05-03 17:11:21 +00:00
2008-05-01 18:04:42 +00:00
private LandBuy handlerLandBuy = null ;
private LandBuy handlerValidateLandBuy = null ;
2008-05-03 15:39:40 +00:00
private AvatarKillData handlerAvatarKill = null ;
2008-05-01 18:04:42 +00:00
2008-05-23 15:12:15 +00:00
private NoticeNoLandDataFromStorage handlerNoticeNoLandDataFromStorage = null ;
private IncomingLandDataFromStorage handlerIncomingLandDataFromStorage = null ;
private SetAllowForcefulBan handlerSetAllowForcefulBan = null ;
private RequestParcelPrimCountUpdate handlerRequestParcelPrimCountUpdate = null ;
private ParcelPrimCountTainted handlerParcelPrimCountTainted = null ;
private ObjectBeingRemovedFromScene handlerObjectBeingRemovedFromScene = null ;
2009-08-13 06:43:24 +00:00
// TODO: unused: private ScriptTimerEvent handlerScriptTimerEvent = null;
2009-03-13 23:45:02 +00:00
private EstateToolsSunUpdate handlerEstateToolsSunUpdate = null ;
2008-05-23 15:12:15 +00:00
2008-06-05 13:24:59 +00:00
private ScriptColliding handlerCollidingStart = null ;
private ScriptColliding handlerColliding = null ;
private ScriptColliding handlerCollidingEnd = null ;
2008-09-25 05:13:44 +00:00
private GetScriptRunning handlerGetScriptRunning = null ;
2008-06-05 13:24:59 +00:00
2009-03-13 23:45:02 +00:00
private SunLindenHour handlerCurrentTimeAsLindenSunHour = null ;
2008-11-22 22:56:00 +00:00
private OnSetRootAgentSceneDelegate handlerSetRootAgentScene = null ;
2009-01-28 09:22:12 +00:00
private OarFileLoaded handlerOarFileLoaded = null ;
2009-02-02 20:59:12 +00:00
private OarFileSaved handlerOarFileSaved = null ;
2009-01-28 09:22:12 +00:00
private EmptyScriptCompileQueue handlerEmptyScriptCompileQueue = null ;
2008-06-02 10:01:02 +00:00
2009-08-04 01:43:08 +00:00
private Attach handlerOnAttach = null ;
2009-09-27 17:14:10 +00:00
private RegionUp handlerOnRegionUp = null ;
2009-08-04 01:43:08 +00:00
public void TriggerOnAttach ( uint localID , UUID itemID , UUID avatarID )
{
handlerOnAttach = OnAttach ;
if ( handlerOnAttach ! = null )
handlerOnAttach ( localID , itemID , avatarID ) ;
}
2008-09-25 05:13:44 +00:00
public void TriggerGetScriptRunning ( IClientAPI controllingClient , UUID objectID , UUID itemID )
{
handlerGetScriptRunning = OnGetScriptRunning ;
if ( handlerGetScriptRunning ! = null )
handlerGetScriptRunning ( controllingClient , objectID , itemID ) ;
}
2008-01-17 02:23:48 +00:00
public void TriggerOnScriptChangedEvent ( uint localID , uint change )
{
2008-03-02 22:28:48 +00:00
handlerScriptChangedEvent = OnScriptChangedEvent ;
if ( handlerScriptChangedEvent ! = null )
handlerScriptChangedEvent ( localID , change ) ;
2008-01-17 02:23:48 +00:00
}
2008-01-01 06:12:04 +00:00
2007-12-20 03:24:34 +00:00
public void TriggerOnClientMovement ( ScenePresence avatar )
{
2008-03-02 22:28:48 +00:00
handlerClientMovement = OnClientMovement ;
if ( handlerClientMovement ! = null )
handlerClientMovement ( avatar ) ;
2007-12-20 03:24:34 +00:00
}
2008-09-06 07:52:41 +00:00
public void TriggerPermissionError ( UUID user , string reason )
2007-08-15 14:10:26 +00:00
{
2008-03-02 22:28:48 +00:00
handlerPermissionError = OnPermissionError ;
if ( handlerPermissionError ! = null )
handlerPermissionError ( user , reason ) ;
2007-08-15 14:10:26 +00:00
}
2007-08-13 20:11:35 +00:00
2007-09-24 15:56:34 +00:00
public void TriggerOnPluginConsole ( string [ ] args )
2007-07-16 15:40:11 +00:00
{
2008-03-02 22:28:48 +00:00
handlerPluginConsole = OnPluginConsole ;
if ( handlerPluginConsole ! = null )
handlerPluginConsole ( args ) ;
2007-07-16 15:40:11 +00:00
}
public void TriggerOnFrame ( )
{
2008-03-02 22:28:48 +00:00
handlerFrame = OnFrame ;
if ( handlerFrame ! = null )
2007-07-16 15:40:11 +00:00
{
2008-03-02 22:28:48 +00:00
handlerFrame ( ) ;
2007-07-16 15:40:11 +00:00
}
}
2007-08-28 14:21:17 +00:00
public void TriggerOnNewClient ( IClientAPI client )
{
2008-03-02 22:28:48 +00:00
handlerNewClient = OnNewClient ;
if ( handlerNewClient ! = null )
handlerNewClient ( client ) ;
2008-11-08 17:46:10 +00:00
if ( client is IClientCore )
{
handlerClientConnect = OnClientConnect ;
2009-03-12 20:38:28 +00:00
if ( handlerClientConnect ! = null )
handlerClientConnect ( ( IClientCore ) client ) ;
2008-11-08 17:46:10 +00:00
}
2007-08-28 14:21:17 +00:00
}
2007-07-16 15:40:11 +00:00
public void TriggerOnNewPresence ( ScenePresence presence )
{
2008-03-02 22:28:48 +00:00
handlerNewPresence = OnNewPresence ;
if ( handlerNewPresence ! = null )
handlerNewPresence ( presence ) ;
2007-07-16 15:40:11 +00:00
}
2008-09-06 07:52:41 +00:00
public void TriggerOnRemovePresence ( UUID agentId )
2007-07-16 15:40:11 +00:00
{
2008-03-02 22:28:48 +00:00
handlerRemovePresence = OnRemovePresence ;
if ( handlerRemovePresence ! = null )
2007-07-16 15:40:11 +00:00
{
2008-03-02 22:28:48 +00:00
handlerRemovePresence ( agentId ) ;
2007-07-16 15:40:11 +00:00
}
}
2007-09-19 00:30:55 +00:00
public void TriggerOnBackup ( IRegionDataStore dstore )
2007-07-16 15:40:11 +00:00
{
2008-03-02 22:28:48 +00:00
handlerBackup = OnBackup ;
2008-05-21 22:06:38 +00:00
if ( handlerBackup ! = null )
2007-07-16 15:40:11 +00:00
{
2009-02-04 16:00:39 +00:00
handlerBackup ( dstore , false ) ;
2007-07-16 15:40:11 +00:00
}
}
public void TriggerParcelPrimCountUpdate ( )
{
2008-03-02 20:29:59 +00:00
handlerParcelPrimCountUpdate = OnParcelPrimCountUpdate ;
if ( handlerParcelPrimCountUpdate ! = null )
2007-07-16 15:40:11 +00:00
{
2008-03-02 20:29:59 +00:00
handlerParcelPrimCountUpdate ( ) ;
2008-05-16 01:22:11 +00:00
}
2008-02-04 10:39:30 +00:00
}
public void TriggerMoneyTransfer ( Object sender , MoneyTransferArgs e )
{
2008-03-02 20:29:59 +00:00
handlerMoneyTransfer = OnMoneyTransfer ;
if ( handlerMoneyTransfer ! = null )
2008-02-04 10:39:30 +00:00
{
2008-03-02 20:29:59 +00:00
handlerMoneyTransfer ( sender , e ) ;
2007-07-16 15:40:11 +00:00
}
}
2007-09-19 00:30:55 +00:00
2008-03-06 15:49:53 +00:00
public void TriggerTerrainTick ( )
{
handlerTerrainTick = OnTerrainTick ;
if ( handlerTerrainTick ! = null )
{
handlerTerrainTick ( ) ;
}
}
2008-02-04 10:39:30 +00:00
2007-08-09 17:54:22 +00:00
public void TriggerParcelPrimCountAdd ( SceneObjectGroup obj )
2007-07-16 15:40:11 +00:00
{
2008-03-02 20:29:59 +00:00
handlerParcelPrimCountAdd = OnParcelPrimCountAdd ;
if ( handlerParcelPrimCountAdd ! = null )
2007-07-16 15:40:11 +00:00
{
2008-03-02 20:29:59 +00:00
handlerParcelPrimCountAdd ( obj ) ;
2007-07-16 15:40:11 +00:00
}
}
2007-07-19 00:52:10 +00:00
2008-05-24 21:13:44 +00:00
public void TriggerObjectBeingRemovedFromScene ( SceneObjectGroup obj )
{
handlerObjectBeingRemovedFromScene = OnObjectBeingRemovedFromScene ;
if ( handlerObjectBeingRemovedFromScene ! = null )
{
handlerObjectBeingRemovedFromScene ( obj ) ;
}
}
2007-07-19 00:52:10 +00:00
public void TriggerShutdown ( )
{
2008-03-02 20:29:59 +00:00
handlerShutdown = OnShutdown ;
if ( handlerShutdown ! = null )
handlerShutdown ( ) ;
2007-07-19 00:52:10 +00:00
}
2007-08-13 20:11:35 +00:00
2008-12-05 16:48:47 +00:00
public void TriggerObjectGrab ( uint localID , uint originalID , Vector3 offsetPos , IClientAPI remoteClient , SurfaceTouchEventArgs surfaceArgs )
2007-08-13 20:11:35 +00:00
{
2008-03-02 20:29:59 +00:00
handlerObjectGrab = OnObjectGrab ;
if ( handlerObjectGrab ! = null )
2007-09-20 05:22:18 +00:00
{
2008-12-05 16:48:47 +00:00
handlerObjectGrab ( localID , originalID , offsetPos , remoteClient , surfaceArgs ) ;
2007-09-20 05:22:18 +00:00
}
2007-08-13 20:11:35 +00:00
}
2007-08-21 21:03:18 +00:00
2009-06-19 12:21:20 +00:00
public void TriggerObjectDeGrab ( uint localID , uint originalID , IClientAPI remoteClient , SurfaceTouchEventArgs surfaceArgs )
2008-04-27 22:15:38 +00:00
{
handlerObjectDeGrab = OnObjectDeGrab ;
if ( handlerObjectDeGrab ! = null )
{
2009-06-19 12:21:20 +00:00
handlerObjectDeGrab ( localID , originalID , remoteClient , surfaceArgs ) ;
2008-04-27 22:15:38 +00:00
}
}
2008-09-06 07:52:41 +00:00
public void TriggerScriptReset ( uint localID , UUID itemID )
2008-05-26 16:16:48 +00:00
{
handlerScriptReset = OnScriptReset ;
if ( handlerScriptReset ! = null )
{
handlerScriptReset ( localID , itemID ) ;
}
}
2008-11-09 19:30:40 +00:00
public void TriggerRezScript ( uint localID , UUID itemID , string script , int startParam , bool postOnRez , string engine , int stateSource )
2007-08-21 21:03:18 +00:00
{
2008-03-02 20:29:59 +00:00
handlerRezScript = OnRezScript ;
if ( handlerRezScript ! = null )
2007-08-21 21:03:18 +00:00
{
2008-09-21 21:47:00 +00:00
handlerRezScript ( localID , itemID , script , startParam ,
2008-11-09 19:30:40 +00:00
postOnRez , engine , stateSource ) ;
2008-06-28 16:08:12 +00:00
}
}
2008-09-06 07:52:41 +00:00
public void TriggerStartScript ( uint localID , UUID itemID )
2008-06-28 16:08:12 +00:00
{
handlerStartScript = OnStartScript ;
if ( handlerStartScript ! = null )
{
handlerStartScript ( localID , itemID ) ;
2007-08-21 21:03:18 +00:00
}
}
2007-08-22 18:36:47 +00:00
2008-09-06 07:52:41 +00:00
public void TriggerStopScript ( uint localID , UUID itemID )
2008-06-04 14:31:36 +00:00
{
2008-06-28 16:08:12 +00:00
handlerStopScript = OnStopScript ;
if ( handlerStopScript ! = null )
2008-06-04 14:31:36 +00:00
{
2008-06-28 16:08:12 +00:00
handlerStopScript ( localID , itemID ) ;
2008-06-04 14:31:36 +00:00
}
}
2008-09-06 07:52:41 +00:00
public void TriggerRemoveScript ( uint localID , UUID itemID )
2007-08-22 18:36:47 +00:00
{
2008-03-02 20:29:59 +00:00
handlerRemoveScript = OnRemoveScript ;
if ( handlerRemoveScript ! = null )
2007-08-22 18:36:47 +00:00
{
2008-03-02 20:29:59 +00:00
handlerRemoveScript ( localID , itemID ) ;
2007-08-22 18:36:47 +00:00
}
}
2007-10-12 15:26:19 +00:00
2008-09-06 07:52:41 +00:00
public bool TriggerGroupMove ( UUID groupID , Vector3 delta )
2007-10-12 15:26:19 +00:00
{
2008-03-02 20:29:59 +00:00
handlerSceneGroupMove = OnSceneGroupMove ;
2008-02-22 19:08:24 +00:00
2008-03-02 20:29:59 +00:00
if ( handlerSceneGroupMove ! = null )
2007-10-12 15:26:19 +00:00
{
2008-03-02 20:29:59 +00:00
return handlerSceneGroupMove ( groupID , delta ) ;
2007-10-12 15:26:19 +00:00
}
2007-11-30 12:10:12 +00:00
return true ;
2007-10-12 15:26:19 +00:00
}
2009-04-10 06:39:52 +00:00
public bool TriggerGroupSpinStart ( UUID groupID )
{
handlerSceneGroupSpinStarted = OnSceneGroupSpinStart ;
if ( handlerSceneGroupSpinStarted ! = null )
{
return handlerSceneGroupSpinStarted ( groupID ) ;
}
return true ;
}
public bool TriggerGroupSpin ( UUID groupID , Quaternion rotation )
{
handlerSceneGroupSpin = OnSceneGroupSpin ;
if ( handlerSceneGroupSpin ! = null )
{
return handlerSceneGroupSpin ( groupID , rotation ) ;
}
return true ;
}
2008-09-06 07:52:41 +00:00
public void TriggerGroupGrab ( UUID groupID , Vector3 offset , UUID userID )
2007-10-12 15:26:19 +00:00
{
2008-03-02 20:29:59 +00:00
handlerSceneGroupGrab = OnSceneGroupGrab ;
if ( handlerSceneGroupGrab ! = null )
2007-10-12 15:26:19 +00:00
{
2008-03-02 20:29:59 +00:00
handlerSceneGroupGrab ( groupID , offset , userID ) ;
2007-10-12 15:26:19 +00:00
}
}
2007-12-20 02:36:27 +00:00
2008-03-22 23:10:22 +00:00
public void TriggerLandObjectAdded ( ILandObject newParcel )
2007-12-20 02:36:27 +00:00
{
2008-03-02 03:50:33 +00:00
handlerLandObjectAdded = OnLandObjectAdded ;
2008-02-22 19:08:24 +00:00
2008-03-02 03:50:33 +00:00
if ( handlerLandObjectAdded ! = null )
2007-12-20 02:36:27 +00:00
{
2008-03-22 23:10:22 +00:00
handlerLandObjectAdded ( newParcel ) ;
2007-12-20 02:36:27 +00:00
}
}
2007-12-27 21:41:48 +00:00
2008-09-06 07:52:41 +00:00
public void TriggerLandObjectRemoved ( UUID globalID )
2007-12-20 02:36:27 +00:00
{
2008-03-02 03:50:33 +00:00
handlerLandObjectRemoved = OnLandObjectRemoved ;
if ( handlerLandObjectRemoved ! = null )
2007-12-20 02:36:27 +00:00
{
2008-03-02 03:50:33 +00:00
handlerLandObjectRemoved ( globalID ) ;
2007-12-20 02:36:27 +00:00
}
}
2007-12-27 21:41:48 +00:00
2008-03-22 23:10:22 +00:00
public void TriggerLandObjectUpdated ( uint localParcelID , ILandObject newParcel )
2007-12-20 02:36:27 +00:00
{
//triggerLandObjectRemoved(localParcelID);
2008-02-22 19:08:24 +00:00
2008-03-22 23:10:22 +00:00
TriggerLandObjectAdded ( newParcel ) ;
2007-12-20 02:36:27 +00:00
}
2008-09-06 07:52:41 +00:00
public void TriggerAvatarEnteringNewParcel ( ScenePresence avatar , int localLandID , UUID regionID )
2007-12-20 02:36:27 +00:00
{
2008-03-02 03:50:33 +00:00
handlerAvatarEnteringNewParcel = OnAvatarEnteringNewParcel ;
2008-02-22 19:08:24 +00:00
2008-03-02 03:50:33 +00:00
if ( handlerAvatarEnteringNewParcel ! = null )
2007-12-20 02:36:27 +00:00
{
2008-03-02 03:50:33 +00:00
handlerAvatarEnteringNewParcel ( avatar , localLandID , regionID ) ;
2007-12-20 02:36:27 +00:00
}
}
2008-01-01 06:12:04 +00:00
2008-11-16 00:47:21 +00:00
public void TriggerIncomingInstantMessage ( GridInstantMessage message )
{
handlerIncomingInstantMessage = OnIncomingInstantMessage ;
if ( handlerIncomingInstantMessage ! = null )
{
handlerIncomingInstantMessage ( message ) ;
}
}
public void TriggerUnhandledInstantMessage ( GridInstantMessage message )
2008-01-01 06:12:04 +00:00
{
2008-11-16 00:47:21 +00:00
handlerUnhandledInstantMessage = OnUnhandledInstantMessage ;
if ( handlerUnhandledInstantMessage ! = null )
2008-01-01 06:12:04 +00:00
{
2008-11-16 00:47:21 +00:00
handlerUnhandledInstantMessage ( message ) ;
2008-01-01 06:12:04 +00:00
}
}
2008-02-05 05:26:18 +00:00
2009-06-19 20:46:17 +00:00
public void TriggerClientClosed ( UUID ClientID , Scene scene )
2008-02-05 05:26:18 +00:00
{
2008-03-02 03:50:33 +00:00
handlerClientClosed = OnClientClosed ;
if ( handlerClientClosed ! = null )
2008-02-05 05:26:18 +00:00
{
2009-06-19 20:46:17 +00:00
handlerClientClosed ( ClientID , scene ) ;
2008-02-05 05:26:18 +00:00
}
}
2008-02-28 05:20:23 +00:00
public void TriggerOnMakeChildAgent ( ScenePresence presence )
{
2008-03-02 03:50:33 +00:00
handlerMakeChildAgent = OnMakeChildAgent ;
if ( handlerMakeChildAgent ! = null )
2008-02-28 05:20:23 +00:00
{
2008-03-02 03:50:33 +00:00
handlerMakeChildAgent ( presence ) ;
2008-02-28 05:20:23 +00:00
}
}
2008-04-03 15:44:20 +00:00
2008-05-23 16:07:47 +00:00
public void TriggerOnMakeRootAgent ( ScenePresence presence )
{
handlerMakeRootAgent = OnMakeRootAgent ;
if ( handlerMakeRootAgent ! = null )
{
handlerMakeRootAgent ( presence ) ;
}
}
2008-09-06 07:52:41 +00:00
public void TriggerOnRegisterCaps ( UUID agentID , Caps caps )
2008-04-03 15:44:20 +00:00
{
handlerRegisterCaps = OnRegisterCaps ;
if ( handlerRegisterCaps ! = null )
{
handlerRegisterCaps ( agentID , caps ) ;
}
}
2008-09-06 07:52:41 +00:00
public void TriggerOnDeregisterCaps ( UUID agentID , Caps caps )
2008-04-03 15:44:20 +00:00
{
handlerDeregisterCaps = OnDeregisterCaps ;
if ( handlerDeregisterCaps ! = null )
{
handlerDeregisterCaps ( agentID , caps ) ;
}
}
2008-04-10 09:36:55 +00:00
2008-09-06 07:52:41 +00:00
public void TriggerOnNewInventoryItemUploadComplete ( UUID agentID , UUID AssetID , String AssetName , int userlevel )
2008-04-10 09:36:55 +00:00
{
handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete ;
if ( handlerNewInventoryItemUpdateComplete ! = null )
{
handlerNewInventoryItemUpdateComplete ( agentID , AssetID , AssetName , userlevel ) ;
}
}
2008-08-18 00:39:10 +00:00
public void TriggerLandBuy ( Object sender , LandBuyArgs e )
2008-04-14 17:13:38 +00:00
{
handlerLandBuy = OnLandBuy ;
if ( handlerLandBuy ! = null )
{
handlerLandBuy ( sender , e ) ;
}
}
2008-08-18 00:39:10 +00:00
2008-04-17 19:42:54 +00:00
public void TriggerValidateLandBuy ( Object sender , LandBuyArgs e )
2008-04-14 17:13:38 +00:00
{
2008-04-17 19:42:54 +00:00
handlerValidateLandBuy = OnValidateLandBuy ;
if ( handlerValidateLandBuy ! = null )
2008-04-14 17:13:38 +00:00
{
2008-04-17 19:42:54 +00:00
handlerValidateLandBuy ( sender , e ) ;
2008-04-14 17:13:38 +00:00
}
}
2008-05-16 01:22:11 +00:00
2008-09-06 07:52:41 +00:00
public void TriggerAtTargetEvent ( uint localID , uint handle , Vector3 targetpos , Vector3 currentpos )
2008-04-25 01:00:55 +00:00
{
handlerScriptAtTargetEvent = OnScriptAtTargetEvent ;
if ( handlerScriptAtTargetEvent ! = null )
{
handlerScriptAtTargetEvent ( localID , handle , targetpos , currentpos ) ;
}
}
public void TriggerNotAtTargetEvent ( uint localID )
{
handlerScriptNotAtTargetEvent = OnScriptNotAtTargetEvent ;
if ( handlerScriptNotAtTargetEvent ! = null )
{
handlerScriptNotAtTargetEvent ( localID ) ;
}
}
2008-05-03 17:11:21 +00:00
public void TriggerRequestChangeWaterHeight ( float height )
{
handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight ;
if ( handlerRequestChangeWaterHeight ! = null )
{
handlerRequestChangeWaterHeight ( height ) ;
}
}
2008-08-18 00:39:10 +00:00
2008-05-03 15:39:40 +00:00
public void TriggerAvatarKill ( uint KillerObjectLocalID , ScenePresence DeadAvatar )
{
handlerAvatarKill = OnAvatarKilled ;
if ( handlerAvatarKill ! = null )
{
handlerAvatarKill ( KillerObjectLocalID , DeadAvatar ) ;
}
}
2008-05-07 18:23:46 +00:00
2008-05-09 17:40:39 +00:00
public void TriggerSignificantClientMovement ( IClientAPI client )
{
handlerSignificantClientMovement = OnSignificantClientMovement ;
if ( handlerSignificantClientMovement ! = null )
{
handlerSignificantClientMovement ( client ) ;
}
}
2008-05-23 10:24:26 +00:00
2008-07-25 10:05:50 +00:00
public void TriggerOnChatFromWorld ( Object sender , OSChatMessage chat )
2008-05-23 10:24:26 +00:00
{
handlerChatFromWorld = OnChatFromWorld ;
if ( handlerChatFromWorld ! = null )
{
handlerChatFromWorld ( sender , chat ) ;
}
}
2008-10-03 14:53:11 +00:00
public void TriggerOnChatFromClient ( Object sender , OSChatMessage chat )
{
handlerChatFromClient = OnChatFromClient ;
if ( handlerChatFromClient ! = null )
{
handlerChatFromClient ( sender , chat ) ;
}
}
2008-07-25 10:05:50 +00:00
public void TriggerOnChatBroadcast ( Object sender , OSChatMessage chat )
2008-05-26 11:56:04 +00:00
{
handlerChatBroadcast = OnChatBroadcast ;
if ( handlerChatBroadcast ! = null )
{
handlerChatBroadcast ( sender , chat ) ;
}
}
2008-09-06 07:52:41 +00:00
internal void TriggerControlEvent ( uint p , UUID scriptUUID , UUID avatarID , uint held , uint _changed )
2008-05-07 18:23:46 +00:00
{
2008-05-07 19:41:03 +00:00
handlerScriptControlEvent = OnScriptControlEvent ;
if ( handlerScriptControlEvent ! = null )
{
handlerScriptControlEvent ( p , scriptUUID , avatarID , held , _changed ) ;
}
2008-05-07 18:23:46 +00:00
}
2008-05-23 15:12:15 +00:00
public void TriggerNoticeNoLandDataFromStorage ( )
{
handlerNoticeNoLandDataFromStorage = OnNoticeNoLandDataFromStorage ;
if ( handlerNoticeNoLandDataFromStorage ! = null )
{
handlerNoticeNoLandDataFromStorage ( ) ;
}
}
public void TriggerIncomingLandDataFromStorage ( List < LandData > landData )
{
handlerIncomingLandDataFromStorage = OnIncomingLandDataFromStorage ;
if ( handlerIncomingLandDataFromStorage ! = null )
{
handlerIncomingLandDataFromStorage ( landData ) ;
}
}
public void TriggerSetAllowForcefulBan ( bool allow )
{
handlerSetAllowForcefulBan = OnSetAllowForcefulBan ;
if ( handlerSetAllowForcefulBan ! = null )
{
handlerSetAllowForcefulBan ( allow ) ;
}
}
public void TriggerRequestParcelPrimCountUpdate ( )
{
handlerRequestParcelPrimCountUpdate = OnRequestParcelPrimCountUpdate ;
if ( handlerRequestParcelPrimCountUpdate ! = null )
{
handlerRequestParcelPrimCountUpdate ( ) ;
}
}
2008-08-18 00:39:10 +00:00
2008-05-23 15:12:15 +00:00
public void TriggerParcelPrimCountTainted ( )
{
handlerParcelPrimCountTainted = OnParcelPrimCountTainted ;
if ( handlerParcelPrimCountTainted ! = null )
{
handlerParcelPrimCountTainted ( ) ;
}
}
2008-08-18 00:39:10 +00:00
2008-05-25 20:50:45 +00:00
// this lets us keep track of nasty script events like timer, etc.
public void TriggerTimerEvent ( uint objLocalID , double Interval )
{
2009-08-07 19:43:23 +00:00
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" ) ;
//handlerScriptTimerEvent = OnScriptTimerEvent;
//if (handlerScriptTimerEvent != null)
//{
// handlerScriptTimerEvent(objLocalID, Interval);
//}
2008-05-25 20:50:45 +00:00
}
2008-05-30 11:25:21 +00:00
2009-03-13 23:45:02 +00:00
/// <summary>
/// Updates the system as to how the position of the sun should be handled.
/// </summary>
/// <param name="regionHandle"></param>
/// <param name="FixedTime">True if the Sun Position is fixed</param>
/// <param name="useEstateTime">True if the Estate Settings should be used instead of region</param>
/// <param name="FixedSunHour">The hour 0.0 <= FixedSunHour <= 24.0 at which the sun is fixed at. Sun Hour 0 is sun-rise, when Day/Night ratio is 1:1</param>
public void TriggerEstateToolsSunUpdate ( ulong regionHandle , bool FixedTime , bool useEstateTime , float FixedSunHour )
2008-05-30 11:25:21 +00:00
{
2009-03-13 23:45:02 +00:00
handlerEstateToolsSunUpdate = OnEstateToolsSunUpdate ;
if ( handlerEstateToolsSunUpdate ! = null )
2008-05-30 11:25:21 +00:00
{
2009-03-13 23:45:02 +00:00
handlerEstateToolsSunUpdate ( regionHandle , FixedTime , useEstateTime , FixedSunHour ) ;
2008-05-30 11:25:21 +00:00
}
}
2008-06-02 10:01:02 +00:00
2009-03-13 23:45:02 +00:00
public float GetCurrentTimeAsSunLindenHour ( )
2008-06-02 10:01:02 +00:00
{
2009-03-13 23:45:02 +00:00
handlerCurrentTimeAsLindenSunHour = OnGetCurrentTimeAsLindenSunHour ;
if ( handlerCurrentTimeAsLindenSunHour ! = null )
2008-06-02 10:01:02 +00:00
{
2009-03-13 23:45:02 +00:00
return handlerCurrentTimeAsLindenSunHour ( ) ;
2008-06-02 10:01:02 +00:00
}
return 6 ;
}
2008-06-05 13:24:59 +00:00
2009-04-15 19:12:37 +00:00
public void TriggerOarFileLoaded ( Guid requestId , string message )
2009-01-28 09:22:12 +00:00
{
handlerOarFileLoaded = OnOarFileLoaded ;
if ( handlerOarFileLoaded ! = null )
2009-04-15 19:12:37 +00:00
handlerOarFileLoaded ( requestId , message ) ;
2009-01-28 09:22:12 +00:00
}
2009-02-02 20:59:12 +00:00
2009-04-15 19:12:37 +00:00
public void TriggerOarFileSaved ( Guid requestId , string message )
2009-02-02 20:59:12 +00:00
{
handlerOarFileSaved = OnOarFileSaved ;
if ( handlerOarFileSaved ! = null )
2009-04-15 19:12:37 +00:00
handlerOarFileSaved ( requestId , message ) ;
2009-02-02 20:59:12 +00:00
}
2009-01-28 09:22:12 +00:00
public void TriggerEmptyScriptCompileQueue ( int numScriptsFailed , string message )
{
handlerEmptyScriptCompileQueue = OnEmptyScriptCompileQueue ;
if ( handlerEmptyScriptCompileQueue ! = null )
handlerEmptyScriptCompileQueue ( numScriptsFailed , message ) ;
}
2008-06-05 13:24:59 +00:00
public void TriggerScriptCollidingStart ( uint localId , ColliderArgs colliders )
{
handlerCollidingStart = OnScriptColliderStart ;
if ( handlerCollidingStart ! = null )
handlerCollidingStart ( localId , colliders ) ;
}
2008-08-18 00:39:10 +00:00
2008-06-05 13:24:59 +00:00
public void TriggerScriptColliding ( uint localId , ColliderArgs colliders )
{
handlerColliding = OnScriptColliding ;
if ( handlerColliding ! = null )
handlerColliding ( localId , colliders ) ;
}
2008-08-18 00:39:10 +00:00
2008-06-05 13:24:59 +00:00
public void TriggerScriptCollidingEnd ( uint localId , ColliderArgs colliders )
{
handlerCollidingEnd = OnScriptCollidingEnd ;
if ( handlerCollidingEnd ! = null )
handlerCollidingEnd ( localId , colliders ) ;
}
2008-11-22 22:56:00 +00:00
2008-11-22 23:38:25 +00:00
public void TriggerSetRootAgentScene ( UUID agentID , Scene scene )
2008-11-22 22:56:00 +00:00
{
handlerSetRootAgentScene = OnSetRootAgentScene ;
if ( handlerSetRootAgentScene ! = null )
2008-11-22 23:38:25 +00:00
handlerSetRootAgentScene ( agentID , scene ) ;
2008-11-22 22:56:00 +00:00
}
2009-09-27 17:14:10 +00:00
public void TriggerOnRegionUp ( GridRegion otherRegion )
{
handlerOnRegionUp = OnRegionUp ;
if ( handlerOnRegionUp ! = null )
handlerOnRegionUp ( otherRegion ) ;
}
2007-07-16 15:40:11 +00:00
}
2008-05-01 18:04:42 +00:00
}