![]() |
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 |
| 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, 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.
References _singleSchoolModifiers, and MAX_SPELL_SCHOOL.
| ThreatManager::~ThreatManager | ( | ) |
Definition at line 203 of file ThreatManager.cpp.
References _myThreatListEntries, _owner, _sortedThreatList, _threatenedByMe, ASSERT, BaseEntity::GetGUID(), and ObjectGuid::ToString().
|
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 382 of file ThreatManager.cpp.
References _currentVictimRef, _myThreatListEntries, ThreatReference::_online, _owner, _redirectInfo, ThreatReference::AddThreat(), AddThreat(), CalculateModifiedThreat(), CalculatePct(), CanHaveThreatList(), Unit::GetCombatManager(), BaseEntity::GetGUID(), ThreatReference::GetOnlineState(), Unit::GetThreatManager(), ObjectAccessor::GetUnit(), SpellInfo::HasAttribute(), ThreatReference::HeapNotifyIncreased(), Unit::IsEngaged(), CombatManager::IsInCombatWith(), ThreatReference::IsOnline(), ThreatReference::ONLINE_STATE_ONLINE, ThreatReference::ONLINE_STATE_SUPPRESSED, ProcessAIUpdates(), PutThreatenedByMeRef(), PutThreatListRef(), CombatManager::SetInCombatWith(), ThreatReference::ShouldBeSuppressed(), SPELL_ATTR1_NO_THREAT, SPELL_ATTR2_NO_INITIAL_THREAT, ThreatReferenceImpl, ThreatReference::UpdateOffline(), and UpdateVictim().
Referenced by AddThreat(), ScriptedAI::AddThreat(), spell_opera_picnic_basket_smell::AfterRemove(), Spell::EffectThreat(), Unit::EngageWithTarget(), ForwardThreatForAssistingMe(), spell_leotheras_the_blind_whirlwind_init::HandleAfterCast(), AuraEffect::HandleAuraDummy(), spell_thaddius_magnetic_pull::HandleCast(), spell_auriaya_agro_creator::HandleDummyEffect(), spell_alysrazor_aggro_closest::spell_alysrazor_aggro_closest_SpellScript::HandleEffect(), spell_ulduar_random_aggro_periodic::HandleEffectPeriodic(), AuraEffect::HandlePeriodicManaLeechAuraTick(), spell_frostwarden_handler_focus_fire::HandleScript(), spell_the_lich_king_vile_spirit_move_target_search::HandleScript(), spell_sartura_whirlwind::HandleScript(), spell_toravon_random_aggro::HandleScript(), spell_leotheras_the_blind_whirlwind_effect::HandleScript(), Spell::HandleThreatSpells(), boss_blackheart_the_inciter_mc_dummy::IsSummonedBy(), MatchUnitThreatToHighestThreat(), SmartScript::ProcessAction(), and spell_putricide_ooze_channel::StartAttack().
|
staticprivate |
Definition at line 677 of file ThreatManager.cpp.
References _multiSchoolModifiers, _singleSchoolModifiers, SpellInfo::GetSchoolMask(), WorldObject::GetSpellModOwner(), Unit::GetThreatManager(), Unit::GetTotalAuraMultiplierByMiscMask(), Hate, SpellInfo::Id, SPELL_AURA_MOD_THREAT, SPELL_SCHOOL_ARCANE, SPELL_SCHOOL_FIRE, SPELL_SCHOOL_FROST, SPELL_SCHOOL_HOLY, SPELL_SCHOOL_MASK_ARCANE, SPELL_SCHOOL_MASK_FIRE, SPELL_SCHOOL_MASK_FROST, SPELL_SCHOOL_MASK_HOLY, SPELL_SCHOOL_MASK_NATURE, SPELL_SCHOOL_MASK_NORMAL, SPELL_SCHOOL_MASK_SHADOW, SPELL_SCHOOL_NATURE, SPELL_SCHOOL_NORMAL, SPELL_SCHOOL_SHADOW, and sSpellMgr.
Referenced by AddThreat().
|
inline |
Definition at line 106 of file ThreatManager.h.
Referenced by AddThreat(), Initialize(), and Update().
|
static |
Definition at line 172 of file ThreatManager.cpp.
References Unit::HasUnitTypeMask(), Unit::IsPet(), Unit::IsTotem(), Creature::IsTrigger(), Object::ToCreature(), Unit::ToTempSummon(), UNIT_MASK_ACCESSORY, UNIT_MASK_GUARDIAN, and UNIT_MASK_MINION.
Referenced by debug_commandscript::HandleDebugThreatListCommand().
| void ThreatManager::ClearAllThreat | ( | ) |
Definition at line 548 of file ThreatManager.cpp.
References _myThreatListEntries, and _needThreatClearUpdate.
Referenced by CombatManager::EndAllPvECombat().
|
inline |
Definition at line 165 of file ThreatManager.h.
Referenced by boss_ick::DoAction(), AuraEffect::HandleAuraModFixate(), and npc_pet_hunter_snake_trap::UpdateAI().
| void ThreatManager::ClearThreat | ( | ThreatReference * | ref | ) |
Definition at line 540 of file ThreatManager.cpp.
References _currentVictimRef, ThreatReference::_victim, SendRemoveToClients(), ThreatReference::UnregisterAndFree(), and UpdateVictim().
| void ThreatManager::ClearThreat | ( | Unit * | target | ) |
Definition at line 533 of file ThreatManager.cpp.
References _myThreatListEntries, ClearThreat(), and BaseEntity::GetGUID().
Referenced by ThreatReference::ClearThreat(), ClearThreat(), CombatReference::EndCombat(), and npc_enslaved_netherwing_drake::npc_enslaved_netherwing_drakeAI::SpellHit().
|
staticprivate |
Definition at line 668 of file ThreatManager.cpp.
References ThreatReference::_online, ThreatReference::_taunted, ThreatReference::GetThreat(), and GetThreat().
Referenced by CompareThreatLessThan::operator()(), and ReselectVictim().
| void ThreatManager::EvaluateSuppressed | ( | bool | canExpire = false | ) |
Definition at line 364 of file ThreatManager.cpp.
References _threatenedByMe, ThreatReference::ONLINE_STATE_ONLINE, and ThreatReference::ONLINE_STATE_SUPPRESSED.
Referenced by AuraEffect::HandleAuraModDmgImmunity(), AuraEffect::HandleAuraModSchoolImmunity(), AuraEffect::HandleAuraModStun(), AuraEffect::HandleAuraModStunAndDisableGravity(), AuraEffect::HandleModConfuse(), TauntUpdate(), and Creature::UpdateEntry().
| void ThreatManager::FixateTarget | ( | Unit * | target | ) |
Definition at line 559 of file ThreatManager.cpp.
References _fixateRef, _myThreatListEntries, and BaseEntity::GetGUID().
Referenced by AuraEffect::HandleAuraModFixate(), npc_suppresser::IsSummonedBy(), spell_putricide_ooze_channel::StartAttack(), and npc_pet_hunter_snake_trap::UpdateAI().
| void ThreatManager::ForwardThreatForAssistingMe | ( | Unit * | assistant, |
| float | baseAmount, | ||
| SpellInfo const * | spell = nullptr, |
||
| bool | ignoreModifiers = false |
||
| ) |
== AFFECT OTHERS' THREAT LISTS ==
Definition at line 733 of file ThreatManager.cpp.
References _threatenedByMe, AddThreat(), WorldObject::GetOwner(), Unit::GetThreatManager(), SpellInfo::HasAttribute(), Unit::HasUnitState(), SPELL_ATTR1_NO_THREAT, SPELL_ATTR4_NO_HELPFUL_THREAT, and UNIT_STATE_CONTROLLED.
Referenced by Spell::TargetInfo::DoDamageAndTriggers(), Unit::EnergizeBySpell(), AuraEffect::HandleObsModPowerAuraTick(), AuraEffect::HandlePeriodicEnergizeAuraTick(), AuraEffect::HandlePeriodicHealAurasTick(), AuraEffect::HandlePeriodicHealthLeechAuraTick(), Spell::HandleThreatSpells(), and Spell::PreprocessSpellHit().
| Unit * ThreatManager::GetAnyTarget | ( | ) | const |
Definition at line 257 of file ThreatManager.cpp.
References _sortedThreatList, and Unit::GetVictim().
Referenced by Creature::CallForHelp().
| Unit * ThreatManager::GetCurrentVictim | ( | ) |
Definition at line 242 of file ThreatManager.cpp.
References _currentVictimRef, ASSERT, ThreatReference::GetVictim(), ThreatReference::IsAvailable(), ThreatReference::ShouldBeOffline(), and UpdateVictim().
Referenced by boss_four_horsemen_baron::BeginFighting(), boss_four_horsemen_thane::BeginFighting(), Creature::CallForHelp(), boss_veknilash::boss_veknilashAI::CastSpellOnBug(), Spell::EffectTaunt(), boss_malchezaar::boss_malchezaarAI::EnfeebleHealthEffect(), spell_thaddius_magnetic_pull::HandleCast(), NonTankTargetSelector::operator()(), UnitAI::PrepareTargetListSelection(), boss_blood_queen_lana_thel::SelectRandomTarget(), Creature::SelectVictim(), boss_patchwerk::UpdateAI(), and boss_algalon_the_observer::UpdateAI().
| Unit * ThreatManager::GetFixateTarget | ( | ) | const |
Definition at line 573 of file ThreatManager.cpp.
References _fixateRef, and ThreatReference::GetVictim().
Referenced by debug_commandscript::HandleDebugThreatListCommand(), and npc_pet_hunter_snake_trap::UpdateAI().
| Unit * ThreatManager::GetLastVictim | ( | ) | const |
Definition at line 250 of file ThreatManager.cpp.
References _currentVictimRef, ThreatReference::GetVictim(), and ThreatReference::ShouldBeOffline().
| std::vector< ThreatReference * > ThreatManager::GetModifiableThreatList | ( | ) |
Definition at line 336 of file ThreatManager.cpp.
References _myThreatListEntries, and _sortedThreatList.
Referenced by npc_jaina_or_sylvanas_escape_hor::npc_jaina_or_sylvanas_escape_horAI::DeleteAllFromThreatList(), SmartScript::ProcessAction(), boss_patchwerk::UpdateAI(), and boss_faction_championsAI::UpdateThreat().
|
inline |
Definition at line 103 of file ThreatManager.h.
| Trinity::IteratorPair< ThreatManager::ThreatListIterator, std::nullptr_t > ThreatManager::GetSortedThreatList | ( | ) | const |
Definition at line 322 of file ThreatManager.cpp.
References _sortedThreatList.
Referenced by debug_commandscript::HandleDebugThreatListCommand(), UnitAI::PrepareTargetListSelection(), and boss_blood_queen_lana_thel::SelectRandomTarget().
| float ThreatManager::GetThreat | ( | Unit const * | who, |
| bool | includeOffline = false |
||
| ) | const |
Definition at line 284 of file ThreatManager.cpp.
References _myThreatListEntries, and BaseEntity::GetGUID().
Referenced by CompareReferencesLT(), spell_gruul_hurtful_strike_primer::FilterTargets(), ScriptedAI::GetThreat(), spell_thaddius_magnetic_pull::HandleCast(), spell_alysrazor_aggro_closest::spell_alysrazor_aggro_closest_SpellScript::HandleEffect(), MatchUnitThreatToHighestThreat(), and npc_pet_mage_mirror_image::UpdateVictim().
|
inline |
Definition at line 139 of file ThreatManager.h.
Referenced by Spell::EffectSanctuary(), VehicleJoinEvent::Execute(), debug_commandscript::HandleDebugThreatListCommand(), and AuraEffect::HandleFeignDeath().
| uint32 ThreatManager::GetThreatListPlayerCount | ( | bool | includeOffline = false | ) | const |
Definition at line 297 of file ThreatManager.cpp.
References _sortedThreatList, and TYPEID_PLAYER.
Referenced by boss_the_maker::ExecuteEvent(), StoneGripTargetSelector::operator()(), boss_prince_taldaram::UpdateAI(), boss_blackheart_the_inciter::UpdateAI(), and boss_fathomlord_karathress::UpdateAI().
| size_t ThreatManager::GetThreatListSize | ( | ) | const |
Definition at line 292 of file ThreatManager.cpp.
References _sortedThreatList.
Referenced by GetUnitConditionVariable(), CriteriaHandler::ModifierSatisfied(), DevastatingSlamTargetSelector::operator()(), and UnitAI::PrepareTargetListSelection().
| Trinity::IteratorPair< ThreatManager::ThreatListIterator, std::nullptr_t > ThreatManager::GetUnsortedThreatList | ( | ) | const |
Definition at line 308 of file ThreatManager.cpp.
References _myThreatListEntries, and Trinity::IteratorPair< iterator, end_iterator >::begin().
Referenced by boss_supremus::CalculateHatefulStrikeTarget(), boss_professor_putricide::DoAction(), boss_guarm::DoAction(), boss_faction_championsAI::EnemiesInRange(), boss_malchezaar::boss_malchezaarAI::EnfeebleHealthEffect(), boss_shade_of_aran::boss_aranAI::FlameWreathEffect(), SmartScript::GetTargets(), AdvisorBaseAI::IsEnemyInRange(), boss_attumen::boss_attumenAI::IsSummonedBy(), UnitAI::PrepareTargetListSelection(), npc_hand_of_the_deceiver::npc_hand_of_the_deceiverAI::UpdateAI(), boss_cthun::cthunAI::UpdateAI(), boss_void_reaver::UpdateAI(), and npc_phase_hunter::npc_phase_hunterAI::UpdateAI().
| void ThreatManager::Initialize | ( | ) |
Definition at line 210 of file ThreatManager.cpp.
References _owner, _ownerCanHaveThreatList, and CanHaveThreatList().
Referenced by Creature::Create(), Pet::Create(), Player::Create(), and Vehicle::InstallAccessory().
| bool ThreatManager::IsThreatenedBy | ( | ObjectGuid const & | who, |
| bool | includeOffline = false |
||
| ) | const |
Definition at line 275 of file ThreatManager.cpp.
References _myThreatListEntries.
Referenced by IsThreatenedBy().
| bool ThreatManager::IsThreatenedBy | ( | Unit const * | who, |
| bool | includeOffline = false |
||
| ) | const |
Definition at line 282 of file ThreatManager.cpp.
References BaseEntity::GetGUID(), and IsThreatenedBy().
| bool ThreatManager::IsThreateningAnyone | ( | bool | includeOffline = false | ) | const |
Definition at line 345 of file ThreatManager.cpp.
References _threatenedByMe.
| bool ThreatManager::IsThreateningTo | ( | ObjectGuid const & | who, |
| bool | includeOffline = false |
||
| ) | const |
Definition at line 355 of file ThreatManager.cpp.
References _threatenedByMe.
Referenced by IsThreateningTo().
| bool ThreatManager::IsThreateningTo | ( | Unit const * | who, |
| bool | includeOffline = false |
||
| ) | const |
Definition at line 362 of file ThreatManager.cpp.
References BaseEntity::GetGUID(), and IsThreateningTo().
| bool ThreatManager::IsThreatListEmpty | ( | bool | includeOffline = false | ) | const |
Definition at line 265 of file ThreatManager.cpp.
References _sortedThreatList.
Referenced by boss_four_horsemen_lady::_UpdateAI(), boss_four_horsemen_sir::_UpdateAI(), boss_four_horsemen_baron::BeginFighting(), boss_four_horsemen_thane::BeginFighting(), boss_gothik::DoAction(), Spell::EffectTaunt(), debug_commandscript::HandleDebugThreatListCommand(), Unit::IsThreatened(), boss_blood_queen_lana_thel::SelectRandomTarget(), gunship_npc_AI::SelectVictim(), Update(), boss_prince_taldaram::UpdateAI(), and boss_algalon_the_observer::UpdateAI().
| void ThreatManager::MatchUnitThreatToHighestThreat | ( | Unit * | target | ) |
Definition at line 484 of file ThreatManager.cpp.
References _sortedThreatList, AddThreat(), ThreatReference::GetThreat(), GetThreat(), ThreatReference::IsAvailable(), and ThreatReference::IsTaunting().
Referenced by Spell::EffectTaunt().
|
inline |
Definition at line 147 of file ThreatManager.h.
Referenced by Spell::EffectModifyThreatPercent(), spell_omor_the_unscarred_orbital_strike_target::HandleDummy(), spell_gen_hate_to_zero::HandleDummy(), spell_gen_hate_to_50::HandleDummy(), spell_gen_hate_to_75::HandleDummy(), spell_gen_knock_away_threat_reduction::HandleScript(), ScriptedAI::ModifyThreatByPercent(), and SmartScript::ProcessAction().
|
delete |
|
private |
Definition at line 651 of file ThreatManager.cpp.
References _myThreatListEntries, _needsAIUpdate, _owner, ASSERT_NOTNULL, CreatureAI::JustStartedThreateningMe(), Trinity::Containers::MapGetValuePtr(), and Object::ToCreature().
Referenced by AddThreat(), and UpdateVictim().
|
private |
Definition at line 916 of file ThreatManager.cpp.
References _threatenedByMe.
Referenced by ThreatReference::UnregisterAndFree().
|
private |
Definition at line 894 of file ThreatManager.cpp.
References _currentVictimRef, _fixateRef, _myThreatListEntries, and _sortedThreatList.
Referenced by ThreatReference::UnregisterAndFree().
|
private |
== OTHERS' THREAT LISTS ==
Definition at line 909 of file ThreatManager.cpp.
References _owner, _threatenedByMe, ASSERT, BaseEntity::GetGUID(), and ObjectGuid::ToString().
Referenced by AddThreat().
|
private |
== MY THREAT LIST ==
Definition at line 885 of file ThreatManager.cpp.
References _myThreatListEntries, _needClientUpdate, _owner, _sortedThreatList, ASSERT, BaseEntity::GetGUID(), and ObjectGuid::ToString().
Referenced by AddThreat().
|
private |
Definition at line 662 of file ThreatManager.cpp.
References _needsAIUpdate.
Referenced by ThreatReference::UpdateOffline().
| void ThreatManager::RegisterRedirectThreat | ( | uint32 | spellId, |
| ObjectGuid const & | victim, | ||
| float | pct | ||
| ) |
== REDIRECT SYSTEM ==
Definition at line 801 of file ThreatManager.cpp.
References _redirectRegistry, and UpdateRedirectInfo().
Referenced by Spell::EffectRedirectThreat().
| void ThreatManager::RemoveMeFromThreatLists | ( | bool(*)(Unit const *otherUnit) | unitFilter | ) |
Definition at line 761 of file ThreatManager.cpp.
References _owner, and _threatenedByMe.
Referenced by CombatManager::EndAllPvECombat().
|
private |
Definition at line 596 of file ThreatManager.cpp.
References _currentVictimRef, _fixateRef, _myThreatListEntries, _owner, _sortedThreatList, ThreatReference::_victim, ABORT_MSG, CompareReferencesLT(), ThreatReference::IsAvailable(), ThreatReference::IsOffline(), Unit::IsWithinMeleeRange(), and ThreatReference::UpdateOffline().
Referenced by UpdateVictim().
| void ThreatManager::ResetAllThreat | ( | ) |
Definition at line 527 of file ThreatManager.cpp.
References _myThreatListEntries.
Referenced by npc_dark_nucleus::DamageTaken(), spell_rajaxx_thundercrash::HandleAfterCast(), spell_leotheras_the_blind_whirlwind_init::HandleAfterCast(), spell_omrogg_beatdown::HandleAfterCast(), spell_ulduar_random_aggro_periodic::HandleEffectPeriodic(), spell_sartura_whirlwind::HandleScript(), spell_toravon_random_aggro::HandleScript(), spell_leotheras_the_blind_whirlwind_effect::HandleScript(), ScriptedAI::ResetThreatList(), spell_putricide_ooze_channel::StartAttack(), npc_anubarak_spike::StartChase(), and npc_mimiron_assault_bot::npc_mimiron_assault_botAI::UpdateAI().
|
inline |
Definition at line 149 of file ThreatManager.h.
Referenced by ScriptedAI::ResetThreat(), and boss_murmur::UpdateAI().
| void ThreatManager::ResetUpdateTimer | ( | ) |
Definition at line 237 of file ThreatManager.cpp.
References _updateTimer, and THREAT_UPDATE_INTERVAL.
Referenced by Creature::AtEngage().
| void ThreatManager::ScaleThreat | ( | Unit * | target, |
| float | factor | ||
| ) |
Definition at line 477 of file ThreatManager.cpp.
References _myThreatListEntries, and BaseEntity::GetGUID().
|
private |
Definition at line 829 of file ThreatManager.cpp.
References _owner, BaseEntity::GetGUID(), WorldObject::SendMessageToSet(), Object::ToCreature(), WorldPackets::Combat::ThreatClear::UnitGUID, and WorldPackets::Combat::ThreatClear::Write().
Referenced by Update().
|
private |
Definition at line 839 of file ThreatManager.cpp.
References _owner, WorldPackets::Combat::ThreatRemove::AboutGUID, BaseEntity::GetGUID(), WorldObject::SendMessageToSet(), Object::ToCreature(), WorldPackets::Combat::ThreatRemove::UnitGUID, and WorldPackets::Combat::ThreatRemove::Write().
Referenced by ClearThreat(), and ThreatReference::UpdateOffline().
|
private |
Definition at line 850 of file ThreatManager.cpp.
References _currentVictimRef, _owner, _sortedThreatList, BaseEntity::GetGUID(), ThreatReference::GetVictim(), WorldPackets::Combat::HighestThreatUpdate::HighestThreatGUID, WorldObject::SendMessageToSet(), WorldPackets::Combat::ThreatInfo::Threat, Object::ToCreature(), and WorldPackets::Combat::ThreatInfo::UnitGUID.
Referenced by UpdateVictim().
| void ThreatManager::TauntUpdate | ( | ) |
Definition at line 504 of file ThreatManager.cpp.
References _myThreatListEntries, _owner, EvaluateSuppressed(), Unit::GetAuraEffectsByType(), SPELL_AURA_MOD_TAUNT, and ThreatReference::TAUNT_STATE_TAUNT.
Referenced by AuraEffect::HandleModDetaunt(), and AuraEffect::HandleModTaunt().
| void ThreatManager::UnregisterRedirectThreat | ( | uint32 | spellId | ) |
Definition at line 807 of file ThreatManager.cpp.
References _redirectRegistry, and UpdateRedirectInfo().
Referenced by spell_rog_tricks_of_the_trade_proc::HandleRemove(), spell_hun_misdirection::OnRemove(), spell_hun_misdirection_proc::OnRemove(), and spell_rog_tricks_of_the_trade_aura::OnRemove().
| void ThreatManager::UnregisterRedirectThreat | ( | uint32 | spellId, |
| ObjectGuid const & | victim | ||
| ) |
Definition at line 816 of file ThreatManager.cpp.
References _redirectRegistry, and UpdateRedirectInfo().
| void ThreatManager::Update | ( | uint32 | tdiff | ) |
Definition at line 215 of file ThreatManager.cpp.
References _needThreatClearUpdate, _updateTimer, CanHaveThreatList(), IsThreatListEmpty(), SendClearAllThreatToClients(), THREAT_UPDATE_INTERVAL, and UpdateVictim().
Referenced by Creature::Update().
| void ThreatManager::UpdateMySpellSchoolModifiers | ( | ) |
Definition at line 794 of file ThreatManager.cpp.
References _multiSchoolModifiers, _owner, _singleSchoolModifiers, Unit::GetTotalAuraMultiplierByMiscMask(), MAX_SPELL_SCHOOL, and SPELL_AURA_MOD_THREAT.
Referenced by AuraEffect::HandleModThreat().
| void ThreatManager::UpdateMyTempModifiers | ( | ) |
Definition at line 773 of file ThreatManager.cpp.
References _owner, _threatenedByMe, Unit::GetAuraEffectsByType(), and SPELL_AURA_MOD_TOTAL_THREAT.
Referenced by AuraEffect::HandleAuraModTotalThreat().
|
private |
Definition at line 923 of file ThreatManager.cpp.
References _redirectInfo, _redirectRegistry, and ASSERT.
Referenced by RegisterRedirectThreat(), UnregisterRedirectThreat(), and UnregisterRedirectThreat().
|
private |
Definition at line 581 of file ThreatManager.cpp.
References _currentVictimRef, _needClientUpdate, ProcessAIUpdates(), ReselectVictim(), and SendThreatListToClients().
Referenced by AddThreat(), ClearThreat(), GetCurrentVictim(), and Update().
|
friend |
Definition at line 259 of file ThreatManager.h.
|
friend |
Definition at line 260 of file ThreatManager.h.
|
friend |
Definition at line 257 of file ThreatManager.h.
|
friend |
Definition at line 258 of file ThreatManager.h.
Referenced by AddThreat().
|
private |
Definition at line 218 of file ThreatManager.h.
Referenced by AddThreat(), ClearThreat(), GetCurrentVictim(), GetLastVictim(), PurgeThreatListRef(), ReselectVictim(), SendThreatListToClients(), and UpdateVictim().
|
private |
Definition at line 219 of file ThreatManager.h.
Referenced by FixateTarget(), GetFixateTarget(), PurgeThreatListRef(), and ReselectVictim().
|
mutableprivate |
Definition at line 226 of file ThreatManager.h.
Referenced by CalculateModifiedThreat(), debug_commandscript::HandleDebugThreatInfoCommand(), and UpdateMySpellSchoolModifiers().
|
private |
Definition at line 207 of file ThreatManager.h.
Referenced by AddThreat(), ClearAllThreat(), ClearThreat(), FixateTarget(), GetModifiableThreatList(), GetThreat(), GetUnsortedThreatList(), IsThreatenedBy(), ProcessAIUpdates(), PurgeThreatListRef(), PutThreatListRef(), ReselectVictim(), ResetAllThreat(), ScaleThreat(), TauntUpdate(), and ~ThreatManager().
|
private |
Definition at line 203 of file ThreatManager.h.
Referenced by ThreatReference::AddThreat(), PutThreatListRef(), ThreatReference::ScaleThreat(), ThreatReference::UpdateTauntState(), and UpdateVictim().
|
private |
Definition at line 213 of file ThreatManager.h.
Referenced by ProcessAIUpdates(), and RegisterForAIUpdate().
|
private |
Definition at line 204 of file ThreatManager.h.
Referenced by ClearAllThreat(), and Update().
|
private |
Definition at line 187 of file ThreatManager.h.
Referenced by AddThreat(), Initialize(), ProcessAIUpdates(), PutThreatenedByMeRef(), PutThreatListRef(), RemoveMeFromThreatLists(), ReselectVictim(), SendClearAllThreatToClients(), SendRemoveToClients(), SendThreatListToClients(), TauntUpdate(), UpdateMySpellSchoolModifiers(), UpdateMyTempModifiers(), and ~ThreatManager().
|
private |
Definition at line 188 of file ThreatManager.h.
Referenced by Initialize().
|
private |
Definition at line 230 of file ThreatManager.h.
Referenced by AddThreat(), debug_commandscript::HandleDebugThreatInfoCommand(), and UpdateRedirectInfo().
|
private |
Definition at line 231 of file ThreatManager.h.
Referenced by debug_commandscript::HandleDebugThreatInfoCommand(), RegisterRedirectThreat(), UnregisterRedirectThreat(), UnregisterRedirectThreat(), and UpdateRedirectInfo().
|
private |
Definition at line 225 of file ThreatManager.h.
Referenced by CalculateModifiedThreat(), debug_commandscript::HandleDebugThreatInfoCommand(), ThreatManager(), and UpdateMySpellSchoolModifiers().
|
private |
Definition at line 206 of file ThreatManager.h.
Referenced by GetAnyTarget(), GetModifiableThreatList(), GetSortedThreatList(), GetThreatListPlayerCount(), GetThreatListSize(), ThreatReference::HeapNotifyDecreased(), ThreatReference::HeapNotifyIncreased(), IsThreatListEmpty(), MatchUnitThreatToHighestThreat(), PurgeThreatListRef(), PutThreatListRef(), ReselectVictim(), SendThreatListToClients(), and ~ThreatManager().
|
private |
Definition at line 224 of file ThreatManager.h.
Referenced by EvaluateSuppressed(), ForwardThreatForAssistingMe(), IsThreateningAnyone(), IsThreateningTo(), PurgeThreatenedByMeRef(), PutThreatenedByMeRef(), RemoveMeFromThreatLists(), UpdateMyTempModifiers(), and ~ThreatManager().
|
private |
Definition at line 205 of file ThreatManager.h.
Referenced by ResetUpdateTimer(), and Update().
|
staticprivate |
Definition at line 190 of file ThreatManager.h.
|
static |
Definition at line 86 of file ThreatManager.h.
Referenced by ResetUpdateTimer(), and Update().