TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Trinity::AnyUnitInObjectRangeCheck Class Reference

#include <GridNotifiers.h>

Public Member Functions

 AnyUnitInObjectRangeCheck (WorldObject const *obj, float range)
 
bool operator() (Unit *u)
 

Private Attributes

WorldObject consti_obj
 
float i_range
 

Constructor & Destructor Documentation

Trinity::AnyUnitInObjectRangeCheck::AnyUnitInObjectRangeCheck ( WorldObject const obj,
float  range 
)
inline
888 : i_obj(obj), i_range(range) { }
WorldObject const * i_obj
Definition: GridNotifiers.h:897
float i_range
Definition: GridNotifiers.h:898

Member Function Documentation

bool Trinity::AnyUnitInObjectRangeCheck::operator() ( Unit u)
inline
890  {
891  if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range))
892  return true;
893 
894  return false;
895  }
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.cpp:1663
bool IsAlive() const
Definition: Unit.h:1692
WorldObject const * i_obj
Definition: GridNotifiers.h:897
float i_range
Definition: GridNotifiers.h:898

+ Here is the call graph for this function:

Member Data Documentation

WorldObject const* Trinity::AnyUnitInObjectRangeCheck::i_obj
private
float Trinity::AnyUnitInObjectRangeCheck::i_range
private

The documentation for this class was generated from the following file: