This commit is contained in:
parent
c0218110c3
commit
754877f880
12 changed files with 70 additions and 56 deletions
|
|
@ -412,7 +412,7 @@ namespace Server.Spells
|
|||
|
||||
if ( m_State == SpellState.Casting )
|
||||
{
|
||||
if( !firstCircle && !Core.AOS && this is MagerySpell && ((MagerySpell)this).Circle == SpellCircle.First )
|
||||
if( !firstCircle && !Core.AOS && this is MagerySpell && ((MagerySpell)this).Circle == SpellCircle.First )
|
||||
return;
|
||||
|
||||
m_State = SpellState.None;
|
||||
|
|
@ -433,7 +433,7 @@ namespace Server.Spells
|
|||
}
|
||||
else if ( m_State == SpellState.Sequencing )
|
||||
{
|
||||
if( !firstCircle && !Core.AOS && this is MagerySpell && ((MagerySpell)this).Circle == SpellCircle.First )
|
||||
if( !firstCircle && !Core.AOS && this is MagerySpell && ((MagerySpell)this).Circle == SpellCircle.First )
|
||||
return;
|
||||
|
||||
m_State = SpellState.None;
|
||||
|
|
@ -558,10 +558,16 @@ namespace Server.Spells
|
|||
WeaponAbility.ClearCurrentAbility( m_Caster );
|
||||
|
||||
m_CastTimer = new CastTimer( this, castDelay );
|
||||
m_CastTimer.Start();
|
||||
//m_CastTimer.Start();
|
||||
|
||||
OnBeginCast();
|
||||
|
||||
if ( castDelay > TimeSpan.Zero ) {
|
||||
m_CastTimer.Start();
|
||||
} else {
|
||||
m_CastTimer.Tick();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
|
@ -659,8 +665,6 @@ namespace Server.Spells
|
|||
return TimeSpan.FromSeconds( (double)delay / CastRecoveryPerSecond );
|
||||
}
|
||||
|
||||
|
||||
|
||||
public abstract TimeSpan CastDelayBase { get; }
|
||||
|
||||
public virtual double CastDelayFastScalar { get { return 1; } }
|
||||
|
|
@ -898,12 +902,17 @@ namespace Server.Spells
|
|||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( m_Spell.m_State == SpellState.Casting && m_Spell.m_Caster.Spell == m_Spell )
|
||||
if ( m_Spell == null || m_Spell.m_Caster == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if ( m_Spell.m_State == SpellState.Casting && m_Spell.m_Caster.Spell == m_Spell )
|
||||
{
|
||||
m_Spell.m_State = SpellState.Sequencing;
|
||||
m_Spell.m_CastTimer = null;
|
||||
m_Spell.m_Caster.OnSpellCast( m_Spell );
|
||||
m_Spell.m_Caster.Region.OnSpellCast( m_Spell.m_Caster, m_Spell );
|
||||
if ( m_Spell.m_Caster.Region != null )
|
||||
m_Spell.m_Caster.Region.OnSpellCast( m_Spell.m_Caster, m_Spell );
|
||||
m_Spell.m_Caster.NextSpellTime = DateTime.Now + m_Spell.GetCastRecovery();// Spell.NextSpellDelay;
|
||||
|
||||
Target originalTarget = m_Spell.m_Caster.Target;
|
||||
|
|
@ -916,6 +925,10 @@ namespace Server.Spells
|
|||
m_Spell.m_CastTimer = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void Tick() {
|
||||
OnTick();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -104,7 +104,7 @@ namespace Server.Spells
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ namespace Server.Spells
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static bool CanRevealCaster( Mobile m )
|
||||
{
|
||||
if ( m is BaseCreature )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue