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
1550: unit(unit), fRange(fMinRange) {}
float fRange
Definition: GridNotifiers.h:1562
Unit const * unit
Definition: GridNotifiers.h:1561

Member Function Documentation

◆ operator()()

bool Acore::PlayerAtMinimumRangeAway::operator() ( Player player)
inline
1552 {
1553 //No threat list check, must be done explicit if expected to be in combat with creature
1554 if (!player->IsGameMaster() && player->IsAlive() && !unit->IsWithinDist(player, fRange, false))
1555 return true;
1556
1557 return false;
1558 }
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const
Definition: Object.cpp:1316
bool IsGameMaster() const
Definition: Player.h:1148
bool IsAlive() const
Definition: Unit.h:1822

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()().