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
|
|
@ -228,7 +228,7 @@ namespace Server.Misc
|
|||
#region Scroll of Alacrity
|
||||
PlayerMobile pm = from as PlayerMobile;
|
||||
|
||||
if ( pm != null && skill.SkillName == pm.AcceleratedSkill && pm.AcceleratedStart > DateTime.Now )
|
||||
if ( pm != null && skill.SkillName == pm.AcceleratedSkill && pm.AcceleratedStart > DateTime.UtcNow )
|
||||
toGain *= Utility.RandomMinMax(2, 5);
|
||||
#endregion
|
||||
|
||||
|
|
@ -345,38 +345,38 @@ namespace Server.Misc
|
|||
case Stat.Str:
|
||||
{
|
||||
if ( from is BaseCreature && ((BaseCreature)from).Controlled ) {
|
||||
if ( (from.LastStrGain + m_PetStatGainDelay) >= DateTime.Now )
|
||||
if ( (from.LastStrGain + m_PetStatGainDelay) >= DateTime.UtcNow )
|
||||
return;
|
||||
}
|
||||
else if( (from.LastStrGain + m_StatGainDelay) >= DateTime.Now )
|
||||
else if( (from.LastStrGain + m_StatGainDelay) >= DateTime.UtcNow )
|
||||
return;
|
||||
|
||||
from.LastStrGain = DateTime.Now;
|
||||
from.LastStrGain = DateTime.UtcNow;
|
||||
break;
|
||||
}
|
||||
case Stat.Dex:
|
||||
{
|
||||
if ( from is BaseCreature && ((BaseCreature)from).Controlled ) {
|
||||
if ( (from.LastDexGain + m_PetStatGainDelay) >= DateTime.Now )
|
||||
if ( (from.LastDexGain + m_PetStatGainDelay) >= DateTime.UtcNow )
|
||||
return;
|
||||
}
|
||||
else if( (from.LastDexGain + m_StatGainDelay) >= DateTime.Now )
|
||||
else if( (from.LastDexGain + m_StatGainDelay) >= DateTime.UtcNow )
|
||||
return;
|
||||
|
||||
from.LastDexGain = DateTime.Now;
|
||||
from.LastDexGain = DateTime.UtcNow;
|
||||
break;
|
||||
}
|
||||
case Stat.Int:
|
||||
{
|
||||
if ( from is BaseCreature && ((BaseCreature)from).Controlled ) {
|
||||
if ( (from.LastIntGain + m_PetStatGainDelay) >= DateTime.Now )
|
||||
if ( (from.LastIntGain + m_PetStatGainDelay) >= DateTime.UtcNow )
|
||||
return;
|
||||
}
|
||||
|
||||
else if( (from.LastIntGain + m_StatGainDelay) >= DateTime.Now )
|
||||
else if( (from.LastIntGain + m_StatGainDelay) >= DateTime.UtcNow )
|
||||
return;
|
||||
|
||||
from.LastIntGain = DateTime.Now;
|
||||
from.LastIntGain = DateTime.UtcNow;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue