public override bool CheckDisturb(DisturbType type, bool checkFirst, bool resistable) { if (type == DisturbType.EquipRequest || type == DisturbType.UseRequest/* || type == DisturbType.Hurt*/) return false; return true; }
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(); } } }
public override bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable) { return(true); }
public void Disturb(DisturbType type) { Disturb(type, true, false); }
public override void OnDisturb( DisturbType type, bool message ) { Caster.NextSkillTime = Core.TickCount; base.OnDisturb( type, message ); }
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 void Disturb( DisturbType type ) { Disturb( type, true, false ); }
public virtual void OnDisturb( DisturbType type, bool message ) { if ( message ) m_Caster.SendLocalizedMessage( 500641 ); // Your concentration is disturbed, thus ruining thy spell. }
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 ) { }
public override void OnDisturb(DisturbType type, bool message) { base.OnDisturb(type, message); _Stone.LastUsed = DateTime.Now.Subtract(_Stone.Cooldown); }
public override bool CheckDisturb(DisturbType type, bool checkFirst, bool resistable) => type != DisturbType.EquipRequest && type != DisturbType.UseRequest;
public override void OnDisturb(DisturbType type, bool message) { if (message && !m_Stop) { Caster.SendMessage(54, "Your ethics spell was disturbed!"); } }
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(); } }
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! }
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); }
public override void OnDisturb(DisturbType type, bool message) { base.OnDisturb(type, message); if (message) { Caster.PlaySound(0x1D6); } }
public override bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable) => false;
public override void OnDisturb( DisturbType type, bool message ) { Caster.NextSkillTime = DateTime.Now; base.OnDisturb( type, message ); }
public override bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable) { // Cannot disturb Chivalry spells return false; }
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. }
public override void OnDisturb(DisturbType type, bool message) { Caster.NextSkillTime = DateTime.Now + TimeSpan.FromSeconds(0.5); base.OnDisturb(type, message); }
public virtual bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable) => !(resistable && Scroll is BaseWand);
public override bool CheckDisturb(DisturbType type, bool checkFirst, bool resistable) => false;
public override void OnDisturb(DisturbType type, bool message) { Caster.NextSkillTime = Core.TickCount; base.OnDisturb(type, message); }
public override void OnDisturb(DisturbType type, bool message) { }
public override void OnDisturb(DisturbType type, bool message) { Caster.NextSkillTime = DateTime.Now; base.OnDisturb(type, message); }
public override bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable) { // Cannot disturb Chivalry spells return(false); }
public virtual bool CheckDisturb( DisturbType type, bool firstCircle, bool resistable ) { return true; }
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! }
public void Disturb(DisturbType type) { DoFizzle(); }
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; }
public virtual bool CheckDisturb( DisturbType type, bool firstCircle, bool resistable ) { if ( resistable && m_Scroll is BaseWand ) return false; return true; }
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(); } } }
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 ); }
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; }
public virtual bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable) { return(true); }
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 bool CheckDisturb( DisturbType type, bool firstCircle, bool resistable ) { return false; }
public override bool CheckDisturb(DisturbType type, bool checkFirst, bool resistable) { return(false); }