public override void OnHit(Mobile attacker, Mobile defender, double damagebonus) { bool found = false; if (PlayerTimers.Count != 0) { int numberOfTimers = 0; foreach (AnimateDeadTimer t in PlayerTimers) { if (t != null && t.m_Defender == defender) { found = true; } if (t.count == 30) { numberOfTimers++; } } if (numberOfTimers == PlayerTimers.Count) { PlayerTimers.Clear(); found = false; } } if (found == false) { AnimateDeadTimer timer = new AnimateDeadTimer(defender, attacker); PlayerTimers.Add(timer); timer.Start(); } base.OnHit(attacker, defender, damagebonus); }
public override void OnHit( Mobile attacker, Mobile defender, double damagebonus ) { bool found = false; if ( PlayerTimers.Count != 0 ) { int numberOfTimers = 0; foreach ( AnimateDeadTimer t in PlayerTimers ) { if ( t != null && t.m_Defender == defender ) { found = true; } if ( t.count == 30 ) { numberOfTimers++; } } if ( numberOfTimers == PlayerTimers.Count ) { PlayerTimers.Clear(); found = false; } } if ( found == false ) { AnimateDeadTimer timer = new AnimateDeadTimer( defender, attacker ); PlayerTimers.Add(timer); timer.Start(); } base.OnHit(attacker,defender,damagebonus); }