rework Core.TickCount
This commit is contained in:
parent
b3535985d7
commit
7b6cf66b87
9 changed files with 107 additions and 49 deletions
|
|
@ -444,10 +444,10 @@ namespace Server.Items
|
|||
|
||||
private int m_Count;
|
||||
|
||||
private int m_NextSkillTime;
|
||||
private int m_NextSpellTime;
|
||||
private int m_NextActionTime;
|
||||
private int m_LastMoveTime;
|
||||
private long m_NextSkillTime;
|
||||
private long m_NextSpellTime;
|
||||
private long m_NextActionTime;
|
||||
private long m_LastMoveTime;
|
||||
|
||||
public DigTimer( Mobile from, TreasureMap treasureMap, Point3D location, Map map ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 1.0 ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public Timer m_Timer;
|
||||
protected ActionType m_Action;
|
||||
private int m_NextStopGuard;
|
||||
private long m_NextStopGuard;
|
||||
|
||||
public BaseCreature m_Mobile;
|
||||
|
||||
|
|
@ -1999,9 +1999,9 @@ namespace Server.Mobiles
|
|||
return delay;
|
||||
}
|
||||
|
||||
private int m_NextMove;
|
||||
private long m_NextMove;
|
||||
|
||||
public int NextMove
|
||||
public long NextMove
|
||||
{
|
||||
get { return m_NextMove; }
|
||||
set { m_NextMove = value; }
|
||||
|
|
@ -2718,7 +2718,7 @@ namespace Server.Mobiles
|
|||
m_Timer.Start();
|
||||
}
|
||||
|
||||
private int m_NextDetectHidden;
|
||||
private long m_NextDetectHidden;
|
||||
|
||||
public virtual bool CanDetectHidden { get { return m_Mobile.Skills[SkillName.DetectHidden].Value > 0; } }
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class MageAI : BaseAI
|
||||
{
|
||||
private int m_NextCastTime;
|
||||
private int m_NextHealTime;
|
||||
private long m_NextCastTime;
|
||||
private long m_NextHealTime;
|
||||
|
||||
public MageAI( BaseCreature m )
|
||||
: base( m )
|
||||
|
|
|
|||
|
|
@ -616,7 +616,7 @@ namespace Server.Mobiles
|
|||
public virtual bool DisplayWeight{ get{ return Backpack is StrongBackpack; } }
|
||||
|
||||
#region Breath ability, like dragon fire breath
|
||||
private int m_NextBreathTime;
|
||||
private long m_NextBreathTime;
|
||||
|
||||
// Must be overriden in subclass to enable
|
||||
public virtual bool HasBreath{ get{ return false; } }
|
||||
|
|
@ -4962,9 +4962,9 @@ namespace Server.Mobiles
|
|||
* This functionality appears to be implemented on OSI as well
|
||||
*/
|
||||
|
||||
private int m_NextReacquireTime;
|
||||
private long m_NextReacquireTime;
|
||||
|
||||
public int NextReacquireTime{ get{ return m_NextReacquireTime; } set{ m_NextReacquireTime = value; } }
|
||||
public long NextReacquireTime { get { return m_NextReacquireTime; } set { m_NextReacquireTime = value; } }
|
||||
|
||||
public virtual TimeSpan ReacquireDelay{ get{ return TimeSpan.FromSeconds( 10.0 ); } }
|
||||
public virtual bool ReacquireOnMovement{ get{ return false; } }
|
||||
|
|
@ -5152,7 +5152,7 @@ namespace Server.Mobiles
|
|||
private const double MinutesToNextChanceMin = 0.25;
|
||||
private const double MinutesToNextChanceMax = 0.75;
|
||||
|
||||
private int m_NextRummageTime;
|
||||
private long m_NextRummageTime;
|
||||
|
||||
public virtual bool CanBreath { get { return HasBreath && !Summoned; } }
|
||||
public virtual bool IsDispellable { get { return Summoned && !IsAnimatedDead; } }
|
||||
|
|
@ -5174,8 +5174,8 @@ namespace Server.Mobiles
|
|||
public virtual double HealOwnerInterval { get { return 30.0; } }
|
||||
public virtual bool HealOwnerFully { get { return false; } }
|
||||
|
||||
private int m_NextHealTime = Core.TickCount;
|
||||
private int m_NextHealOwnerTime = Core.TickCount;
|
||||
private long m_NextHealTime = Core.TickCount;
|
||||
private long m_NextHealOwnerTime = Core.TickCount;
|
||||
private Timer m_HealTimer = null;
|
||||
|
||||
public bool IsHealing { get { return ( m_HealTimer != null ); } }
|
||||
|
|
@ -5292,7 +5292,7 @@ namespace Server.Mobiles
|
|||
#endregion
|
||||
|
||||
#region Damaging Aura
|
||||
private int m_NextAura;
|
||||
private long m_NextAura;
|
||||
|
||||
public virtual bool HasAura { get { return false; } }
|
||||
public virtual TimeSpan AuraInterval { get { return TimeSpan.FromSeconds( 5 ); } }
|
||||
|
|
@ -5345,7 +5345,7 @@ namespace Server.Mobiles
|
|||
|
||||
public virtual void OnThink()
|
||||
{
|
||||
int tc = Core.TickCount;
|
||||
long tc = Core.TickCount;
|
||||
|
||||
if ( EnableRummaging && CanRummageCorpses && !Summoned && !Controlled && tc - m_NextRummageTime >= 0 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int LastMoved
|
||||
public long LastMoved
|
||||
{
|
||||
get{ return LastMoveTime; }
|
||||
}
|
||||
|
|
@ -4073,7 +4073,7 @@ namespace Server.Mobiles
|
|||
private static bool FastwalkPrevention = true; // Is fastwalk prevention enabled?
|
||||
private static int FastwalkThreshold = 400; // Fastwalk prevention will become active after 0.4 seconds
|
||||
|
||||
private int m_NextMovementTime;
|
||||
private long m_NextMovementTime;
|
||||
private bool m_HasMoved;
|
||||
|
||||
public virtual bool UsesFastwalkPrevention{ get{ return ( AccessLevel < AccessLevel.Counselor ); } }
|
||||
|
|
@ -4115,7 +4115,7 @@ namespace Server.Mobiles
|
|||
return true;
|
||||
}
|
||||
|
||||
int ts = pm.m_NextMovementTime - Core.TickCount;
|
||||
long ts = pm.m_NextMovementTime - Core.TickCount;
|
||||
|
||||
if ( ts < 0 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace Server.Spells
|
|||
private Item m_Scroll;
|
||||
private SpellInfo m_Info;
|
||||
private SpellState m_State;
|
||||
private int m_StartCastTime;
|
||||
private long m_StartCastTime;
|
||||
|
||||
public SpellState State{ get{ return m_State; } set{ m_State = value; } }
|
||||
public Mobile Caster{ get{ return m_Caster; } }
|
||||
|
|
@ -27,7 +27,7 @@ namespace Server.Spells
|
|||
public string Mantra{ get{ return m_Info.Mantra; } }
|
||||
public Type[] Reagents{ get{ return m_Info.Reagents; } }
|
||||
public Item Scroll{ get{ return m_Scroll; } }
|
||||
public int StartCastTime { get { return m_StartCastTime; } }
|
||||
public long StartCastTime { get { return m_StartCastTime; } }
|
||||
|
||||
private static TimeSpan NextSpellDelay = TimeSpan.FromSeconds( 0.75 );
|
||||
private static TimeSpan AnimateDelay = TimeSpan.FromSeconds( 1.5 );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue