Implement Core.TickCount
Convert movement, actions (lift/use), combat, and spells to use Core.TickCount and avoid DateTime caveats (performance, system time dependency, etc) Refactor DateTime.Now to DateTime.UtcNow Add LOS check for Iron Maiden addon
This commit is contained in:
parent
f99eefb288
commit
d2c670f5c3
241 changed files with 842 additions and 831 deletions
|
|
@ -233,7 +233,7 @@ namespace Server.Factions
|
|||
private void BeginCorrupting( Faction faction )
|
||||
{
|
||||
m_Corrupting = faction;
|
||||
m_CorruptionStart = DateTime.Now;
|
||||
m_CorruptionStart = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
private void ClearCorrupting()
|
||||
|
|
@ -250,7 +250,7 @@ namespace Server.Factions
|
|||
if ( !IsBeingCorrupted )
|
||||
return TimeSpan.Zero;
|
||||
|
||||
TimeSpan ts = ( m_CorruptionStart + CorruptionPeriod ) - DateTime.Now;
|
||||
TimeSpan ts = ( m_CorruptionStart + CorruptionPeriod ) - DateTime.UtcNow;
|
||||
|
||||
if ( ts < TimeSpan.Zero )
|
||||
ts = TimeSpan.Zero;
|
||||
|
|
@ -319,7 +319,7 @@ namespace Server.Factions
|
|||
if ( m_Corrupted != newController )
|
||||
BeginCorrupting( newController );
|
||||
}
|
||||
else if ( m_GraceStart > DateTime.MinValue && (m_GraceStart + CorruptionGrace) < DateTime.Now )
|
||||
else if ( m_GraceStart > DateTime.MinValue && (m_GraceStart + CorruptionGrace) < DateTime.UtcNow )
|
||||
{
|
||||
if ( m_Corrupted != newController )
|
||||
BeginCorrupting( newController ); // grace time over, reset period
|
||||
|
|
@ -334,7 +334,7 @@ namespace Server.Factions
|
|||
}
|
||||
else if ( m_GraceStart == DateTime.MinValue )
|
||||
{
|
||||
m_GraceStart = DateTime.Now;
|
||||
m_GraceStart = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
m_PurificationStart = DateTime.MinValue;
|
||||
|
|
@ -356,7 +356,7 @@ namespace Server.Factions
|
|||
m.Sigil = this;
|
||||
|
||||
m_Corrupting = null;
|
||||
m_PurificationStart = DateTime.Now;
|
||||
m_PurificationStart = DateTime.UtcNow;
|
||||
m_CorruptionStart = DateTime.MinValue;
|
||||
|
||||
m_Town.Capture( m_Corrupted );
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ namespace Server.Factions
|
|||
Visible = false;
|
||||
|
||||
m_Faction = f;
|
||||
m_TimeOfPlacement = DateTime.Now;
|
||||
m_TimeOfPlacement = DateTime.UtcNow;
|
||||
m_Placer = m;
|
||||
}
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ namespace Server.Factions
|
|||
if ( decayPeriod == TimeSpan.MaxValue )
|
||||
return false;
|
||||
|
||||
if ( (m_TimeOfPlacement + decayPeriod) < DateTime.Now )
|
||||
if ( (m_TimeOfPlacement + decayPeriod) < DateTime.UtcNow )
|
||||
{
|
||||
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( Delete ) );
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue