protected override void OnTick()
{
if ( !m_SavesEnabled || AutoRestart.Restarting )
return;
if ( m_Warning == TimeSpan.Zero )
{
Save( true );
}
else
{
int s = (int)m_Warning.TotalSeconds;
int m = s / 60;
s %= 60;
if ( m > 0 && s > 0 )
World.Broadcast( 0x35, true, "The world will save in {0} minute{1} and {2} second{3}.", m, m != 1 ? "s" : "", s, s != 1 ? "s" : "" );
else if ( m > 0 )
World.Broadcast( 0x35, true, "The world will save in {0} minute{1}.", m, m != 1 ? "s" : "" );
else
World.Broadcast( 0x35, true, "The world will save in {0} second{1}.", s, s != 1 ? "s" : "" );
Timer.DelayCall( m_Warning, new TimerCallback( Save ) );
}
}