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

#include <GridNotifiers.h>

Public Member Functions

 PlayerAtMinimumRangeAway (Unit const *unit, float fMinRange)
 
bool operator() (Player *player)
 

Private Attributes

Unit constunit
 
float fRange
 

Constructor & Destructor Documentation

Trinity::PlayerAtMinimumRangeAway::PlayerAtMinimumRangeAway ( Unit const unit,
float  fMinRange 
)
inline
1286 : unit(unit), fRange(fMinRange) { }
float fRange
Definition: GridNotifiers.h:1298
Unit const * unit
Definition: GridNotifiers.h:1297

Member Function Documentation

bool Trinity::PlayerAtMinimumRangeAway::operator() ( Player *  player)
inline
1288  {
1289  //No threat list check, must be done explicit if expected to be in combat with creature
1290  if (!player->IsGameMaster() && player->IsAlive() && !unit->IsWithinDist(player, fRange, false))
1291  return true;
1292 
1293  return false;
1294  }
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.cpp:1658
float fRange
Definition: GridNotifiers.h:1298
Unit const * unit
Definition: GridNotifiers.h:1297

+ Here is the call graph for this function:

Member Data Documentation

float Trinity::PlayerAtMinimumRangeAway::fRange
private
Unit const* Trinity::PlayerAtMinimumRangeAway::unit
private

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