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

#include "GridNotifiers.h"

Public Member Functions

 AllDeadCreaturesInRange (WorldObject const *obj, float range, bool reqAlive=true)
 
bool operator() (Unit *unit) const
 

Private Attributes

WorldObject const * _obj
 
float _range
 
bool _reqAlive
 

Detailed Description

Constructor & Destructor Documentation

◆ AllDeadCreaturesInRange()

Acore::AllDeadCreaturesInRange::AllDeadCreaturesInRange ( WorldObject const *  obj,
float  range,
bool  reqAlive = true 
)
inline
1560: _obj(obj), _range(range), _reqAlive(reqAlive) {}
float _range
Definition GridNotifiers.h:1577
WorldObject const * _obj
Definition GridNotifiers.h:1576
bool _reqAlive
Definition GridNotifiers.h:1578

Member Function Documentation

◆ operator()()

bool Acore::AllDeadCreaturesInRange::operator() ( Unit unit) const
inline
1563 {
1564 if (_reqAlive && unit->IsAlive())
1565 {
1566 return false;
1567 }
1568 if (!_obj->IsWithinDistInMap(unit, _range))
1569 {
1570 return false;
1571 }
1572 return true;
1573 }
bool IsAlive() const
Definition Unit.h:1748
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition Object.cpp:1354

References _obj, _range, _reqAlive, Unit::IsAlive(), and WorldObject::IsWithinDistInMap().

Member Data Documentation

◆ _obj

WorldObject const* Acore::AllDeadCreaturesInRange::_obj
private

Referenced by operator()().

◆ _range

float Acore::AllDeadCreaturesInRange::_range
private

Referenced by operator()().

◆ _reqAlive

bool Acore::AllDeadCreaturesInRange::_reqAlive
private

Referenced by operator()().


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