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
|
|
@ -32,7 +32,7 @@ namespace Server.Items
|
|||
|
||||
m_MinDamage = minDamage;
|
||||
m_MaxDamage = maxDamage;
|
||||
m_Created = DateTime.Now;
|
||||
m_Created = DateTime.UtcNow;
|
||||
m_Duration = duration;
|
||||
|
||||
m_Timer = Timer.DelayCall( TimeSpan.Zero, TimeSpan.FromSeconds( 1 ), new TimerCallback( OnTick ) );
|
||||
|
|
@ -46,7 +46,7 @@ namespace Server.Items
|
|||
|
||||
private void OnTick()
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
DateTime now = DateTime.UtcNow;
|
||||
TimeSpan age = now - m_Created;
|
||||
|
||||
if( age > m_Duration ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue