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

#include "GridNotifiers.h"

Public Member Functions

 UnitAuraCheck (bool present, uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty)
 
bool operator() (Unit const *unit) const
 
bool operator() (WorldObject const *object) const
 

Private Attributes

bool _present
 
uint32 _spellId
 
ObjectGuid _casterGUID
 

Detailed Description

Constructor & Destructor Documentation

◆ UnitAuraCheck()

Acore::UnitAuraCheck::UnitAuraCheck ( bool  present,
uint32  spellId,
ObjectGuid  casterGUID = ObjectGuid::Empty 
)
inline
1625: _present(present), _spellId(spellId), _casterGUID(casterGUID) {}
uint32 _spellId
Definition: GridNotifiers.h:1638
ObjectGuid _casterGUID
Definition: GridNotifiers.h:1639
bool _present
Definition: GridNotifiers.h:1637

Member Function Documentation

◆ operator()() [1/2]

bool Acore::UnitAuraCheck::operator() ( Unit const *  unit) const
inline
1627 {
1628 return unit->HasAura(_spellId, _casterGUID) == _present;
1629 }

References _casterGUID, _present, _spellId, and Unit::HasAura().

◆ operator()() [2/2]

bool Acore::UnitAuraCheck::operator() ( WorldObject const *  object) const
inline
1632 {
1633 return object->ToUnit() && object->ToUnit()->HasAura(_spellId, _casterGUID) == _present;
1634 }

References _casterGUID, _present, and _spellId.

Member Data Documentation

◆ _casterGUID

ObjectGuid Acore::UnitAuraCheck::_casterGUID
private

Referenced by operator()().

◆ _present

bool Acore::UnitAuraCheck::_present
private

Referenced by operator()().

◆ _spellId

uint32 Acore::UnitAuraCheck::_spellId
private

Referenced by operator()().