public RidingStrategy_FixedSpeed(int questId, RamGaitType speedWanted)
     : base(questId)
 {
     _speedWanted = speedWanted;
 }
 public RidingStrategy_PreventExhaustion(int questId, RamGaitType maxSpeedWanted)
     : base(questId)
 {
     _maxSpeedWanted    = maxSpeedWanted;
     _inFatigueRecovery = false;
 }
            protected bool AdjustRamSpeed(RamGaitType gaitWanted)
            {
                if (!IsMountedOnRam())
                {
                    return(false);
                }

                // Ram exhausted?
                var isRamExhausted = Me.HasAura(AuraId_ExhaustedRam);

                if (isRamExhausted)
                {
                    _timer_GaitMaintenance.Reset();
                    _timer_GiddyupThrottle.Reset();
                    return(false);
                }

                var isCantering = Me.HasAura(AuraId_RamCanter);
                var isGalloping = Me.HasAura(AuraId_RamGallop);
                var isTrotting  = Me.HasAura(AuraId_RamTrot);

                // Need to slow down?
                var isGaitTooFast = (((gaitWanted == RamGaitType.None) && (isTrotting || isCantering || isGalloping)) ||
                                     ((gaitWanted == RamGaitType.Trot) && (isCantering || isGalloping)) ||
                                     ((gaitWanted == RamGaitType.Canter) && isGalloping));

                if (isGaitTooFast)
                {
                    _timer_GaitMaintenance.Restart();
                    _timer_GiddyupThrottle.Restart();
                    return(true); // "True", because we are waiting for gait to slow
                }

                // Need to pick up the pace?
                var isGaitTooSlow = (((gaitWanted == RamGaitType.Trot) && !(isTrotting || isCantering || isGalloping)) ||
                                     ((gaitWanted == RamGaitType.Canter) && !(isCantering || isGalloping)) ||
                                     ((gaitWanted == RamGaitType.Gallop) && !isGalloping));

                if (isGaitTooSlow)
                {
                    var isGiddyupThrottleFinished = (!_timer_GiddyupThrottle.IsRunning ||
                                                     (_timer_GiddyupThrottle.Elapsed > Time_GiddyupThrottle));
                    if (isGiddyupThrottleFinished)
                    {
                        // N.B.: To find the correct button, type "/framestack" into WoWclient and hover over the button...
                        Lua.DoString("ExtraActionButton1:Click()");
                        _timer_GiddyupThrottle.Restart();
                    }

                    _timer_GaitMaintenance.Restart();
                    return(true);
                }

                // Maintain what we've got...
                var isGaitMaintenanceTimerFinished = (!_timer_GaitMaintenance.IsRunning ||
                                                      (_timer_GaitMaintenance.Elapsed > Time_GaitMaintenance));

                if (isGaitMaintenanceTimerFinished)
                {
                    // N.B.: To find the correct button, type "/framestack" into WoWclient and hover over the button...
                    Lua.DoString("ExtraActionButton1:Click()");
                    _timer_GaitMaintenance.Restart();
                    return(true);
                }

                return(false);
            }