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

#include "GridNotifiers.h"

Public Member Functions

 AllFriendlyCreaturesInGrid (Unit const *obj)
 
bool operator() (Unit *u)
 

Private Attributes

Unit const * unit
 

Detailed Description

Constructor & Destructor Documentation

◆ AllFriendlyCreaturesInGrid()

Acore::AllFriendlyCreaturesInGrid::AllFriendlyCreaturesInGrid ( Unit const *  obj)
inline
1431: unit(obj) {}
Unit const * unit
Definition: GridNotifiers.h:1440

Member Function Documentation

◆ operator()()

bool Acore::AllFriendlyCreaturesInGrid::operator() ( Unit u)
inline
1433 {
1434 if (u->IsAlive() && u->IsVisible() && u->IsFriendlyTo(unit))
1435 return true;
1436
1437 return false;
1438 }
bool IsAlive() const
Definition: Unit.h:1654
bool IsVisible() const
Definition: Unit.h:1876
bool IsFriendlyTo(Unit const *unit) const
Definition: Unit.cpp:10241

References Unit::IsAlive(), Unit::IsFriendlyTo(), Unit::IsVisible(), and unit.

Member Data Documentation

◆ unit

Unit const* Acore::AllFriendlyCreaturesInGrid::unit
private

Referenced by operator()().