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

#include <GridNotifiers.h>

Public Member Functions

 NearestPlayerInObjectRangeCheck (WorldObject const *obj, float range)
bool operator() (Player *u)

Private Member Functions

 NearestPlayerInObjectRangeCheck (NearestPlayerInObjectRangeCheck const &)

Private Attributes

WorldObject consti_obj
float i_range

Constructor & Destructor Documentation

Trinity::NearestPlayerInObjectRangeCheck::NearestPlayerInObjectRangeCheck ( WorldObject const obj,
float  range 
1212  : i_obj(obj), i_range(range)
1213  {
1214  }
WorldObject const * i_obj
Definition: GridNotifiers.h:1227
float i_range
Definition: GridNotifiers.h:1228
Trinity::NearestPlayerInObjectRangeCheck::NearestPlayerInObjectRangeCheck ( NearestPlayerInObjectRangeCheck const )

Member Function Documentation

bool Trinity::NearestPlayerInObjectRangeCheck::operator() ( Player *  u)
1217  {
1218  if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range))
1219  {
1220  i_range = i_obj->GetDistance(u);
1221  return true;
1222  }
1224  return false;
1225  }
WorldObject const * i_obj
Definition: GridNotifiers.h:1227
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.cpp:1663
float GetDistance(WorldObject const *obj) const
Definition: Object.cpp:1594
float i_range
Definition: GridNotifiers.h:1228

+ Here is the call graph for this function:

Member Data Documentation

WorldObject const* Trinity::NearestPlayerInObjectRangeCheck::i_obj
float Trinity::NearestPlayerInObjectRangeCheck::i_range

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