![]() |
TrinityCore
|
#include <ThreatManager.h>
Classes | |
| class | Heap |
| class | ThreatListIterator |
Public Member Functions | |
| ThreatManager (Unit *owner) | |
| ~ThreatManager () | |
| void | Initialize () |
| void | Update (uint32 tdiff) |
| void | ResetUpdateTimer () |
| Unit * | GetOwner () const |
| bool | CanHaveThreatList () const |
| Unit * | GetCurrentVictim () |
| Unit * | GetLastVictim () const |
| Unit * | GetAnyTarget () const |
| bool | IsThreatListEmpty (bool includeOffline=false) const |
| bool | IsThreatenedBy (ObjectGuid const &who, bool includeOffline=false) const |
| bool | IsThreatenedBy (Unit const *who, bool includeOffline=false) const |
| float | GetThreat (Unit const *who, bool includeOffline=false) const |
| size_t | GetThreatListSize () const |
| Trinity::IteratorPair< ThreatListIterator, std::nullptr_t > | GetUnsortedThreatList () const |
| Trinity::IteratorPair< ThreatListIterator, std::nullptr_t > | GetSortedThreatList () const |
| std::vector< ThreatReference * > | GetModifiableThreatList () |
| bool | IsThreateningAnyone (bool includeOffline=false) const |
| bool | IsThreateningTo (ObjectGuid const &who, bool includeOffline=false) const |
| bool | IsThreateningTo (Unit const *who, bool includeOffline=false) const |
| auto const & | GetThreatenedByMeList () const |
| void | EvaluateSuppressed (bool canExpire=false) |
| void | AddThreat (Unit *target, float amount, SpellInfo const *spell=nullptr, bool ignoreModifiers=false, bool ignoreRedirects=false) |
| == AFFECT MY THREAT LIST == | |
| void | ScaleThreat (Unit *target, float factor) |
| void | ModifyThreatByPercent (Unit *target, float percent) |
| void | ResetThreat (Unit *target) |
| void | MatchUnitThreatToHighestThreat (Unit *target) |
| void | TauntUpdate () |
| void | ResetAllThreat () |
| void | ClearThreat (Unit *target) |
| void | ClearThreat (ThreatReference *ref) |
| void | ClearAllThreat () |
| void | FixateTarget (Unit *target) |
| void | ClearFixate () |
| Unit * | GetFixateTarget () const |
| void | ForwardThreatForAssistingMe (Unit *assistant, float baseAmount, SpellInfo const *spell=nullptr, bool ignoreModifiers=false) |
| == AFFECT OTHERS' THREAT LISTS == | |
| void | RemoveMeFromThreatLists (bool(*unitFilter)(Unit const *otherUnit)) |
| void | UpdateMyTempModifiers () |
| void | UpdateMySpellSchoolModifiers () |
| void | RegisterRedirectThreat (uint32 spellId, ObjectGuid const &victim, float pct) |
| == REDIRECT SYSTEM == | |
| void | UnregisterRedirectThreat (uint32 spellId) |
| void | UnregisterRedirectThreat (uint32 spellId, ObjectGuid const &victim) |
| ThreatManager (ThreatManager const &)=delete | |
| ThreatManager & | operator= (ThreatManager const &)=delete |
Static Public Member Functions | |
| static bool | CanHaveThreatList (Unit const *who) |
Static Public Attributes | |
| static const uint32 | THREAT_UPDATE_INTERVAL = 1000u |
Private Member Functions | |
| void | SendClearAllThreatToClients () const |
| void | SendRemoveToClients (Unit const *victim) const |
| void | SendThreatListToClients (bool newHighest) const |
| void | PutThreatListRef (ObjectGuid const &guid, ThreatReference *ref) |
| == MY THREAT LIST == | |
| void | PurgeThreatListRef (ObjectGuid const &guid) |
| void | ProcessAIUpdates () |
| void | RegisterForAIUpdate (ObjectGuid const &guid) |
| void | UpdateVictim () |
| ThreatReference const * | ReselectVictim () |
| void | PutThreatenedByMeRef (ObjectGuid const &guid, ThreatReference *ref) |
| == OTHERS' THREAT LISTS == | |
| void | PurgeThreatenedByMeRef (ObjectGuid const &guid) |
| void | UpdateRedirectInfo () |
Static Private Member Functions | |
| static bool | CompareReferencesLT (ThreatReference const *a, ThreatReference const *b, float aWeight) |
| static float | CalculateModifiedThreat (float threat, Unit const *victim, SpellInfo const *spell) |
Private Attributes | |
| Unit *const | _owner |
| bool | _ownerCanHaveThreatList |
| bool | _needClientUpdate |
| bool | _needThreatClearUpdate |
| uint32 | _updateTimer |
| std::unique_ptr< Heap > | _sortedThreatList |
| std::unordered_map< ObjectGuid, ThreatReference * > | _myThreatListEntries |
| std::vector< ObjectGuid > | _needsAIUpdate |
| ThreatReference const * | _currentVictimRef |
| ThreatReference const * | _fixateRef |
| std::unordered_map< ObjectGuid, ThreatReference * > | _threatenedByMe |
| std::array< float, MAX_SPELL_SCHOOL > | _singleSchoolModifiers |
| std::unordered_map< std::underlying_type< SpellSchoolMask >::type, float > | _multiSchoolModifiers |
| std::vector< std::pair< ObjectGuid, float > > | _redirectInfo |
| std::unordered_map< uint32, std::unordered_map< ObjectGuid, float > > | _redirectRegistry |
Static Private Attributes | |
| static const CompareThreatLessThan | CompareThreat |
Friends | |
| class | ThreatReference |
| class | ThreatReferenceImpl |
| struct | CompareThreatLessThan |
| class | debug_commandscript |
Definition at line 81 of file ThreatManager.h.
| ThreatManager::ThreatManager | ( | Unit * | owner | ) |
Definition at line 196 of file ThreatManager.cpp.
| ThreatManager::~ThreatManager | ( | ) |
|
delete |
| void ThreatManager::AddThreat | ( | Unit * | target, |
| float | amount, | ||
| SpellInfo const * | spell = nullptr, |
||
| bool | ignoreModifiers = false, |
||
| bool | ignoreRedirects = false |
||
| ) |
== AFFECT MY THREAT LIST ==
Definition at line 371 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Definition at line 666 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
|
static |
Definition at line 172 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void ThreatManager::ClearAllThreat | ( | ) |
|
inline |
| void ThreatManager::ClearThreat | ( | ThreatReference * | ref | ) |
| void ThreatManager::ClearThreat | ( | Unit * | target | ) |
Definition at line 522 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Definition at line 657 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void ThreatManager::EvaluateSuppressed | ( | bool | canExpire = false | ) |
| void ThreatManager::FixateTarget | ( | Unit * | target | ) |
Definition at line 548 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void ThreatManager::ForwardThreatForAssistingMe | ( | Unit * | assistant, |
| float | baseAmount, | ||
| SpellInfo const * | spell = nullptr, |
||
| bool | ignoreModifiers = false |
||
| ) |
== AFFECT OTHERS' THREAT LISTS ==
Definition at line 722 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Unit * ThreatManager::GetAnyTarget | ( | ) | const |
Definition at line 257 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Unit * ThreatManager::GetCurrentVictim | ( | ) |
Definition at line 242 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Unit * ThreatManager::GetFixateTarget | ( | ) | const |
Definition at line 562 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Unit * ThreatManager::GetLastVictim | ( | ) | const |
Definition at line 250 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< ThreatReference * > ThreatManager::GetModifiableThreatList | ( | ) |
|
inline |
Definition at line 103 of file ThreatManager.h.
| Trinity::IteratorPair< ThreatManager::ThreatListIterator, std::nullptr_t > ThreatManager::GetSortedThreatList | ( | ) | const |
| float ThreatManager::GetThreat | ( | Unit const * | who, |
| bool | includeOffline = false |
||
| ) | const |
Definition at line 284 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
| size_t ThreatManager::GetThreatListSize | ( | ) | const |
| Trinity::IteratorPair< ThreatManager::ThreatListIterator, std::nullptr_t > ThreatManager::GetUnsortedThreatList | ( | ) | const |
Definition at line 297 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void ThreatManager::Initialize | ( | ) |
Definition at line 210 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| bool ThreatManager::IsThreatenedBy | ( | ObjectGuid const & | who, |
| bool | includeOffline = false |
||
| ) | const |
| bool ThreatManager::IsThreatenedBy | ( | Unit const * | who, |
| bool | includeOffline = false |
||
| ) | const |
| bool ThreatManager::IsThreateningAnyone | ( | bool | includeOffline = false | ) | const |
Definition at line 334 of file ThreatManager.cpp.
| bool ThreatManager::IsThreateningTo | ( | ObjectGuid const & | who, |
| bool | includeOffline = false |
||
| ) | const |
| bool ThreatManager::IsThreateningTo | ( | Unit const * | who, |
| bool | includeOffline = false |
||
| ) | const |
| bool ThreatManager::IsThreatListEmpty | ( | bool | includeOffline = false | ) | const |
| void ThreatManager::MatchUnitThreatToHighestThreat | ( | Unit * | target | ) |
Definition at line 473 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
|
delete |
|
private |
Definition at line 640 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
|
private |
|
private |
== OTHERS' THREAT LISTS ==
Definition at line 898 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
== MY THREAT LIST ==
Definition at line 874 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
| void ThreatManager::RegisterRedirectThreat | ( | uint32 | spellId, |
| ObjectGuid const & | victim, | ||
| float | pct | ||
| ) |
== REDIRECT SYSTEM ==
Definition at line 790 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void ThreatManager::RemoveMeFromThreatLists | ( | bool(*)(Unit const *otherUnit) | unitFilter | ) |
|
private |
Definition at line 585 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void ThreatManager::ResetAllThreat | ( | ) |
|
inline |
| void ThreatManager::ResetUpdateTimer | ( | ) |
| void ThreatManager::ScaleThreat | ( | Unit * | target, |
| float | factor | ||
| ) |
|
private |
Definition at line 818 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 828 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 839 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void ThreatManager::TauntUpdate | ( | ) |
Definition at line 493 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void ThreatManager::UnregisterRedirectThreat | ( | uint32 | spellId | ) |
Definition at line 796 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void ThreatManager::UnregisterRedirectThreat | ( | uint32 | spellId, |
| ObjectGuid const & | victim | ||
| ) |
| void ThreatManager::Update | ( | uint32 | tdiff | ) |
Definition at line 215 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void ThreatManager::UpdateMySpellSchoolModifiers | ( | ) |
Definition at line 783 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void ThreatManager::UpdateMyTempModifiers | ( | ) |
Definition at line 762 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
|
private |
Definition at line 570 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
friend |
Definition at line 258 of file ThreatManager.h.
|
friend |
Definition at line 259 of file ThreatManager.h.
|
friend |
Definition at line 256 of file ThreatManager.h.
|
friend |
Definition at line 257 of file ThreatManager.h.
|
private |
Definition at line 217 of file ThreatManager.h.
|
private |
Definition at line 218 of file ThreatManager.h.
|
mutableprivate |
Definition at line 225 of file ThreatManager.h.
|
private |
Definition at line 206 of file ThreatManager.h.
|
private |
Definition at line 202 of file ThreatManager.h.
|
private |
Definition at line 212 of file ThreatManager.h.
|
private |
Definition at line 203 of file ThreatManager.h.
|
private |
Definition at line 186 of file ThreatManager.h.
|
private |
Definition at line 187 of file ThreatManager.h.
|
private |
Definition at line 229 of file ThreatManager.h.
|
private |
Definition at line 230 of file ThreatManager.h.
|
private |
Definition at line 224 of file ThreatManager.h.
|
private |
Definition at line 205 of file ThreatManager.h.
|
private |
Definition at line 223 of file ThreatManager.h.
|
private |
Definition at line 204 of file ThreatManager.h.
|
staticprivate |
Definition at line 189 of file ThreatManager.h.
|
static |
Definition at line 86 of file ThreatManager.h.