From edc29795254d6d28b97d828689928cc273aefd7e Mon Sep 17 00:00:00 2001 From: xavier Date: Tue, 6 Sep 2011 00:39:56 +0000 Subject: [PATCH] dragon, et al breath effect correction --- Scripts/Mobiles/BaseCreature.cs | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/Scripts/Mobiles/BaseCreature.cs b/Scripts/Mobiles/BaseCreature.cs index f02a9e782..91080fc82 100644 --- a/Scripts/Mobiles/BaseCreature.cs +++ b/Scripts/Mobiles/BaseCreature.cs @@ -662,7 +662,8 @@ namespace Server.Mobiles { loc = target.Location; map = target.Map; - } else + } + else { bool validLocation = false; for ( int j = 0; !validLocation && j < 10; ++j ) @@ -4977,10 +4978,21 @@ namespace Server.Mobiles { Mobile target = this.Combatant; - if ( target != null && target.Alive && !target.IsDeadBondedPet && CanBeHarmful( target ) && target.Map == this.Map && !IsDeadBondedPet && target.InRange( this, BreathRange ) && InLOS( target ) && !BardPacified ) - BreathStart( target ); - - m_NextBreathTime = DateTime.Now + TimeSpan.FromSeconds( BreathMinDelay + (Utility.RandomDouble() * BreathMaxDelay) ); + if( target != null && target.Alive && !target.IsDeadBondedPet && CanBeHarmful( target ) && target.Map == this.Map && !IsDeadBondedPet && target.InRange( this, BreathRange ) && InLOS( target ) && !BardPacified ) + { + if( m_NextBreathTime == DateTime.MinValue ) + { + m_NextBreathTime = DateTime.Now + TimeSpan.FromSeconds( BreathMinDelay + ( Utility.RandomDouble() * BreathMaxDelay ) ); + } + else + { + BreathStart( target ); + } + } + else + { + m_NextBreathTime = DateTime.MinValue; + } } if ( ( CanHeal || CanHealOwner ) && Alive && !IsHealing && !BardPacified )