AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::AnyDeadUnitObjectInRangeCheck Class Reference

#include "GridNotifiers.h"

Inheritance diagram for Acore::AnyDeadUnitObjectInRangeCheck:
Acore::AnyDeadUnitSpellTargetInRangeCheck

Public Member Functions

 AnyDeadUnitObjectInRangeCheck (Unit *searchObj, float range)
 
bool operator() (Player *u)
 
bool operator() (Corpse *u)
 
bool operator() (Creature *u)
 
template<class NOT_INTERESTED >
bool operator() (NOT_INTERESTED *)
 

Protected Attributes

Unit const *const i_searchObj
 
float i_range
 

Detailed Description

Constructor & Destructor Documentation

◆ AnyDeadUnitObjectInRangeCheck()

Acore::AnyDeadUnitObjectInRangeCheck::AnyDeadUnitObjectInRangeCheck ( Unit searchObj,
float  range 
)
inline
614: i_searchObj(searchObj), i_range(range) {}
float i_range
Definition: GridNotifiers.h:621
Unit const *const i_searchObj
Definition: GridNotifiers.h:620

Member Function Documentation

◆ operator()() [1/4]

bool AnyDeadUnitObjectInRangeCheck::operator() ( Corpse u)
361{
363}
@ CORPSE_BONES
Definition: Corpse.h:28
CorpseType GetType() const
Definition: Corpse.h:72
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const
Definition: Object.cpp:1321

References CORPSE_BONES, Corpse::GetType(), i_range, i_searchObj, and WorldObject::IsWithinDistInMap().

◆ operator()() [2/4]

bool AnyDeadUnitObjectInRangeCheck::operator() ( Creature u)
366{
367 return !u->IsAlive() && i_searchObj->IsWithinDistInMap(u, i_range);
368}
bool IsAlive() const
Definition: Unit.h:1808

References i_range, i_searchObj, Unit::IsAlive(), and WorldObject::IsWithinDistInMap().

◆ operator()() [3/4]

template<class NOT_INTERESTED >
bool Acore::AnyDeadUnitObjectInRangeCheck::operator() ( NOT_INTERESTED *  )
inline
618{ return false; }

◆ operator()() [4/4]

bool AnyDeadUnitObjectInRangeCheck::operator() ( Player u)
356{
358}
@ SPELL_AURA_GHOST
Definition: SpellAuraDefines.h:158
bool HasAuraType(AuraType auraType) const
Definition: Unit.cpp:5617

References Unit::HasAuraType(), i_range, i_searchObj, Unit::IsAlive(), WorldObject::IsWithinDistInMap(), and SPELL_AURA_GHOST.

Referenced by Acore::AnyDeadUnitSpellTargetInRangeCheck::operator()().

Member Data Documentation

◆ i_range

float Acore::AnyDeadUnitObjectInRangeCheck::i_range
protected

Referenced by operator()().

◆ i_searchObj

Unit const* const Acore::AnyDeadUnitObjectInRangeCheck::i_searchObj
protected

Referenced by operator()().