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

#include <GridNotifiers.h>

Public Member Functions

 AnyPlayerInObjectRangeCheck (WorldObject const *obj, float range, bool reqAlive=true)
 
bool operator() (Player *u)
 

Private Attributes

WorldObject const_obj
 
float _range
 
bool _reqAlive
 

Constructor & Destructor Documentation

Trinity::AnyPlayerInObjectRangeCheck::AnyPlayerInObjectRangeCheck ( WorldObject const obj,
float  range,
bool  reqAlive = true 
)
inline
1191 : _obj(obj), _range(range), _reqAlive(reqAlive) { }
bool _reqAlive
Definition: GridNotifiers.h:1206
float _range
Definition: GridNotifiers.h:1205
WorldObject const * _obj
Definition: GridNotifiers.h:1204

Member Function Documentation

bool Trinity::AnyPlayerInObjectRangeCheck::operator() ( Player *  u)
inline
1193  {
1194  if (_reqAlive && !u->IsAlive())
1195  return false;
1196 
1197  if (!_obj->IsWithinDistInMap(u, _range))
1198  return false;
1199 
1200  return true;
1201  }
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.cpp:1663
bool _reqAlive
Definition: GridNotifiers.h:1206
float _range
Definition: GridNotifiers.h:1205
WorldObject const * _obj
Definition: GridNotifiers.h:1204

+ Here is the call graph for this function:

Member Data Documentation

WorldObject const* Trinity::AnyPlayerInObjectRangeCheck::_obj
private
float Trinity::AnyPlayerInObjectRangeCheck::_range
private
bool Trinity::AnyPlayerInObjectRangeCheck::_reqAlive
private

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