#include "ThreatManager.h"
◆ OnlineState
| Enumerator |
|---|
| ONLINE_STATE_ONLINE | |
| ONLINE_STATE_SUPPRESSED | |
| ONLINE_STATE_OFFLINE | |
@ ONLINE_STATE_ONLINE
Definition ThreatManager.h:268
@ ONLINE_STATE_OFFLINE
Definition ThreatManager.h:268
@ ONLINE_STATE_SUPPRESSED
Definition ThreatManager.h:268
◆ TauntState
| Enumerator |
|---|
| TAUNT_STATE_DETAUNT | |
| TAUNT_STATE_NONE | |
| TAUNT_STATE_TAUNT | |
std::uint32_t uint32
Definition Define.h:107
@ TAUNT_STATE_DETAUNT
Definition ThreatManager.h:267
@ TAUNT_STATE_TAUNT
Definition ThreatManager.h:267
@ TAUNT_STATE_NONE
Definition ThreatManager.h:267
◆ ThreatReference() [1/2]
292 :
295 {
297 }
Unit *const _owner
Definition ThreatManager.h:194
int32 _tempModifier
Definition ThreatManager.h:313
float _baseAmount
Definition ThreatManager.h:312
ThreatManager & _mgr
Definition ThreatManager.h:307
Creature *const _owner
Definition ThreatManager.h:306
Unit *const _victim
Definition ThreatManager.h:310
TauntState _taunted
Definition ThreatManager.h:314
OnlineState _online
Definition ThreatManager.h:311
◆ ~ThreatReference()
| virtual ThreatReference::~ThreatReference |
( |
| ) |
|
|
protectedvirtualdefault |
◆ ThreatReference() [2/2]
◆ AddThreat()
| void ThreatReference::AddThreat |
( |
float |
amount | ) |
|
◆ ClearThreat()
| void ThreatReference::ClearThreat |
( |
| ) |
|
◆ FlagsAllowFighting()
| bool ThreatReference::FlagsAllowFighting |
( |
Unit const * |
a, |
|
|
Unit const * |
b |
|
) |
| |
|
staticprotected |
◆ GetOnlineState()
◆ GetOwner()
| Creature * ThreatReference::GetOwner |
( |
| ) |
const |
|
inline |
◆ GetTauntState()
| TauntState ThreatReference::GetTauntState |
( |
| ) |
const |
|
inline |
bool IsTaunting() const
Definition ThreatManager.h:279
◆ GetThreat()
| float ThreatReference::GetThreat |
( |
| ) |
const |
|
inline |
◆ GetVictim()
| Unit * ThreatReference::GetVictim |
( |
| ) |
const |
|
inline |
◆ HeapNotifyDecreased()
| void ThreatReference::HeapNotifyDecreased |
( |
| ) |
|
|
protected |
◆ HeapNotifyIncreased()
| void ThreatReference::HeapNotifyIncreased |
( |
| ) |
|
|
protected |
◆ IsAvailable()
| bool ThreatReference::IsAvailable |
( |
| ) |
const |
|
inline |
◆ IsDetaunted()
| bool ThreatReference::IsDetaunted |
( |
| ) |
const |
|
inline |
◆ IsOffline()
| bool ThreatReference::IsOffline |
( |
| ) |
const |
|
inline |
◆ IsOnline()
| bool ThreatReference::IsOnline |
( |
| ) |
const |
|
inline |
◆ IsSuppressed()
| bool ThreatReference::IsSuppressed |
( |
| ) |
const |
|
inline |
◆ IsTaunting()
| bool ThreatReference::IsTaunting |
( |
| ) |
const |
|
inline |
◆ ModifyThreatByPercent()
| void ThreatReference::ModifyThreatByPercent |
( |
int32 |
percent | ) |
|
|
inline |
284{
if (percent)
ScaleThreat(0.01f *
float(100 + percent)); }
void ScaleThreat(float factor)
Definition ThreatManager.cpp:63
◆ operator=()
◆ ScaleThreat()
| void ThreatReference::ScaleThreat |
( |
float |
factor | ) |
|
◆ ShouldBeOffline()
| bool ThreatReference::ShouldBeOffline |
( |
| ) |
const |
|
protected |
113{
115 return true;
117 return true;
119 return true;
120 return false;
121}
bool _IsTargetAcceptable(Unit const *target) const
Definition Creature.cpp:2489
bool CanCreatureAttack(Unit const *victim, bool skipDistCheck=false) const
Definition Creature.cpp:2557
static bool FlagsAllowFighting(Unit const *a, Unit const *b)
Definition ThreatManager.cpp:95
bool CanSeeOrDetect(WorldObject const *obj, bool ignoreStealth=false, bool distanceCheck=false, bool checkAlert=false) const
Definition Object.cpp:1750
References Creature::_IsTargetAcceptable(), _owner, _victim, Creature::CanCreatureAttack(), WorldObject::CanSeeOrDetect(), and FlagsAllowFighting().
Referenced by ThreatManager::GetCurrentVictim(), ThreatManager::GetLastVictim(), and UpdateOffline().
◆ ShouldBeSuppressed()
| bool ThreatReference::ShouldBeSuppressed |
( |
| ) |
const |
|
protected |
124{
126 return false;
128 return true;
130 return true;
132 return true;
133 return false;
134}
@ SPELL_AURA_MOD_CONFUSE
Definition SpellAuraDefines.h:68
@ SPELL_AURA_MOD_STUN
Definition SpellAuraDefines.h:75
SpellSchoolMask GetMeleeDamageSchoolMask(WeaponAttackType=BASE_ATTACK, uint8=0) const override
Definition Creature.h:163
bool HasAuraType(AuraType auraType) const
Definition Unit.cpp:5938
bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const
Definition Unit.cpp:9737
bool HasBreakableByDamageAuraType(AuraType type, uint32 excludeAura=0) const
Definition Unit.cpp:894
References _owner, _victim, Creature::GetMeleeDamageSchoolMask(), Unit::HasAuraType(), Unit::HasBreakableByDamageAuraType(), Unit::IsImmunedToDamage(), IsTaunting(), SPELL_AURA_MOD_CONFUSE, and SPELL_AURA_MOD_STUN.
Referenced by ThreatManager::AddThreat(), and UpdateOffline().
◆ UnregisterAndFree()
| void ThreatReference::UnregisterAndFree |
( |
| ) |
|
|
protected |
◆ UpdateOffline()
| void ThreatReference::UpdateOffline |
( |
| ) |
|
76{
79 return;
80
81 if (shouldBeOffline)
82 {
86 }
87 else
88 {
92 }
93}
void RegisterForAIUpdate(ObjectGuid const &guid)
Definition ThreatManager.h:215
void SendRemoveToClients(Unit const *victim) const
Definition ThreatManager.cpp:863
bool ShouldBeSuppressed() const
Definition ThreatManager.cpp:123
bool ShouldBeOffline() const
Definition ThreatManager.cpp:112
bool IsOffline() const
Definition ThreatManager.h:277
Unit * GetVictim() const
Definition ThreatManager.h:271
References _mgr, _online, _victim, GetVictim(), HeapNotifyDecreased(), HeapNotifyIncreased(), IsOffline(), ONLINE_STATE_OFFLINE, ONLINE_STATE_ONLINE, ONLINE_STATE_SUPPRESSED, ThreatManager::RegisterForAIUpdate(), ThreatManager::SendRemoveToClients(), ShouldBeOffline(), and ShouldBeSuppressed().
Referenced by ThreatManager::AddThreat(), and ThreatManager::ReselectVictim().
◆ UpdateTauntState()
◆ CompareThreatLessThan
◆ ThreatManager
◆ _baseAmount
| float ThreatReference::_baseAmount |
|
protected |
◆ _mgr
◆ _online
◆ _owner
◆ _taunted
◆ _tempModifier
| int32 ThreatReference::_tempModifier |
|
protected |
◆ _victim
| Unit* const ThreatReference::_victim |
|
protected |
The documentation for this class was generated from the following files: