#include <UnitAICommon.h>
◆ DefaultTargetSelector()
DefaultTargetSelector::DefaultTargetSelector |
( |
Unit const * |
unit, |
|
|
float |
dist, |
|
|
bool |
playerOnly, |
|
|
bool |
withMainTank, |
|
|
int32 |
aura |
|
) |
| |
27{
28}
bool _playerOnly
Definition: UnitAICommon.h:62
float _dist
Definition: UnitAICommon.h:61
Unit const * _me
Definition: UnitAICommon.h:60
int32 _aura
Definition: UnitAICommon.h:64
Unit const * _exception
Definition: UnitAICommon.h:63
◆ operator()()
bool DefaultTargetSelector::operator() |
( |
Unit const * |
target | ) |
const |
31{
33 return false;
34
35 if (!target)
36 return false;
37
39 return false;
40
42 return false;
43
45 return false;
46
47 if (_dist < 0.0f && _me->IsWithinCombatRange(target, -
_dist))
48 return false;
49
51 {
53 {
54 if (!target->HasAura(
_aura))
55 return false;
56 }
57 else
58 {
59 if (target->HasAura(-
_aura))
60 return false;
61 }
62 }
63
64 return true;
65}
@ TYPEID_PLAYER
Definition: ObjectGuid.h:39
bool IsWithinCombatRange(Unit const *obj, float dist2compare) const
Definition: Unit.cpp:617
◆ _aura
int32 DefaultTargetSelector::_aura |
|
private |
◆ _dist
float DefaultTargetSelector::_dist |
|
private |
◆ _exception
Unit const* DefaultTargetSelector::_exception |
|
private |
◆ _me
Unit const* DefaultTargetSelector::_me |
|
private |
◆ _playerOnly
bool DefaultTargetSelector::_playerOnly |
|
private |
The documentation for this struct was generated from the following files: