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

#include "GridNotifiers.h"

Public Member Functions

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

Private Attributes

Unit const * unit
 
float fRange
 

Detailed Description

Constructor & Destructor Documentation

◆ PlayerAtMinimumRangeAway()

Acore::PlayerAtMinimumRangeAway::PlayerAtMinimumRangeAway ( Unit const *  unit,
float  fMinRange 
)
inline
1585: unit(unit), fRange(fMinRange) {}
float fRange
Definition GridNotifiers.h:1597
Unit const * unit
Definition GridNotifiers.h:1596

Member Function Documentation

◆ operator()()

bool Acore::PlayerAtMinimumRangeAway::operator() ( Player player)
inline
1587 {
1588 //No threat list check, must be done explicit if expected to be in combat with creature
1589 if (!player->IsGameMaster() && player->IsAlive() && !unit->IsWithinDist(player, fRange, false))
1590 return true;
1591
1592 return false;
1593 }
bool IsGameMaster() const
Definition Player.h:1166
bool IsAlive() const
Definition Unit.h:1710
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const
Definition Object.cpp:1321

References fRange, Unit::IsAlive(), Player::IsGameMaster(), WorldObject::IsWithinDist(), and unit.

Member Data Documentation

◆ fRange

float Acore::PlayerAtMinimumRangeAway::fRange
private

Referenced by operator()().

◆ unit

Unit const* Acore::PlayerAtMinimumRangeAway::unit
private

Referenced by operator()().


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