Beispiel #1
0
        private static void SpeedBoost_OnCommand(CommandEventArgs e)
        {
            Mobile from = e.Mobile;

            if (e.Length <= 1)
            {
                if (e.Length == 1 && !e.GetBoolean(0))
                {
                    //from.Send( SpeedControl.Disable ); //Old version
                    SpeedContext.RemoveContext(from, "SpeedBoost"); //My class
                    from.SendMessage("Speed boost has been disabled.");
                }
                else
                {
                    //from.Send( SpeedControl.MountSpeed ); //Old version
                    new SpeedContext(from, SpeedContext.SpeedState.Fast, "SpeedBoost"); //my class
                    from.SendMessage("Speed boost has been enabled.");
                }
            }
            else
            {
                from.SendMessage("Format: SpeedBoost [true|false]");
            }
        }
Beispiel #2
0
 public void StopTimer()
 {
     SpeedContext.RemoveContext(m_Context.Mobile, m_Context.Name);
     Stop();
 }
Beispiel #3
0
 public SpeedTimer(SpeedContext context, TimeSpan duration)
     : base(duration)
 {
     m_Context = context;
 }