Esempio n. 1
0
        public override bool CheckDisturb(DisturbType type, bool checkFirst, bool resistable)
        {
            if (type == DisturbType.EquipRequest || type == DisturbType.UseRequest/* || type == DisturbType.Hurt*/)
                return false;

            return true;
        }
Esempio n. 2
0
		public void Disturb(DisturbType type, bool firstCircle, bool resistable)
		{
			if (!CheckDisturb(type, firstCircle, resistable))
			{
				return;
			}

			if (m_State == SpellState.Casting)
			{
				if (!firstCircle && !Core.AOS && this is MagerySpell && ((MagerySpell)this).Circle == SpellCircle.First)
				{
					return;
				}

				m_State = SpellState.None;
				m_Caster.Spell = null;

				OnDisturb(type, true);

				if (m_CastTimer != null)
				{
					m_CastTimer.Stop();
				}

				if (m_AnimTimer != null)
				{
					m_AnimTimer.Stop();
				}

				if (Core.AOS && m_Caster.Player && type == DisturbType.Hurt)
				{
					DoHurtFizzle();
				}

				m_Caster.NextSpellTime = Core.TickCount + (int)GetDisturbRecovery().TotalMilliseconds;
			}
			else if (m_State == SpellState.Sequencing)
			{
				if (!firstCircle && !Core.AOS && this is MagerySpell && ((MagerySpell)this).Circle == SpellCircle.First)
				{
					return;
				}

				m_State = SpellState.None;
				m_Caster.Spell = null;

				OnDisturb(type, false);

				Target.Cancel(m_Caster);

				if (Core.AOS && m_Caster.Player && type == DisturbType.Hurt)
				{
					DoHurtFizzle();
				}
			}
		}
Esempio n. 3
0
 public override bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable)
 {
     return(true);
 }
Esempio n. 4
0
 public void Disturb(DisturbType type)
 {
     Disturb(type, true, false);
 }
Esempio n. 5
0
            public override void OnDisturb( DisturbType type, bool message )
            {
                Caster.NextSkillTime = Core.TickCount;

                base.OnDisturb( type, message );
            }
Esempio n. 6
0
		public void Disturb( DisturbType type, bool firstCircle, bool resistable )
		{
			if ( !CheckDisturb( type, firstCircle, resistable ) )
				return;

			if ( m_State == SpellState.Casting )
			{
				if ( !firstCircle && Circle == SpellCircle.First && !Core.AOS )
					return;

				m_State = SpellState.None;
				m_Caster.Spell = null;

				OnDisturb( type, true );

				if ( m_CastTimer != null )
					m_CastTimer.Stop();

				if ( m_AnimTimer != null )
					m_AnimTimer.Stop();

				// erl: removed next spell delay for "daggering" and [cancelspell
				// ..
				// line altered -
				// if ( type == DisturbType.EquipRequest || type == DisturbType.Hurt )
				// become -
				// if ( type == DisturbType.Hurt )
				// ..

				if ( type == DisturbType.Hurt )
					m_Caster.NextSpellTime = DateTime.Now + GetDisturbRecovery();
				else
					TimeSpan.FromSeconds( GetDisturbRecovery().TotalSeconds );

			}
			else if ( m_State == SpellState.Sequencing )
			{
				if ( !firstCircle && Circle == SpellCircle.First && !Core.AOS )
					return;

				m_State = SpellState.None;
				m_Caster.Spell = null;

				OnDisturb( type, false );

				Targeting.Target.Cancel( m_Caster );

				if ( type == DisturbType.EquipRequest || type == DisturbType.Hurt )
					m_Caster.NextSpellTime = DateTime.Now + GetDisturbRecovery();
				else
					TimeSpan.FromSeconds( GetDisturbRecovery().TotalSeconds );
			}
		}
Esempio n. 7
0
 public void Disturb( DisturbType type )
 {
     Disturb( type, true, false );
 }
Esempio n. 8
0
		public virtual void OnDisturb( DisturbType type, bool message )
		{
			if ( message )
				m_Caster.SendLocalizedMessage( 500641 ); // Your concentration is disturbed, thus ruining thy spell.
		}
Esempio n. 9
0
        public void Disturb(DisturbType type, bool firstCircle, bool resistable)
        {
            if (!CheckDisturb(type, firstCircle, resistable))
            {
                return;
            }

            if (m_State == SpellState.Casting)
            {
                if (!firstCircle && Circle == SpellCircle.First && !Core.AOS)
                {
                    return;
                }

                m_State        = SpellState.None;
                m_Caster.Spell = null;

                OnDisturb(type, true);

                if (m_CastTimer != null)
                {
                    m_CastTimer.Stop();
                }

                if (m_AnimTimer != null)
                {
                    m_AnimTimer.Stop();
                }

                // erl: removed next spell delay for "daggering" and [cancelspell
                // ..
                // line altered -
                // if ( type == DisturbType.EquipRequest || type == DisturbType.Hurt )
                // become -
                // if ( type == DisturbType.Hurt )
                // ..

                if (type == DisturbType.Hurt)
                {
                    m_Caster.NextSpellTime = DateTime.Now + GetDisturbRecovery();
                }
                else
                {
                    TimeSpan.FromSeconds(GetDisturbRecovery().TotalSeconds);
                }
            }
            else if (m_State == SpellState.Sequencing)
            {
                if (!firstCircle && Circle == SpellCircle.First && !Core.AOS)
                {
                    return;
                }

                m_State        = SpellState.None;
                m_Caster.Spell = null;

                OnDisturb(type, false);

                Targeting.Target.Cancel(m_Caster);

                if (type == DisturbType.EquipRequest || type == DisturbType.Hurt)
                {
                    m_Caster.NextSpellTime = DateTime.Now + GetDisturbRecovery();
                }
                else
                {
                    TimeSpan.FromSeconds(GetDisturbRecovery().TotalSeconds);
                }
            }
        }
 public override void OnDisturb( DisturbType type, bool message )
 {
 }
Esempio n. 11
0
            public override void OnDisturb(DisturbType type, bool message)
            {
                base.OnDisturb(type, message);

                _Stone.LastUsed = DateTime.Now.Subtract(_Stone.Cooldown);
            }
Esempio n. 12
0
 public override bool CheckDisturb(DisturbType type, bool checkFirst, bool resistable) =>
 type != DisturbType.EquipRequest && type != DisturbType.UseRequest;
Esempio n. 13
0
 public override void OnDisturb(DisturbType type, bool message)
 {
     if (message && !m_Stop)
     {
         Caster.SendMessage(54, "Your ethics spell was disturbed!");
     }
 }
Esempio n. 14
0
      public void Disturb( DisturbType type, bool firstCircle, bool resistable )
      {
         if ( !CheckDisturb( type, firstCircle, resistable ) )
            return;

         if ( m_State == SpellState.Casting )
         {
            if ( !firstCircle && Circle == SpellCircle.First && !Core.AOS )
               return;

            m_State = SpellState.None;
            //m_Caster.NextSpellTime = DateTime.Now + TimeSpan.FromSeconds(0.20 + (0.20 * (int)Circle) );
            try
            {
                TimeSpan NextSpellDelay = TimeSpan.FromSeconds((0.90 + (0.41 * (int)Circle)) * (1 - CastDelayFinishFactor));
                m_Caster.NextSpellTime = DateTime.Now + NextSpellDelay;
            }
            catch(Exception e)
            {
                //In case of an exception use old calculation.
                m_Caster.NextSpellTime = DateTime.Now + TimeSpan.FromSeconds(0.20 + (0.20 * (int)Circle) );
                //and log...
                GeneralLogging.WriteLine("CrashDebug", "Exception:\n{0}\n{1}\nCastDelayFinishFactor: {2}\nCircle: {3}", e.Message, e.StackTrace, CastDelayFinishFactor, (int)Circle);
            }
            //m_Caster.SendMessage("Debug: Disturb, FinishFactor: {0}, NextSpellTime: {1}", CastDelayFinishFactor, NextSpellDelay);

            m_Caster.Spell = null;

            OnDisturb( type, true );

            if ( m_CastTimer != null )
               m_CastTimer.Stop();

            if ( m_AnimTimer != null )
               m_AnimTimer.Stop();

            if ( Core.AOS && m_Caster.Player && type == DisturbType.Hurt )
               DoHurtFizzle();
         }
         else if ( m_State == SpellState.Sequencing )
         {
            if ( !firstCircle && Circle == SpellCircle.First && !Core.AOS )
               return;

            m_State = SpellState.None;
            m_Caster.Spell = null;

            OnDisturb( type, false );

            Targeting.Target.Cancel( m_Caster );

            if ( Core.AOS && m_Caster.Player && type == DisturbType.Hurt )
               DoHurtFizzle();
         }
      }
Esempio n. 15
0
            public override void OnDisturb( DisturbType type, bool message )
            {
                if ( Caster is PlayerMobile )
                    ( (PlayerMobile) Caster ).Flying = false;

                if ( message )
                    Caster.SendLocalizedMessage( 1113192 ); // You have been disrupted while attempting to fly!
            }
Esempio n. 16
0
 public virtual void OnDisturb(DisturbType type, bool message)
 {
     //if ( message )
     //    m_Caster.SendLocalizedMessage( 500641 ); // Your concentration is disturbed, thus ruining thy spell.
     m_Caster.FixedEffect(0x3735, 6, 30);
     m_Caster.PlaySound(0x5C);
 }
Esempio n. 17
0
        public override void OnDisturb(DisturbType type, bool message)
        {
            base.OnDisturb(type, message);

            if (message)
            {
                Caster.PlaySound(0x1D6);
            }
        }
Esempio n. 18
0
 public override bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable) => false;
Esempio n. 19
0
            public override void OnDisturb( DisturbType type, bool message )
            {
                Caster.NextSkillTime = DateTime.Now;

                base.OnDisturb( type, message );
            }
Esempio n. 20
0
		public override bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable)
		{
			// Cannot disturb Chivalry spells
			return false;
		}
Esempio n. 21
0
 public virtual void OnDisturb( DisturbType type, bool message )
 {
     if ( message )
         m_Caster.SendAsciiMessage( "Your concentration is disturbed, thus ruining thy spell." ); // Your concentration is disturbed, thus ruining thy spell.
 }
Esempio n. 22
0
            public override void OnDisturb(DisturbType type, bool message)
            {
                Caster.NextSkillTime = DateTime.Now + TimeSpan.FromSeconds(0.5);

                base.OnDisturb(type, message);
            }
Esempio n. 23
0
 public virtual bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable) =>
 !(resistable && Scroll is BaseWand);
Esempio n. 24
0
 public override bool CheckDisturb(DisturbType type, bool checkFirst, bool resistable) => false;
Esempio n. 25
0
            public override void OnDisturb(DisturbType type, bool message)
            {
                Caster.NextSkillTime = Core.TickCount;

                base.OnDisturb(type, message);
            }
Esempio n. 26
0
 public override void OnDisturb(DisturbType type, bool message)
 {
 }
Esempio n. 27
0
            public override void OnDisturb(DisturbType type, bool message)
            {
                Caster.NextSkillTime = DateTime.Now;

                base.OnDisturb(type, message);
            }
Esempio n. 28
0
 public override bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable)
 {
     // Cannot disturb Chivalry spells
     return(false);
 }
Esempio n. 29
0
 public virtual bool CheckDisturb( DisturbType type, bool firstCircle, bool resistable )
 {
     return true;
 }
Esempio n. 30
0
 public override void OnDisturb(DisturbType type, bool message)
 {
     if (message && !this.m_Stop)
         this.Caster.SendLocalizedMessage(1113192); // You have been disrupted while attempting to fly!
 }
Esempio n. 31
0
 public void Disturb(DisturbType type)
 {
     DoFizzle();
 }
Esempio n. 32
0
        public virtual void OnDisturb( DisturbType type, bool message )
        {
            if( message )
                m_Caster.SendLocalizedMessage(500641); // Your concentration is disturbed, thus ruining thy spell.

            if( m_Caster.Player && m_Caster.Spell == this )
            {
                EventDispatcher.InvokeSpellFailed(new SpellEventArgs((Player)m_Caster, this));
            }
        }
			public override void OnDisturb( DisturbType type, bool message )
			{
				if( message && !m_Stop )
					Caster.SendLocalizedMessage( 1080074 ); // You have been disrupted while attempting to summon your pet!
			}
			public override bool CheckDisturb( DisturbType type, bool checkFirst, bool resistable )
			{
				return false;
			}
Esempio n. 35
0
		public virtual bool CheckDisturb( DisturbType type, bool firstCircle, bool resistable )
		{
			if ( resistable && m_Scroll is BaseWand )
				return false;

			return true;
		}
Esempio n. 36
0
        public void Disturb(DisturbType type, bool firstCircle, bool resistable)
        {
            if (!CheckDisturb(type, firstCircle, resistable))
            {
                return;
            }

            if (m_State == SpellState.Casting)
            {
                if (!firstCircle && Circle == SpellCircle.First && !Core.AOS)
                {
                    return;
                }

                if (m_Caster is TeiravonMobile && type == DisturbType.Hurt)
                {
                    TeiravonMobile TAV          = m_Caster as TeiravonMobile;
                    bool           Concentrated = TAV.Skills.Meditation.Value - 35 > Utility.Random(100);

                    if (TAV.HasFeat(TeiravonMobile.Feats.MeditativeConcentration) && Concentrated)
                    {
                        return;
                    }
                }

                m_State        = SpellState.None;
                m_Caster.Spell = null;

                OnDisturb(type, true);

                if (m_CastTimer != null)
                {
                    m_CastTimer.Stop();
                }

                if (m_AnimTimer != null)
                {
                    m_AnimTimer.Stop();
                }

                if (Core.AOS && m_Caster.Player && type == DisturbType.Hurt)
                {
                    DoHurtFizzle();
                }

                m_Caster.NextSpellTime = DateTime.Now + GetDisturbRecovery();
            }
            else if (m_State == SpellState.Sequencing)
            {
                if (!firstCircle && Circle == SpellCircle.First && !Core.AOS)
                {
                    return;
                }

                m_State        = SpellState.None;
                m_Caster.Spell = null;

                OnDisturb(type, false);

                Targeting.Target.Cancel(m_Caster);

                if (Core.AOS && m_Caster.Player && type == DisturbType.Hurt)
                {
                    DoHurtFizzle();
                }
            }
        }
Esempio n. 37
0
            public override void OnDisturb( DisturbType type, bool message )
            {
                if( message && !m_Stop )
                    Caster.SendLocalizedMessage( 1049455 ); // You have been disrupted while attempting to summon your ethereal mount!

                //m_Mount.UnmountMe();
            }
            public override void OnDisturb( DisturbType type, bool message )
            {
                Caster.NextSkillTime = DateTime.Now + TimeSpan.FromSeconds( 0.5 );

                base.OnDisturb( type, message );
            }
Esempio n. 39
0
        public virtual bool CheckDisturb( DisturbType type, bool firstCircle, bool resistable )
        {
            if (resistable && (m_Scroll is BaseWand || m_Scroll is BaseJewel || m_Scroll is GnarledStaff || m_Scroll is BaseStationary))
                return false;

            return true;
        }
Esempio n. 40
0
 public virtual bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable)
 {
     return(true);
 }
Esempio n. 41
0
        public void Disturb( DisturbType type, bool firstCircle, bool resistable )
        {
            if ( !CheckDisturb( type, firstCircle, resistable ) )
                return;

            if ( m_State == SpellState.Casting )
            {
                if( !firstCircle && !Core.AOS && this is MagerySpell &&  ((MagerySpell)this).Circle == SpellCircle.First )
                    return;

                m_State = SpellState.None;
                m_Caster.Spell = null;

                OnDisturb( type, true );

                if ( m_CastTimer != null )
                    m_CastTimer.Stop();

                if ( m_AnimTimer != null )
                    m_AnimTimer.Stop();

                if ( Core.AOS && m_Caster.Player && type == DisturbType.Hurt )
                    DoHurtFizzle();

                m_Caster.NextSpellTime = DateTime.Now + GetDisturbRecovery();
            }
            else if ( m_State == SpellState.Sequencing )
            {
                if( !firstCircle && !Core.AOS && this is MagerySpell &&  ((MagerySpell)this).Circle == SpellCircle.First )
                    return;

                m_State = SpellState.None;
                m_Caster.Spell = null;

                OnDisturb( type, false );

                Targeting.Target.Cancel( m_Caster );

                if ( Core.AOS && m_Caster.Player && type == DisturbType.Hurt )
                    DoHurtFizzle();
            }
        }
			public override void OnDisturb(DisturbType type, bool message)
			{
				base.OnDisturb(type, message);

				_Stone.LastUsed = DateTime.Now.Subtract(_Stone.Cooldown);
			}
Esempio n. 43
0
 public override bool CheckDisturb( DisturbType type, bool firstCircle, bool resistable )
 {
     return false;
 }
Esempio n. 44
0
 public override bool CheckDisturb(DisturbType type, bool checkFirst, bool resistable)
 {
     return(false);
 }