public override void OnCast() { Item shoes = Caster.FindItemOnLayer(Layer.Shoes); if (Caster.Mounted) { Caster.SendMessage("You cannot use this power while on a mount!"); } else if (shoes is BootsofHermes) { Caster.SendMessage("You cannot use this power while wearing those magical boots!"); } else if (CheckFizzle()) { if (!Caster.CanBeginAction(typeof(Celerity))) { Celerity.RemoveEffect(Caster); } int TotalTime = (int)(GetJediDamage(Caster) * 4); if (TotalTime < 600) { TotalTime = 600; } TableJediRunning[Caster] = SpeedControl.MountSpeed; Caster.Send(SpeedControl.MountSpeed); new InternalTimer(Caster, TimeSpan.FromSeconds(TotalTime)).Start(); Caster.BeginAction(typeof(Celerity)); Point3D air = new Point3D((Caster.X + 1), (Caster.Y + 1), (Caster.Z + 5)); Effects.SendLocationParticles(EffectItem.Create(air, Caster.Map, EffectItem.DefaultDuration), 0x5590, 9, 32, 0, 0, 5022, 0); Caster.PlaySound(0x64F); } FinishSequence(); }
protected override void OnTick() { if (DateTime.Now >= m_Expire) { Celerity.RemoveEffect(m_m); Stop(); } }