![]() |
TrinityCore
|
#include <ThreatManager.h>
Classes | |
| class | Heap |
| class | ThreatListIterator |
Public Member Functions | |
| ThreatManager (Unit *owner) | |
| ~ThreatManager () | |
| void | Initialize () |
| void | Update (uint32 tdiff) |
| 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 |
| uint32 | GetThreatListPlayerCount (bool includeOffline=false) 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, int32 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 () |
| void | UpdateMyTempModifiers () |
| void | UpdateMySpellSchoolModifiers () |
| void | RegisterRedirectThreat (uint32 spellId, ObjectGuid const &victim, uint32 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 |
| 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, uint32 > > | _redirectInfo |
| std::unordered_map< uint32, std::unordered_map< ObjectGuid, uint32 > > | _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 197 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 369 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Definition at line 678 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 177 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void ThreatManager::ClearAllThreat | ( | ) |
Definition at line 554 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
| void ThreatManager::ClearThreat | ( | ThreatReference * | ref | ) |
| void ThreatManager::ClearThreat | ( | Unit * | target | ) |
Definition at line 539 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Definition at line 669 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 565 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 734 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 244 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 229 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 579 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 237 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 |
| Trinity::IteratorPair< ThreatManager::ThreatListIterator, std::nullptr_t > ThreatManager::GetSortedThreatList | ( | ) | const |
| float ThreatManager::GetThreat | ( | Unit const * | who, |
| bool | includeOffline = false |
||
| ) | const |
Definition at line 271 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
| uint32 ThreatManager::GetThreatListPlayerCount | ( | bool | includeOffline = false | ) | const |
| size_t ThreatManager::GetThreatListSize | ( | ) | const |
| Trinity::IteratorPair< ThreatManager::ThreatListIterator, std::nullptr_t > ThreatManager::GetUnsortedThreatList | ( | ) | const |
Definition at line 295 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 211 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 332 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 490 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
delete |
|
private |
Definition at line 657 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 887 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 863 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
| void ThreatManager::RegisterRedirectThreat | ( | uint32 | spellId, |
| ObjectGuid const & | victim, | ||
| uint32 | pct | ||
| ) |
== REDIRECT SYSTEM ==
Definition at line 799 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void ThreatManager::RemoveMeFromThreatLists | ( | ) |
|
private |
Definition at line 602 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::ScaleThreat | ( | Unit * | target, |
| float | factor | ||
| ) |
|
private |
Definition at line 827 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 834 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 842 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 510 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 805 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 216 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 792 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 771 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 587 of file ThreatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
friend |
Definition at line 255 of file ThreatManager.h.
|
friend |
Definition at line 256 of file ThreatManager.h.
|
friend |
Definition at line 253 of file ThreatManager.h.
|
friend |
Definition at line 254 of file ThreatManager.h.
|
private |
Definition at line 214 of file ThreatManager.h.
|
private |
Definition at line 215 of file ThreatManager.h.
|
mutableprivate |
Definition at line 222 of file ThreatManager.h.
|
private |
Definition at line 203 of file ThreatManager.h.
|
private |
Definition at line 200 of file ThreatManager.h.
|
private |
Definition at line 209 of file ThreatManager.h.
|
private |
Definition at line 184 of file ThreatManager.h.
|
private |
Definition at line 185 of file ThreatManager.h.
|
private |
Definition at line 226 of file ThreatManager.h.
|
private |
Definition at line 227 of file ThreatManager.h.
|
private |
Definition at line 221 of file ThreatManager.h.
|
private |
Definition at line 202 of file ThreatManager.h.
|
private |
Definition at line 220 of file ThreatManager.h.
|
private |
Definition at line 201 of file ThreatManager.h.
|
staticprivate |
Definition at line 187 of file ThreatManager.h.
|
static |
Definition at line 86 of file ThreatManager.h.