AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
ClassCallSelector Struct Reference
Inheritance diagram for ClassCallSelector:
Acore::unary_function< Unit *, bool >

Public Member Functions

 ClassCallSelector (Unit const *unit, uint8 targetClass)
 
bool operator() (Unit const *target) const
 

Private Attributes

Unit const * _me
 
uint8 _targetClass
 

Additional Inherited Members

- Public Types inherited from Acore::unary_function< Unit *, bool >
typedef Unitargument_type
 
typedef bool result_type
 

Detailed Description

Constructor & Destructor Documentation

◆ ClassCallSelector()

ClassCallSelector::ClassCallSelector ( Unit const *  unit,
uint8  targetClass 
)
inline
211: _me(unit), _targetClass(targetClass) { }
Unit const * _me
Definition: boss_nefarian.cpp:229
uint8 _targetClass
Definition: boss_nefarian.cpp:230

Member Function Documentation

◆ operator()()

bool ClassCallSelector::operator() ( Unit const *  target) const
inline
214 {
215 if (!_me || !target || !target->IsPlayer())
216 {
217 return false;
218 }
219
220 if (target->getClass() != _targetClass)
221 {
222 return false;
223 }
224
225 return true;
226 }
bool IsPlayer() const
Definition: Object.h:197

References _me, _targetClass, Unit::getClass(), and Object::IsPlayer().

Member Data Documentation

◆ _me

Unit const* ClassCallSelector::_me
private

Referenced by operator()().

◆ _targetClass

uint8 ClassCallSelector::_targetClass
private

Referenced by operator()().