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
|
|
@ -40,7 +40,7 @@ namespace Server
|
|||
|
||||
try
|
||||
{
|
||||
if ( (pm.LastSacrificeLoss + LossDelay) < DateTime.Now )
|
||||
if ( (pm.LastSacrificeLoss + LossDelay) < DateTime.UtcNow )
|
||||
{
|
||||
if ( VirtueHelper.Atrophy( from, VirtueName.Sacrifice, LossAmount ) )
|
||||
from.SendLocalizedMessage( 1052041 ); // You have lost some Sacrifice.
|
||||
|
|
@ -48,7 +48,7 @@ namespace Server
|
|||
VirtueLevel level = VirtueHelper.GetLevel( from, VirtueName.Sacrifice );
|
||||
|
||||
pm.AvailableResurrects = (int)level;
|
||||
pm.LastSacrificeLoss = DateTime.Now;
|
||||
pm.LastSacrificeLoss = DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
catch
|
||||
|
|
@ -124,7 +124,7 @@ namespace Server
|
|||
{
|
||||
from.SendLocalizedMessage( 1052017 ); // You do not have enough fame to sacrifice.
|
||||
}
|
||||
else if ( DateTime.Now < (pm.LastSacrificeGain + GainDelay) )
|
||||
else if ( DateTime.UtcNow < (pm.LastSacrificeGain + GainDelay) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1052016 ); // You must wait approximately one day before sacrificing again.
|
||||
}
|
||||
|
|
@ -148,7 +148,7 @@ namespace Server
|
|||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerCallback( targ.Delete ) );
|
||||
|
||||
pm.LastSacrificeGain = DateTime.Now;
|
||||
pm.LastSacrificeGain = DateTime.UtcNow;
|
||||
|
||||
bool gainedPath = false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue