![]() |
AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "ThreatMgr.h"
Public Types | |
| typedef std::list< HostileReference * > | StorageType |
Public Member Functions | |
| ThreatContainer ()=default | |
| ~ThreatContainer () | |
| HostileReference * | AddThreat (Unit *victim, float threat) |
| void | ModifyThreatByPercent (Unit *victim, int32 percent) |
| HostileReference * | SelectNextVictim (Creature *attacker, HostileReference *currentVictim) const |
| HostileReference * | SelectNextVictimTieBreaker (Creature *attacker, ThreatContainer::StorageType::const_iterator currentIter, bool noPriorityTargetFound) const |
| bool | IsPreferredTarget (Creature *attacker, Unit *target) const |
| void | setDirty (bool isDirty) |
| bool | isDirty () const |
| bool | empty () const |
| HostileReference * | getMostHated () const |
| HostileReference * | getReferenceByTarget (Unit const *victim) const |
| HostileReference * | getReferenceByTarget (ObjectGuid const &guid) const |
| StorageType const & | GetThreatList () const |
Private Member Functions | |
| void | remove (HostileReference *hostileRef) |
| void | addReference (HostileReference *hostileRef) |
| void | clearReferences () |
| void | update () |
Private Attributes | |
| StorageType | iThreatList |
| bool | iDirty {false} |
Friends | |
| class | ThreatMgr |
| typedef std::list<HostileReference*> ThreatContainer::StorageType |
|
default |
|
inline |
References clearReferences().
|
inlineprivate |
References iThreatList.
Referenced by ThreatMgr::_addThreat(), and ThreatMgr::processThreatEvent().
| HostileReference * ThreatContainer::AddThreat | ( | Unit * | victim, |
| float | threat | ||
| ) |
References HostileReference::AddThreat(), and getReferenceByTarget().
Referenced by ThreatMgr::_addThreat().
|
private |
References iThreatList.
Referenced by ThreatMgr::clearReferences(), and ~ThreatContainer().
|
inline |
References iThreatList.
Referenced by ThreatMgr::areThreatListsEmpty(), Spell::EffectTaunt(), and ThreatMgr::isThreatListEmpty().
|
inline |
References iThreatList.
Referenced by Spell::EffectTaunt().
| HostileReference * ThreatContainer::getReferenceByTarget | ( | ObjectGuid const & | guid | ) | const |
References HostileReference::getUnitGuid(), and iThreatList.
| HostileReference * ThreatContainer::getReferenceByTarget | ( | Unit const * | victim | ) | const |
References Object::GetGUID(), and getReferenceByTarget().
Referenced by AddThreat(), Spell::EffectTaunt(), ThreatMgr::FindReference(), getReferenceByTarget(), ThreatMgr::GetThreat(), ThreatMgr::getThreatWithoutTemp(), ModifyThreatByPercent(), boss_priestess_lackey_commonAI::RecalculateThreat(), boss_faction_championsAI::RecalculateThreat(), ThreatMgr::tauntApply(), and ThreatMgr::tauntFadeOut().
|
inline |
|
inline |
References AURA_INTERRUPT_FLAG_TAKE_DAMAGE, Object::GetGUID(), Creature::GetMeleeDamageSchoolMask(), Unit::HasAuraTypeWithCaster(), Unit::HasNegativeAuraWithInterruptFlag(), Unit::HasUnitState(), Creature::IsCombatMovementAllowed(), Unit::IsImmunedToDamageOrSchool(), Unit::IsWithinMeleeRange(), SPELL_AURA_IGNORED, UNIT_STATE_CONFUSED, and UNIT_STATE_ROOT.
Referenced by SelectNextVictim(), and SelectNextVictimTieBreaker().
References HostileReference::addThreatPercent(), and getReferenceByTarget().
Referenced by ThreatMgr::ModifyThreatByPercent().
|
inlineprivate |
References iThreatList.
Referenced by ThreatMgr::processThreatEvent().
| HostileReference * ThreatContainer::SelectNextVictim | ( | Creature * | attacker, |
| HostileReference * | currentVictim | ||
| ) | const |
References ASSERT, Creature::CanCreatureAttack(), Reference< TO, FROM >::getTarget(), HostileReference::GetThreat(), IsPreferredTarget(), Unit::IsWithinMeleeRange(), iThreatList, and SelectNextVictimTieBreaker().
Referenced by ThreatMgr::getHostileTarget().
| HostileReference * ThreatContainer::SelectNextVictimTieBreaker | ( | Creature * | attacker, |
| ThreatContainer::StorageType::const_iterator | currentIter, | ||
| bool | noPriorityTargetFound | ||
| ) | const |
References Creature::CanCreatureAttack(), Position::GetExactDistSq(), Reference< TO, FROM >::getTarget(), HostileReference::GetThreat(), IsPreferredTarget(), and iThreatList.
Referenced by SelectNextVictim().
|
inline |
|
private |
References iDirty, and iThreatList.
Referenced by ThreatMgr::getHostileTarget().
|
friend |
|
private |
Referenced by isDirty(), setDirty(), and update().
|
private |