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

Member Function Documentation

◆ operator()() [1/2]

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

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

◆ operator()() [2/2]

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

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