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
212: _me(unit), _targetClass(targetClass) { }
Unit const * _me
Definition boss_nefarian.cpp:230
uint8 _targetClass
Definition boss_nefarian.cpp:231

Member Function Documentation

◆ operator()()

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

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


The documentation for this struct was generated from the following file: