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
|
|
@ -89,7 +89,7 @@ namespace Server.Engines.Mahjong
|
|||
m_WallBreakIndicator = new MahjongWallBreakIndicator( this, new Point2D( 335, 335 ) );
|
||||
m_Dices = new MahjongDices( this );
|
||||
m_Players = new MahjongPlayers( this, MaxPlayers, BaseScore );
|
||||
m_LastReset = DateTime.Now;
|
||||
m_LastReset = DateTime.UtcNow;
|
||||
m_Level = SecureLevel.CoOwners;
|
||||
}
|
||||
|
||||
|
|
@ -189,10 +189,10 @@ namespace Server.Engines.Mahjong
|
|||
|
||||
public void ResetGame( Mobile from )
|
||||
{
|
||||
if ( DateTime.Now - m_LastReset < TimeSpan.FromSeconds( 5.0 ) )
|
||||
if ( DateTime.UtcNow - m_LastReset < TimeSpan.FromSeconds( 5.0 ) )
|
||||
return;
|
||||
|
||||
m_LastReset = DateTime.Now;
|
||||
m_LastReset = DateTime.UtcNow;
|
||||
|
||||
if ( from != null )
|
||||
m_Players.SendLocalizedMessage( 1062771, from.Name ); // ~1_name~ has reset the game.
|
||||
|
|
@ -207,10 +207,10 @@ namespace Server.Engines.Mahjong
|
|||
|
||||
public void ResetWalls( Mobile from )
|
||||
{
|
||||
if ( DateTime.Now - m_LastReset < TimeSpan.FromSeconds( 5.0 ) )
|
||||
if ( DateTime.UtcNow - m_LastReset < TimeSpan.FromSeconds( 5.0 ) )
|
||||
return;
|
||||
|
||||
m_LastReset = DateTime.Now;
|
||||
m_LastReset = DateTime.UtcNow;
|
||||
|
||||
BuildWalls();
|
||||
|
||||
|
|
@ -292,7 +292,7 @@ namespace Server.Engines.Mahjong
|
|||
m_ShowScores = reader.ReadBool();
|
||||
m_SpectatorVision = reader.ReadBool();
|
||||
|
||||
m_LastReset = DateTime.Now;
|
||||
m_LastReset = DateTime.UtcNow;
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue