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
|
|
@ -43,7 +43,7 @@ namespace Server.Items
|
|||
|
||||
m_Entries = new ArrayList();
|
||||
|
||||
m_Created = DateTime.Now;
|
||||
m_Created = DateTime.UtcNow;
|
||||
m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), TimeSpan.FromSeconds( 1.0 ), new TimerCallback( OnTick ) );
|
||||
}
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ namespace Server.Items
|
|||
|
||||
private void OnTick()
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
DateTime now = DateTime.UtcNow;
|
||||
TimeSpan age = now - this.Created;
|
||||
|
||||
if ( age >= TimeSpan.FromSeconds( 100.0 ) )
|
||||
|
|
@ -210,7 +210,7 @@ namespace Server.Items
|
|||
{
|
||||
m_Player = player;
|
||||
m_Fire = fire;
|
||||
m_Start = DateTime.Now;
|
||||
m_Start = DateTime.UtcNow;
|
||||
m_Safe = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue