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

#include <GridNotifiers.h>

Public Member Functions

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

Private Attributes

WorldObject consti_obj
 
Unit consti_funit
 
float i_range
 

Constructor & Destructor Documentation

Trinity::AnyUnfriendlyUnitInObjectRangeCheck::AnyUnfriendlyUnitInObjectRangeCheck ( WorldObject const obj,
Unit const funit,
float  range 
)
inline
800 : i_obj(obj), i_funit(funit), i_range(range) { }
float i_range
Definition: GridNotifiers.h:811
WorldObject const * i_obj
Definition: GridNotifiers.h:809
Unit const * i_funit
Definition: GridNotifiers.h:810

Member Function Documentation

bool Trinity::AnyUnfriendlyUnitInObjectRangeCheck::operator() ( Unit u)
inline
802  {
803  if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u))
804  return true;
805  else
806  return false;
807  }
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.cpp:1663
float i_range
Definition: GridNotifiers.h:811
bool IsAlive() const
Definition: Unit.h:1692
bool IsFriendlyTo(Unit const *unit) const
Definition: Unit.cpp:7170
WorldObject const * i_obj
Definition: GridNotifiers.h:809
Unit const * i_funit
Definition: GridNotifiers.h:810

+ Here is the call graph for this function:

Member Data Documentation

Unit const* Trinity::AnyUnfriendlyUnitInObjectRangeCheck::i_funit
private
WorldObject const* Trinity::AnyUnfriendlyUnitInObjectRangeCheck::i_obj
private
float Trinity::AnyUnfriendlyUnitInObjectRangeCheck::i_range
private

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