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
|
|
@ -110,7 +110,7 @@ namespace Server.SkillHandlers
|
|||
}
|
||||
else if ( m_Creature != creature )
|
||||
{
|
||||
from.NextSkillTime = DateTime.Now + TimeSpan.FromSeconds( 10.0 );
|
||||
from.NextSkillTime = Core.TickCount + 10000;
|
||||
|
||||
double diff = ((m_Instrument.GetDifficultyFor( m_Creature ) + m_Instrument.GetDifficultyFor( creature )) * 0.5) - 5.0;
|
||||
double music = from.Skills[SkillName.Musicianship].Value;
|
||||
|
|
@ -122,7 +122,7 @@ namespace Server.SkillHandlers
|
|||
{
|
||||
if ( !BaseInstrument.CheckMusicianship( from ) )
|
||||
{
|
||||
from.NextSkillTime = DateTime.Now + TimeSpan.FromSeconds( 5.0 );
|
||||
from.NextSkillTime = Core.TickCount + 5000;
|
||||
from.SendLocalizedMessage( 500612 ); // You play poorly, and there is no effect.
|
||||
m_Instrument.PlayInstrumentBadly( from );
|
||||
m_Instrument.ConsumeUse( from );
|
||||
|
|
@ -134,7 +134,7 @@ namespace Server.SkillHandlers
|
|||
|
||||
if ( !from.CheckTargetSkill( SkillName.Provocation, creature, diff-25.0, diff+25.0 ) )
|
||||
{
|
||||
from.NextSkillTime = DateTime.Now + TimeSpan.FromSeconds( 5.0 );
|
||||
from.NextSkillTime = Core.TickCount + 5000;
|
||||
from.SendLocalizedMessage( 501599 ); // Your music fails to incite enough anger.
|
||||
m_Instrument.PlayInstrumentBadly( from );
|
||||
m_Instrument.ConsumeUse( from );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue