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
|
|
@ -69,7 +69,7 @@ namespace Server.Mobiles
|
|||
|
||||
m_RentalGold = rentalGold;
|
||||
|
||||
m_RentalExpireTime = DateTime.Now + duration.Duration;
|
||||
m_RentalExpireTime = DateTime.UtcNow + duration.Duration;
|
||||
m_RentalExpireTimer = new RentalExpireTimer( this, duration.Duration );
|
||||
m_RentalExpireTimer.Start();
|
||||
}
|
||||
|
|
@ -154,7 +154,7 @@ namespace Server.Mobiles
|
|||
|
||||
public void ComputeRentalExpireDelay( out int days, out int hours )
|
||||
{
|
||||
TimeSpan delay = RentalExpireTime - DateTime.Now;
|
||||
TimeSpan delay = RentalExpireTime - DateTime.UtcNow;
|
||||
|
||||
if ( delay <= TimeSpan.Zero )
|
||||
{
|
||||
|
|
@ -388,7 +388,7 @@ namespace Server.Mobiles
|
|||
|
||||
m_RentalExpireTime = reader.ReadDeltaTime();
|
||||
|
||||
TimeSpan delay = m_RentalExpireTime - DateTime.Now;
|
||||
TimeSpan delay = m_RentalExpireTime - DateTime.UtcNow;
|
||||
m_RentalExpireTimer = new RentalExpireTimer( this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero );
|
||||
m_RentalExpireTimer.Start();
|
||||
}
|
||||
|
|
@ -415,7 +415,7 @@ namespace Server.Mobiles
|
|||
|
||||
m_Vendor.RentalPrice = renewalPrice;
|
||||
|
||||
m_Vendor.m_RentalExpireTime = DateTime.Now + m_Vendor.RentalDuration.Duration;
|
||||
m_Vendor.m_RentalExpireTime = DateTime.UtcNow + m_Vendor.RentalDuration.Duration;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue