#include "UnitAI.h"
◆ DefaultTargetSelector()
DefaultTargetSelector::DefaultTargetSelector |
( |
Unit const * |
unit, |
|
|
float |
dist, |
|
|
bool |
playerOnly, |
|
|
bool |
withMainTank, |
|
|
int32 |
aura |
|
) |
| |
|
inline |
Unit * GetCurrentVictim() const
Definition ThreatMgr.h:212
ThreatMgr & GetThreatMgr()
Definition Unit.h:912
Unit const * me
Definition UnitAI.h:55
float m_dist
Definition UnitAI.h:56
int32 m_aura
Definition UnitAI.h:59
bool m_playerOnly
Definition UnitAI.h:58
Unit const * except
Definition UnitAI.h:57
◆ operator()()
bool DefaultTargetSelector::operator() |
( |
Unit const * |
target | ) |
const |
|
inline |
69 {
71 return false;
72
73 if (!target)
74 return false;
75
77 return false;
78
80 return false;
81
83 return false;
84
85 if (m_dist < 0.0f && me->IsWithinCombatRange(target, -
m_dist))
86 return false;
87
89 {
91 {
92 if (!target->HasAura(
m_aura))
93 return false;
94 }
95 else
96 {
97 if (target->HasAura(-
m_aura))
98 return false;
99 }
100 }
101
102 return true;
103 }
bool IsWithinCombatRange(Unit const *obj, float dist2compare) const
Definition Unit.cpp:648
References except, Unit::HasAura(), Object::IsPlayer(), Unit::IsWithinCombatRange(), m_aura, m_dist, m_playerOnly, and me.
◆ except
Unit const* DefaultTargetSelector::except |
◆ m_aura
int32 DefaultTargetSelector::m_aura |
◆ m_dist
float DefaultTargetSelector::m_dist |
◆ m_playerOnly
bool DefaultTargetSelector::m_playerOnly |
◆ me
Unit const* DefaultTargetSelector::me |
The documentation for this struct was generated from the following file:
- azerothcore-wotlk/src/server/game/AI/CoreAI/UnitAI.h