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
|
|
@ -319,7 +319,7 @@ namespace Server.Engines.Plants
|
|||
m_Plant = plant;
|
||||
m_FertileDirt = fertileDirt;
|
||||
|
||||
m_NextGrowth = DateTime.Now + CheckDelay;
|
||||
m_NextGrowth = DateTime.UtcNow + CheckDelay;
|
||||
m_GrowthIndicator = PlantGrowthIndicator.None;
|
||||
m_Hits = MaxHits;
|
||||
m_LeftSeeds = 8;
|
||||
|
|
@ -328,7 +328,7 @@ namespace Server.Engines.Plants
|
|||
|
||||
public void Reset( bool potions )
|
||||
{
|
||||
m_NextGrowth = DateTime.Now + CheckDelay;
|
||||
m_NextGrowth = DateTime.UtcNow + CheckDelay;
|
||||
m_GrowthIndicator = PlantGrowthIndicator.None;
|
||||
|
||||
Hits = MaxHits;
|
||||
|
|
@ -418,7 +418,7 @@ namespace Server.Engines.Plants
|
|||
public static void GrowAll()
|
||||
{
|
||||
ArrayList plants = PlantItem.Plants;
|
||||
DateTime now = DateTime.Now;
|
||||
DateTime now = DateTime.UtcNow;
|
||||
|
||||
for ( int i = plants.Count - 1; i >= 0; --i )
|
||||
{
|
||||
|
|
@ -444,13 +444,13 @@ namespace Server.Engines.Plants
|
|||
if ( !m_Plant.IsGrowable )
|
||||
return;
|
||||
|
||||
if ( DateTime.Now < m_NextGrowth )
|
||||
if ( DateTime.UtcNow < m_NextGrowth )
|
||||
{
|
||||
m_GrowthIndicator = PlantGrowthIndicator.Delay;
|
||||
return;
|
||||
}
|
||||
|
||||
m_NextGrowth = DateTime.Now + CheckDelay;
|
||||
m_NextGrowth = DateTime.UtcNow + CheckDelay;
|
||||
|
||||
if ( !m_Plant.ValidGrowthLocation )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue