Add new event: OnChangedBackup

avinationmerge
Tom Grimshaw 2010-06-25 14:39:15 -07:00
parent 30397b6fbc
commit f64d1cb396
2 changed files with 15 additions and 0 deletions

View File

@ -47,6 +47,8 @@ namespace OpenSim.Region.Framework.Scenes
public delegate void DetachFromBackupDelegate(SceneObjectGroup sog);
public delegate void ChangedBackupDelegate(SceneObjectGroup sog);
public delegate void ObjectCreateDelegate(EntityBase obj);
public delegate void ObjectDeleteDelegate(EntityBase obj);
@ -67,6 +69,7 @@ namespace OpenSim.Region.Framework.Scenes
public event ObjectDuplicateDelegate OnObjectDuplicate;
public event AttachToBackupDelegate OnAttachToBackup;
public event DetachFromBackupDelegate OnDetachFromBackup;
public event ChangedBackupDelegate OnChangeBackup;
public event ObjectCreateDelegate OnObjectCreate;
public event ObjectDeleteDelegate OnObjectRemove;
@ -484,6 +487,14 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public void FireChangeBackup(SceneObjectGroup obj)
{
if (OnChangeBackup != null)
{
OnChangeBackup(obj);
}
}
/// <summary>
/// Process all pending updates
/// </summary>

View File

@ -200,6 +200,10 @@ namespace OpenSim.Region.Framework.Scenes
{
if (value)
{
if (m_isBackedUp)
{
m_scene.SceneGraph.FireChangeBackup(this);
}
timeLastChanged = DateTime.Now.Ticks;
if (!m_hasGroupChanged)
timeFirstChanged = DateTime.Now.Ticks;