Ejemplo n.º 1
0
 private bool GetNewTarget()
 {
     if (!Me.CurrentTarget.IsValidCombatUnit() && !HK.RotationOnlyOn)
     {
         var newUnits = U.activeEnemies(Me.Location, 50f).OrderBy(u => u.Distance).ThenBy(u => u.HealthPercent);
         L.debugLog("Number of new units: " + newUnits.Count());
         if (newUnits != null)
         {
             var newUnit = newUnits.FirstOrDefault();
             if (newUnit != null)
             {
                 L.pullMobLog(string.Format($"Switch target to {newUnit.SafeName} at {newUnit.Distance.ToString("F0")} yds @ {newUnit.HealthPercent.ToString("F0")}% HP"), Core.Helpers.Common.TargetColor);
                 newUnit.Target();
                 return(true);
             }
         }
     }
     return(false);
 }
Ejemplo n.º 2
0
        private bool GetTauntTarget()
        {
            if (Me.Specialization == WoWSpec.DemonHunterVengeance && VengeanceSettings.Instance.VengeanceAllowTaunt && !HK.RotationOnlyOn)
            {
                U.enemiesToTauntAnnex(50f);

                if (U.activeEnemiesToTaunt(Me.Location, 40f).Any())
                {
                    IEnumerable <WoWUnit> tauntEnemies = U.activeEnemiesToTaunt(Me.Location, 40f);
                    if (tauntEnemies != null)
                    {
                        var tauntEnemy = tauntEnemies.OrderBy(u => u.Distance).FirstOrDefault();
                        if (tauntEnemy != null)
                        {
                            L.pullMobLog(string.Format($"Switch taunt target to {tauntEnemy.SafeName} at {tauntEnemy.Distance.ToString("F0")} yds @ {tauntEnemy.HealthPercent.ToString("F0")}% HP"), Core.Helpers.Common.TargetColor);
                            tauntEnemy.Target();
                            return(true);
                        }
                    }
                }
            }
            return(false);
        }