public override void OnHit(Mobile attacker, Mobile defender, int damage) { if (!Validate(attacker) || !CheckMana(attacker, true)) { return; } if (Registry.Contains(attacker)) { DualWieldTimer existingtimer = (DualWieldTimer)Registry[attacker]; existingtimer.Stop(); Registry.Remove(attacker); } ClearCurrentAbility(attacker); attacker.SendLocalizedMessage(1063362); // You dually wield for increased speed! attacker.FixedParticles(0x3779, 1, 15, 0x7F6, 0x3E8, 3, EffectLayer.LeftHand); Timer t = new DualWieldTimer(attacker, (int)(20.0 + 3.0 * (attacker.Skills[SkillName.Magery].Value - 50.0) / 7.0)); //20-50 % increase t.Start(); Registry.Add(attacker, t); }
public override void OnHit(Mobile attacker, Mobile defender, int damage) { if (!this.Validate(attacker) || !this.CheckMana(attacker, true)) { return; } if (Registry.Contains(attacker)) { DualWieldTimer existingtimer = (DualWieldTimer)Registry[attacker]; existingtimer.Stop(); Registry.Remove(attacker); } ClearCurrentAbility(attacker); attacker.SendLocalizedMessage(1063362); // You dually wield for increased speed! attacker.FixedParticles(0x3779, 1, 15, 0x7F6, 0x3E8, 3, EffectLayer.LeftHand); Timer t = new DualWieldTimer(attacker, (int)(20.0 + 3.0 * (attacker.Skills[SkillName.Ninjitsu].Value - 50.0) / 7.0)); //20-50 % increase BuffInfo.AddBuff(defender, new BuffInfo(BuffIcon.DualWield, 1151294, 1151293, TimeSpan.FromSeconds(6.0), attacker, damage)); t.Start(); Registry.Add(attacker, t); }