GetCastRecovery() 공개 메소드

public GetCastRecovery ( ) : System.TimeSpan
리턴 System.TimeSpan
예제 #1
0
            protected override void OnTick()
            {
                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);
                    m_Spell.m_Caster.NextSpellTime = Core.TickCount + (int)m_Spell.GetCastRecovery().TotalMilliseconds;                    // Spell.NextSpellDelay;

                    Target originalTarget = m_Spell.m_Caster.Target;

                    m_Spell.OnCast();

                    if (m_Spell.m_Caster.Player && m_Spell.m_Caster.Target != originalTarget && m_Spell.Caster.Target != null)
                    {
                        m_Spell.m_Caster.Target.BeginTimeout(m_Spell.m_Caster, TimeSpan.FromSeconds(30.0));
                    }

                    m_Spell.m_CastTimer = null;
                }
            }
예제 #2
0
            protected override void OnTick()
            {
                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.Caster.Delta(MobileDelta.Flags);

                    if (m_Spell.m_Caster.Region != null)
                    {
                        m_Spell.m_Caster.Region.OnSpellCast(m_Spell.m_Caster, m_Spell);
                    }

                    m_Spell.m_Caster.NextSpellTime = Core.TickCount + (int)m_Spell.GetCastRecovery().TotalMilliseconds;

                    Target originalTarget = m_Spell.m_Caster.Target;

                    if (m_Spell.InstantTarget == null || !m_Spell.OnCastInstantTarget())
                    {
                        m_Spell.OnCast();
                    }

                    if (m_Spell.m_Caster.Player && m_Spell.m_Caster.Target != originalTarget && m_Spell.Caster.Target != null)
                    {
                        m_Spell.m_Caster.Target.BeginTimeout(m_Spell.m_Caster, TimeSpan.FromSeconds(30.0));
                    }

                    m_Spell.m_CastTimer = null;
                }
            }
예제 #3
0
            protected override void OnTick()
            {
                try
                {
                    if (m_Spell != null && m_Spell.Caster != null && m_Spell.State == SpellState.Casting && m_Spell.Caster.Spell == m_Spell)
                    {
                        m_Spell.State       = SpellState.Sequencing;
                        m_Spell.m_CastTimer = null;
                        m_Spell.Caster.OnSpellCast(m_Spell);
                        m_Spell.Caster.Region.OnSpellCast(m_Spell.Caster, m_Spell);
                        m_Spell.Caster.NextSpellTime = Core.TickCount + Core.GetTicks(m_Spell.GetCastRecovery());

                        Target originalTarget = m_Spell.Caster.Target;

                        m_Spell.OnCast();

                        if (m_Spell.Caster.Player && m_Spell.Caster.Target != originalTarget && m_Spell.Caster.Target != null)
                        {
                            m_Spell.Caster.Target.BeginTimeout(m_Spell.Caster, TimeSpan.FromSeconds(30.0));
                        }

                        m_Spell.m_CastTimer = null;

                        m_Spell.OnEndCast();
                    }
                }
                catch
                {
                    m_Spell.m_CastTimer = null;

                    if (m_Spell != null && m_Spell.Caster != null)
                    {
                        m_Spell.Caster.NextSpellTime = Core.TickCount;
                    }
                }
            }