Ejemplo n.º 1
0
        private static WoWPlayer GetBestRiptideTarget(WoWPlayer originalTarget)
        {
            if (!originalTarget.HasMyAura("Riptide"))
            {
                return(originalTarget);
            }

            // Target already has RT. So lets find someone else to throw it on. Lowest health first preferably.
            return(Unit.NearbyFriendlyPlayers.OrderBy(u => u.HealthPercent).Where(u => !u.HasMyAura("Riptide")).FirstOrDefault());
        }
Ejemplo n.º 2
0
        private static WoWPlayer GetBestRiptideTarget(WoWPlayer originalTarget)
        {
            if (!originalTarget.HasMyAura("Riptide") && originalTarget.InLineOfSpellSight)
            {
                return(originalTarget);
            }

            // Target already has RT. So lets find someone else to throw it on. Lowest health first preferably.
            WoWPlayer ripTarget = Unit.GroupMembers.Where(u => u.DistanceSqr < 40 * 40 && !u.HasMyAura("Riptide") && u.InLineOfSpellSight).OrderBy(u => u.GetPredictedHealthPercent()).FirstOrDefault();

            if (ripTarget != null && ripTarget.GetPredictedHealthPercent() > SingularSettings.Instance.IgnoreHealTargetsAboveHealth)
            {
                ripTarget = null;
            }

            return(ripTarget);
        }
Ejemplo n.º 3
0
        protected override void DefaultTargetWeight(List <TargetPriority> units)
        {
            var tanks = GetMainTankGuids();
            var mistweaver_settings_ignore_percent = MistweaverSettings.Instance.IgnorePercent;

            foreach (TargetPriority prio in units)
            {
                prio.Score = 500f;
                WoWPlayer p = prio.Object.ToPlayer();
                prio.Score -= p.HealthPercent * 5;
                if (!p.InLineOfSpellSight)
                {
                    prio.Score -= 100f;
                }
                if (p.HasMyAura("Enveloping Mist"))
                {
                    prio.Score -= 50f;
                }
                if (tanks.Contains(p.Guid) && p.HealthPercent < mistweaver_settings_ignore_percent)
                {
                    prio.Score += 100f;
                }
            }
        }
Ejemplo n.º 4
0
        private static WoWPlayer GetBestRiptideTarget(WoWPlayer originalTarget)
        {
            if (!originalTarget.HasMyAura("Riptide") && originalTarget.InLineOfSpellSight)
                return originalTarget;

            // Target already has RT. So lets find someone else to throw it on. Lowest health first preferably.
            WoWPlayer ripTarget = Unit.GroupMembers.Where(u => u.DistanceSqr < 40 * 40 && !u.HasMyAura("Riptide") && u.InLineOfSpellSight).OrderBy(u => u.GetPredictedHealthPercent()).FirstOrDefault();
            if (ripTarget != null && ripTarget.GetPredictedHealthPercent() > SingularSettings.Instance.IgnoreHealTargetsAboveHealth)
                ripTarget = null;

            return ripTarget;
        }
Ejemplo n.º 5
0
        private static WoWPlayer GetBestRiptideTarget(WoWPlayer originalTarget)
        {
            if (!originalTarget.HasMyAura("Riptide"))
                return originalTarget;

            // Target already has RT. So lets find someone else to throw it on. Lowest health first preferably.
            return Unit.NearbyFriendlyPlayers.OrderBy(u => u.HealthPercent).Where(u => !u.HasMyAura("Riptide")).FirstOrDefault();
        }