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

Member Function Documentation

◆ operator()()

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

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