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

#include <GridNotifiers.h>

Public Member Functions

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

Private Member Functions

 NearestAttackableUnitInObjectRangeCheck (NearestAttackableUnitInObjectRangeCheck const &)
 

Private Attributes

WorldObject consti_obj
 
Unit consti_funit
 
float i_range
 

Constructor & Destructor Documentation

Trinity::NearestAttackableUnitInObjectRangeCheck::NearestAttackableUnitInObjectRangeCheck ( WorldObject const obj,
Unit const funit,
float  range 
)
inline
905 : i_obj(obj), i_funit(funit), i_range(range) { }
float i_range
Definition: GridNotifiers.h:920
Unit const * i_funit
Definition: GridNotifiers.h:919
WorldObject const * i_obj
Definition: GridNotifiers.h:918
Trinity::NearestAttackableUnitInObjectRangeCheck::NearestAttackableUnitInObjectRangeCheck ( NearestAttackableUnitInObjectRangeCheck const )
private

Member Function Documentation

bool Trinity::NearestAttackableUnitInObjectRangeCheck::operator() ( Unit u)
inline
907  {
910  {
911  i_range = i_obj->GetDistance(u); // use found unit range as new range limit for next check
912  return true;
913  }
914 
915  return false;
916  }
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:920
bool IsFriendlyTo(Unit const *unit) const
Definition: Unit.cpp:7170
Unit const * i_funit
Definition: GridNotifiers.h:919
WorldObject const * i_obj
Definition: GridNotifiers.h:918
bool CanSeeOrDetect(WorldObject const *obj, bool ignoreStealth=false, bool distanceCheck=false, bool checkAlert=false) const
Definition: Object.cpp:1940
bool isTargetableForAttack(bool checkFakeDeath=true) const
Definition: Unit.cpp:9987

+ Here is the call graph for this function:

Member Data Documentation

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

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