This commit is contained in:
xavier 2011-09-06 01:33:20 +00:00
parent 9acbdb6e36
commit b13cb1ce31

View file

@ -4977,21 +4977,15 @@ namespace Server.Mobiles
if ( CanBreath && DateTime.Now >= m_NextBreathTime ) // tested: controlled dragons do breath fire, what about summoned skeletal dragons?
{
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 )
{
if( m_NextBreathTime == DateTime.MinValue )
{
m_NextBreathTime = DateTime.Now + TimeSpan.FromSeconds( BreathMinDelay + ( Utility.RandomDouble() * BreathMaxDelay ) );
}
else
if( ( DateTime.Now - m_NextBreathTime ) < TimeSpan.FromSeconds( 30 ) )
{
BreathStart( target );
}
}
else
{
m_NextBreathTime = DateTime.MinValue;
m_NextBreathTime = DateTime.Now + TimeSpan.FromSeconds( BreathMinDelay + ( Utility.RandomDouble() * BreathMaxDelay ) );
}
}