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

#include "GridNotifiers.h"

Public Member Functions

 PowerCheck (Powers const power, bool equals)
 
bool operator() (WorldObject const *object) const
 

Private Attributes

Powers const _power
 
bool const _equals
 

Detailed Description

Constructor & Destructor Documentation

◆ PowerCheck()

Acore::PowerCheck::PowerCheck ( Powers const  power,
bool  equals 
)
inlineexplicit
1677: _power(power), _equals(equals) { }
Powers const _power
Definition: GridNotifiers.h:1684
bool const _equals
Definition: GridNotifiers.h:1685

Member Function Documentation

◆ operator()()

bool Acore::PowerCheck::operator() ( WorldObject const *  object) const
inline
1679 {
1680 return object->ToUnit() && (object->ToUnit()->getPowerType() == _power) == _equals;
1681 }

References _equals, and _power.

Member Data Documentation

◆ _equals

bool const Acore::PowerCheck::_equals
private

Referenced by operator()().

◆ _power

Powers const Acore::PowerCheck::_power
private

Referenced by operator()().