26 : _me(unit), _dist(dist), _playerOnly(playerOnly), _exception(!withTank ? unit->GetThreatManager().GetLastVictim() : nullptr), _aura(aura)
47 if (_dist < 0.0f && _me->IsWithinCombatRange(target, -
_dist))
68 _caster(caster), _spellInfo(
sSpellMgr->GetSpellInfo(spellId, caster->GetMap()->GetDifficultyID()))
82 float minRange = 0.0f;
83 float maxRange = 0.0f;
84 float rangeMod = 0.0f;
96 float meleeRange = 0.0f;
106 minRange = range.
Min + meleeRange;
107 maxRange = range.
Max;
113 minRange += rangeMod;
118 rangeMod += 8.0f / 3.0f;
121 maxRange += rangeMod;
144 return target != currentVictim;
163 if (_dist < 0.0f && _me->IsWithinCombatRange(target, -
_dist))
#define NOMINAL_MELEE_RANGE
SpellRangeEntry const * RangeEntry
SpellCastResult CheckTarget(WorldObject const *caster, WorldObject const *target, bool implicit=true) const
Unit * GetCurrentVictim()
ThreatManager & GetThreatManager()
bool IsWithinCombatRange(Unit const *obj, float dist2compare) const
Powers GetPowerType() const
float GetCombatReach() const override
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
SpellRange GetSpellMinMaxRangeForTarget(Unit const *target, SpellInfo const *spellInfo) const
bool IsWithinLOSInMap(WorldObject const *obj, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
DefaultTargetSelector(Unit const *unit, float dist, bool playerOnly, bool withMainTank, int32 aura)
bool operator()(Unit const *target) const
bool operator()(Unit const *target) const
bool operator()(Unit const *target) const
constexpr bool IsInDist(float x, float y, float z, float dist) const
SpellInfo const * _spellInfo
bool operator()(Unit const *target) const
SpellTargetSelector(Unit *caster, uint32 spellId)