AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::AnyUnitInObjectRangeCheck Class Reference

#include "GridNotifiers.h"

Public Member Functions

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

Private Attributes

WorldObject const * i_obj
 
float i_range
 

Detailed Description

Constructor & Destructor Documentation

◆ AnyUnitInObjectRangeCheck()

Acore::AnyUnitInObjectRangeCheck::AnyUnitInObjectRangeCheck ( WorldObject const *  obj,
float  range 
)
inline
1038: i_obj(obj), i_range(range) {}
WorldObject const * i_obj
Definition: GridNotifiers.h:1047
float i_range
Definition: GridNotifiers.h:1048

Member Function Documentation

◆ operator()()

bool Acore::AnyUnitInObjectRangeCheck::operator() ( Unit u)
inline
1040 {
1041 if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range))
1042 return true;
1043
1044 return false;
1045 }
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const
Definition: Object.cpp:1332
bool IsAlive() const
Definition: Unit.h:1654

References i_obj, i_range, Unit::IsAlive(), and WorldObject::IsWithinDistInMap().

Member Data Documentation

◆ i_obj

WorldObject const* Acore::AnyUnitInObjectRangeCheck::i_obj
private

Referenced by operator()().

◆ i_range

float Acore::AnyUnitInObjectRangeCheck::i_range
private

Referenced by operator()().