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

#include "GridNotifiers.h"

Public Member Functions

 NearestVisibleDetectableContestedGuardUnitCheck (Unit const *unit)
 
bool operator() (Unit *u)
 

Private Member Functions

 NearestVisibleDetectableContestedGuardUnitCheck (NearestVisibleDetectableContestedGuardUnitCheck const &)
 

Private Attributes

Unit const * me
 

Detailed Description

Constructor & Destructor Documentation

◆ NearestVisibleDetectableContestedGuardUnitCheck() [1/2]

Acore::NearestVisibleDetectableContestedGuardUnitCheck::NearestVisibleDetectableContestedGuardUnitCheck ( Unit const *  unit)
inlineexplicit
1244: me(unit) {}
Unit const * me
Definition: GridNotifiers.h:1261

◆ NearestVisibleDetectableContestedGuardUnitCheck() [2/2]

Acore::NearestVisibleDetectableContestedGuardUnitCheck::NearestVisibleDetectableContestedGuardUnitCheck ( NearestVisibleDetectableContestedGuardUnitCheck const &  )
private

Member Function Documentation

◆ operator()()

bool Acore::NearestVisibleDetectableContestedGuardUnitCheck::operator() ( Unit u)
inline
1246 {
1247 if (!u->CanSeeOrDetect(me, true, true, false))
1248 {
1249 return false;
1250 }
1251
1252 if (!u->IsContestedGuard())
1253 {
1254 return false;
1255 }
1256
1257 return true;
1258 }
bool CanSeeOrDetect(WorldObject const *obj, bool ignoreStealth=false, bool distanceCheck=false, bool checkAlert=false) const
Definition: Object.cpp:1737
bool IsContestedGuard() const
Definition: Unit.h:973

References WorldObject::CanSeeOrDetect(), Unit::IsContestedGuard(), and me.

Member Data Documentation

◆ me

Unit const* Acore::NearestVisibleDetectableContestedGuardUnitCheck::me
private

Referenced by operator()().