add EventManager event OnCrossAgentToNewRegion
parent
c26f01ff8c
commit
269a6410a0
|
@ -430,6 +430,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public delegate void IncomingInstantMessage(GridInstantMessage message);
|
||||
public event IncomingInstantMessage OnIncomingInstantMessage;
|
||||
|
||||
public delegate void CrossAgentToNewRegion(ScenePresence sp, bool isFlying);
|
||||
public event CrossAgentToNewRegion OnCrossAgentToNewRegion;
|
||||
|
||||
public event IncomingInstantMessage OnUnhandledInstantMessage;
|
||||
|
||||
public delegate void ClientClosed(UUID clientID, Scene scene);
|
||||
|
@ -1960,6 +1963,27 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
public void TriggerCrossAgentToNewRegion(ScenePresence agent, bool isFlying)
|
||||
{
|
||||
CrossAgentToNewRegion handlerCrossAgentToNewRegion = OnCrossAgentToNewRegion;
|
||||
if (handlerCrossAgentToNewRegion != null)
|
||||
{
|
||||
foreach (CrossAgentToNewRegion d in handlerCrossAgentToNewRegion.GetInvocationList())
|
||||
{
|
||||
try
|
||||
{
|
||||
d(agent, isFlying);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[EVENT MANAGER]: Delegate for TriggerCrossAgentToNewRegion failed - continuing. {0} {1}",
|
||||
e.Message, e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerIncomingInstantMessage(GridInstantMessage message)
|
||||
{
|
||||
IncomingInstantMessage handlerIncomingInstantMessage = OnIncomingInstantMessage;
|
||||
|
|
|
@ -4358,6 +4358,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
if (EntityTransferModule != null)
|
||||
{
|
||||
EventManager.TriggerCrossAgentToNewRegion(agent, isFlying);
|
||||
return EntityTransferModule.Cross(agent, isFlying);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue