Esempio n. 1
0
        public bool      IsViableTarget(WoWObject   target)
        {
            bool        isViable;

            if (target == null)
                { return (false); }

            isViable = (target.IsValid
                        && (MobIds.Contains((int)target.Entry) || ObjectIds.Contains((int)target.Entry))
                        && (target.Distance < HuntingGroundRadius)
                        && !target.IsLocallyBlacklisted()
                        && !BlacklistIfPlayerNearby(target)
                        && (IgnoreMobsInBlackspots
                            ? Targeting.IsTooNearBlackspot(ProfileManager.CurrentProfile.Blackspots,
                                                            target.Location)
                            : true));

            if (isViable && (target is WoWUnit))
            {
                WoWUnit     wowUnit     = target.ToUnit();

                isViable = ((wowUnit.IsAlive && (MobState == MobStateType.Alive))
                            || (wowUnit.Dead && (MobState == MobStateType.Dead))
                            || (MobState == MobStateType.DontCare));
            }

            return (isViable);                                                         
        }