AzeorthCore 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
1628: _present(present), _spellId(spellId), _casterGUID(casterGUID) {}
uint32 _spellId
Definition: GridNotifiers.h:1641
ObjectGuid _casterGUID
Definition: GridNotifiers.h:1642
bool _present
Definition: GridNotifiers.h:1640

Member Function Documentation

◆ operator()() [1/2]

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

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

◆ operator()() [2/2]

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

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