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
|
|
@ -28,7 +28,7 @@ namespace Server.Factions
|
|||
{
|
||||
for ( int i = 0; i < m_LastBroadcasts.Length; ++i )
|
||||
{
|
||||
if ( DateTime.Now >= (m_LastBroadcasts[i] + BroadcastPeriod) )
|
||||
if ( DateTime.UtcNow >= (m_LastBroadcasts[i] + BroadcastPeriod) )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -36,15 +36,15 @@ namespace Server.Factions
|
|||
}
|
||||
}
|
||||
|
||||
public bool IsAtrophyReady{ get{ return DateTime.Now >= (m_LastAtrophy + TimeSpan.FromHours( 47.0 )); } }
|
||||
public bool IsAtrophyReady{ get{ return DateTime.UtcNow >= (m_LastAtrophy + TimeSpan.FromHours( 47.0 )); } }
|
||||
|
||||
public int CheckAtrophy()
|
||||
{
|
||||
if ( DateTime.Now < (m_LastAtrophy + TimeSpan.FromHours( 47.0 )) )
|
||||
if ( DateTime.UtcNow < (m_LastAtrophy + TimeSpan.FromHours( 47.0 )) )
|
||||
return 0;
|
||||
|
||||
int distrib = 0;
|
||||
m_LastAtrophy = DateTime.Now;
|
||||
m_LastAtrophy = DateTime.UtcNow;
|
||||
|
||||
List<PlayerState> members = new List<PlayerState>( m_Members );
|
||||
|
||||
|
|
@ -72,9 +72,9 @@ namespace Server.Factions
|
|||
{
|
||||
for ( int i = 0; i < m_LastBroadcasts.Length; ++i )
|
||||
{
|
||||
if ( DateTime.Now >= (m_LastBroadcasts[i] + BroadcastPeriod) )
|
||||
if ( DateTime.UtcNow >= (m_LastBroadcasts[i] + BroadcastPeriod) )
|
||||
{
|
||||
m_LastBroadcasts[i] = DateTime.Now;
|
||||
m_LastBroadcasts[i] = DateTime.UtcNow;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -193,7 +193,7 @@ namespace Server.Factions
|
|||
m_Commander = reader.ReadMobile();
|
||||
|
||||
if ( version < 5 )
|
||||
m_LastAtrophy = DateTime.Now;
|
||||
m_LastAtrophy = DateTime.UtcNow;
|
||||
|
||||
if ( version < 4 )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue