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
|
|
@ -15,12 +15,12 @@ namespace Server.Mobiles
|
|||
public DateTime NextWoolTime
|
||||
{
|
||||
get{ return m_NextWoolTime; }
|
||||
set{ m_NextWoolTime = value; Body = ( DateTime.Now >= m_NextWoolTime ) ? 0xCF : 0xDF; }
|
||||
set{ m_NextWoolTime = value; Body = ( DateTime.UtcNow >= m_NextWoolTime ) ? 0xCF : 0xDF; }
|
||||
}
|
||||
|
||||
public void Carve( Mobile from, Item item )
|
||||
{
|
||||
if ( DateTime.Now < m_NextWoolTime )
|
||||
if ( DateTime.UtcNow < m_NextWoolTime )
|
||||
{
|
||||
// This sheep is not yet ready to be shorn.
|
||||
PrivateOverheadMessage( MessageType.Regular, 0x3B2, 500449, from.NetState );
|
||||
|
|
@ -30,13 +30,13 @@ namespace Server.Mobiles
|
|||
from.SendLocalizedMessage( 500452 ); // You place the gathered wool into your backpack.
|
||||
from.AddToBackpack( new Wool( Map == Map.Felucca ? 2 : 1 ) );
|
||||
|
||||
NextWoolTime = DateTime.Now + TimeSpan.FromHours( 3.0 ); // TODO: Proper time delay
|
||||
NextWoolTime = DateTime.UtcNow + TimeSpan.FromHours( 3.0 ); // TODO: Proper time delay
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
Body = ( DateTime.Now >= m_NextWoolTime ) ? 0xCF : 0xDF;
|
||||
Body = ( DateTime.UtcNow >= m_NextWoolTime ) ? 0xCF : 0xDF;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue