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
|
|
@ -66,7 +66,7 @@ namespace Server.Gumps
|
|||
{
|
||||
m_Mobile.SendLocalizedMessage( 1010405 ); // You cannot change guild types while in a Faction!
|
||||
}
|
||||
else if ( m_Guild.TypeLastChange.AddDays( 7 ) > DateTime.Now )
|
||||
else if ( m_Guild.TypeLastChange.AddDays( 7 ) > DateTime.UtcNow )
|
||||
{
|
||||
m_Mobile.SendLocalizedMessage( 1011142 ); // You have already changed your guild type recently.
|
||||
// TODO: Clilocs 1011142-1011145 suggest a timer for pending changes
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ namespace Server.Guilds
|
|||
|
||||
TimeSpan timeRemaining = TimeSpan.Zero;
|
||||
|
||||
if( activeWar.WarLength != TimeSpan.Zero && (activeWar.WarBeginning + activeWar.WarLength) > DateTime.Now )
|
||||
timeRemaining = (activeWar.WarBeginning + activeWar.WarLength) - DateTime.Now;
|
||||
if( activeWar.WarLength != TimeSpan.Zero && (activeWar.WarBeginning + activeWar.WarLength) > DateTime.UtcNow )
|
||||
timeRemaining = (activeWar.WarBeginning + activeWar.WarLength) - DateTime.UtcNow;
|
||||
|
||||
//time = String.Format( "{0:D2}:{1:D2}", timeRemaining.Hours.ToString(), timeRemaining.Subtract( TimeSpan.FromHours( timeRemaining.Hours ) ).Minutes ); //Is there a formatter for htis? it's 2AM and I'm tired and can't find it
|
||||
time = String.Format( "{0:D2}:{1:mm}", timeRemaining.Hours, DateTime.MinValue + timeRemaining );
|
||||
|
|
@ -234,7 +234,7 @@ namespace Server.Guilds
|
|||
{
|
||||
//Accept the war
|
||||
guild.PendingWars.Remove( war );
|
||||
war.WarBeginning = DateTime.Now;
|
||||
war.WarBeginning = DateTime.UtcNow;
|
||||
guild.AcceptedWars.Add( war );
|
||||
|
||||
if( alliance != null && alliance.IsMember( guild ) )
|
||||
|
|
@ -250,7 +250,7 @@ namespace Server.Guilds
|
|||
//Technically SHOULD say Your guild is now at war w/out any info, intentional diff.
|
||||
|
||||
otherGuild.PendingWars.Remove( otherWar );
|
||||
otherWar.WarBeginning = DateTime.Now;
|
||||
otherWar.WarBeginning = DateTime.UtcNow;
|
||||
otherGuild.AcceptedWars.Add( otherWar );
|
||||
|
||||
if( otherAlliance != null && m_Other.Alliance.IsMember( m_Other ) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue