![]() |
AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#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 |
| Acore::IteratorPair< ThreatListIterator > | GetUnsortedThreatList () const |
| Acore::IteratorPair< ThreatListIterator > | 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 | ResetAllMyThreatOnOthers () |
| void | RemoveMeFromThreatLists () |
| void | UpdateMyTempModifiers () |
| void | UpdateMySpellSchoolModifiers () |
| void | SetTauntStateForTesting (Unit *target, uint32 state) |
| void | RegisterRedirectThreat (uint32 spellId, ObjectGuid const &victim, uint32 pct) |
| == REDIRECT SYSTEM == | |
| void | UnregisterRedirectThreat (uint32 spellId) |
| void | UnregisterRedirectThreat (uint32 spellId, ObjectGuid const &victim) |
| bool | HasRedirects () const |
| void | ResetAllRedirects () |
| 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 |
| ThreatManager::ThreatManager | ( | Unit * | owner | ) |
References _singleSchoolModifiers, and MAX_SPELL_SCHOOL.
| ThreatManager::~ThreatManager | ( | ) |
References _myThreatListEntries, _owner, _sortedThreatList, _threatenedByMe, ASSERT, Object::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 ==
References _currentVictimRef, _myThreatListEntries, ThreatReference::_online, _owner, _redirectInfo, ThreatReference::AddThreat(), AddThreat(), CalculateModifiedThreat(), CalculatePct(), CanHaveThreatList(), Unit::GetCombatManager(), Object::GetGUID(), ThreatReference::GetOnlineState(), Unit::GetThreatMgr(), ObjectAccessor::GetUnit(), Unit::GetVehicleBase(), SpellInfo::HasAttribute(), Unit::HasUnitTypeMask(), 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_ATTR3_SUPPRESS_TARGET_PROCS, ThreatReferenceImpl, UNIT_MASK_ACCESSORY, ThreatReference::UpdateOffline(), and UpdateVictim().
Referenced by AddThreat(), Unit::AddThreat(), ScriptedAI::DoAddThreat(), Spell::EffectThreat(), Unit::EngageWithTarget(), TemporaryThreatModifierEvent::Execute(), ForwardThreatForAssistingMe(), spell_pet_guard_dog::HandleProc(), Spell::HandleThreatSpells(), MatchUnitThreatToHighestThreat(), SmartScript::ProcessAction(), boss_priestess_lackey_commonAI::RecalculateThreat(), boss_faction_championsAI::RecalculateThreat(), boss_drakkisath::boss_drakkisathAI::UpdateAI(), boss_grilek::boss_grilekAI::UpdateAI(), boss_gothik::boss_gothikAI::UpdateAI(), and boss_netherspite::UpdatePortals().
|
staticprivate |
References _multiSchoolModifiers, _singleSchoolModifiers, SpellInfo::GetSchoolMask(), Unit::GetSpellModOwner(), Unit::GetThreatMgr(), Unit::GetTotalAuraMultiplierByMiscMask(), 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, SPELLMOD_THREAT, and sSpellMgr.
Referenced by AddThreat().
|
inline |
Referenced by AddThreat(), Initialize(), and Update().
|
static |
References Unit::HasUnitTypeMask(), Unit::IsPet(), Unit::IsTotem(), Creature::IsTrigger(), Object::ToCreature(), Unit::ToTempSummon(), UNIT_MASK_GUARDIAN, and UNIT_MASK_MINION.
Referenced by Unit::CanHaveThreatList(), and debug_commandscript::HandleDebugThreatListCommand().
| void ThreatManager::ClearAllThreat | ( | ) |
References _myThreatListEntries, and SendClearAllThreatToClients().
Referenced by TestCreature::CleanupCombatState(), boss_eadric::boss_eadricAI::DamageTaken(), boss_paletress::boss_paletressAI::DamageTaken(), boss_grand_champion::boss_grand_championAI::DamageTaken(), npc_magister_aledis::DamageTaken(), npc_tapoke_slim_jahn::npc_tapoke_slim_jahnAI::DamageTaken(), npc_dark_nucleus::npc_dark_nucleusAI::DamageTaken(), npc_crok_scourgebane::npc_crok_scourgebaneAI::DoAction(), npc_spark_of_ionar::DoAction(), npc_taskmaster_fizzule::npc_taskmaster_fizzuleAI::DoFriend(), npc_unkor_the_ruthless::npc_unkor_the_ruthlessAI::DoNice(), CombatManager::EndAllPvECombat(), npc_tirion_fordring_tft::npc_tirion_fordringAI::EnterEvadeMode(), GuardAI::EnterEvadeMode(), boss_doomrel::boss_doomrelAI::EnterEvadeMode(), npc_varian_wrynn::npc_varian_wrynnAI::EnterEvadeMode(), npc_thrall_bfu::npc_thrall_bfuAI::EnterEvadeMode(), npc_pos_freed_slave::npc_pos_freed_slaveAI::EnterEvadeMode(), npc_high_overlord_saurfang_igb::npc_high_overlord_saurfang_igbAI::EnterEvadeMode(), npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::EnterEvadeMode(), gunship_npc_AI::EnterEvadeMode(), npc_gunship_boarding_addAI::EnterEvadeMode(), npc_terenas_menethil::npc_terenas_menethilAI::EnterEvadeMode(), violet_hold_trashAI::EnterEvadeMode(), npc_pet_hunter_snake_trap::EnterEvadeMode(), npc_escortAI::EnterEvadeMode(), FollowerAI::EnterEvadeMode(), npc_crystalline_frayer::EnterSeedPod(), npc_raging_flames::FixateRandomTarget(), spell_q11919_q11940_drake_hunt_aura::HandleEffectRemove(), PetAI::HandleReturnMovement(), boss_urom::boss_uromAI::LeaveCombat(), spell_halion_twilight_phasing_aura::OnApply(), spell_halion_twilight_phasing_aura::OnRemove(), spell_putricide_ooze_channel::StartAttack(), npc_highlord_darion_mograine::npc_highlord_darion_mograineAI::UpdateAI(), npc_snobold_vassal::npc_snobold_vassalAI::UpdateAI(), boss_malygos::UpdateAI(), and npc_aeranas::npc_aeranasAI::UpdateAI().
|
inline |
| void ThreatManager::ClearThreat | ( | ThreatReference * | ref | ) |
References _currentVictimRef, ThreatReference::_victim, SendRemoveToClients(), ThreatReference::UnregisterAndFree(), and UpdateVictim().
| void ThreatManager::ClearThreat | ( | Unit * | target | ) |
References _myThreatListEntries, ClearThreat(), and Object::GetGUID().
Referenced by ThreatReference::ClearThreat(), ClearThreat(), CombatReference::EndCombat(), UnitAI::EvadeTimerExpired(), and boss_gothik::boss_gothikAI::UpdateAI().
|
staticprivate |
References ThreatReference::_online, ThreatReference::_taunted, ThreatReference::GetThreat(), and GetThreat().
Referenced by CompareThreatLessThan::operator()(), and ReselectVictim().
| void ThreatManager::EvaluateSuppressed | ( | bool | canExpire = false | ) |
References _threatenedByMe, ThreatReference::ONLINE_STATE_ONLINE, and ThreatReference::ONLINE_STATE_SUPPRESSED.
Referenced by Spell::EffectSanctuary(), AuraEffect::HandleAuraModDmgImmunity(), AuraEffect::HandleAuraModSchoolImmunity(), AuraEffect::HandleAuraModStun(), AuraEffect::HandleModConfuse(), Player::SetInWater(), and TauntUpdate().
| void ThreatManager::FixateTarget | ( | Unit * | target | ) |
References _fixateRef, _myThreatListEntries, and Object::GetGUID().
| void ThreatManager::ForwardThreatForAssistingMe | ( | Unit * | assistant, |
| float | baseAmount, | ||
| SpellInfo const * | spell = nullptr, |
||
| bool | ignoreModifiers = false |
||
| ) |
== AFFECT OTHERS' THREAT LISTS ==
References _threatenedByMe, AddThreat(), Unit::GetOwner(), Unit::GetThreatMgr(), SpellInfo::HasAttribute(), Unit::HasUnitState(), SPELL_ATTR1_NO_THREAT, and UNIT_STATE_CONTROLLED.
Referenced by Spell::DoAllEffectOnTarget(), Spell::DoSpellHitOnUnit(), Spell::EffectDispel(), Spell::EffectDispelMechanic(), Unit::EnergizeBySpell(), AuraEffect::HandleObsModPowerAuraTick(), AuraEffect::HandlePeriodicEnergizeAuraTick(), AuraEffect::HandlePeriodicHealAurasTick(), AuraEffect::HandlePeriodicHealthLeechAuraTick(), and Spell::HandleThreatSpells().
| Unit * ThreatManager::GetAnyTarget | ( | ) | const |
References _sortedThreatList, and Unit::GetVictim().
| Unit * ThreatManager::GetCurrentVictim | ( | ) |
References _currentVictimRef, ASSERT, ThreatReference::GetVictim(), ThreatReference::IsAvailable(), ThreatReference::ShouldBeOffline(), and UpdateVictim().
Referenced by Spell::EffectTaunt(), boss_talon_king_ikiss::JustEngagedWith(), boss_teron_gorefiend::JustEngagedWith(), NonTankTargetSelector::operator()(), and Creature::SelectVictim().
| Unit * ThreatManager::GetFixateTarget | ( | ) | const |
References _fixateRef, and ThreatReference::GetVictim().
Referenced by debug_commandscript::HandleDebugThreatListCommand().
| Unit * ThreatManager::GetLastVictim | ( | ) | const |
References _currentVictimRef, ThreatReference::GetVictim(), and ThreatReference::ShouldBeOffline().
Referenced by PowerUsersSelector::operator()(), and MalleableGooSelector::operator()().
| std::vector< ThreatReference * > ThreatManager::GetModifiableThreatList | ( | ) |
References _myThreatListEntries, and _sortedThreatList.
Referenced by SmartScript::ProcessAction(), and Unit::SetPhaseMask().
| Acore::IteratorPair< ThreatManager::ThreatListIterator > ThreatManager::GetSortedThreatList | ( | ) | const |
References _sortedThreatList.
Referenced by boss_hazzarah::CanAIAttack(), boss_renataki::boss_renatakiAI::CanAIAttack(), debug_commandscript::HandleDebugThreatListCommand(), UnitAI::SelectTargetList(), and boss_patchwerk::boss_patchwerkAI::UpdateAI().
| float ThreatManager::GetThreat | ( | Unit const * | who, |
| bool | includeOffline = false |
||
| ) | const |
References _myThreatListEntries, and Object::GetGUID().
Referenced by boss_mor_grayhoof::CastRandomSpell(), CompareReferencesLT(), ScriptedAI::DoGetThreat(), MatchUnitThreatToHighestThreat(), Creature::ModifyThreatPercentTemp(), boss_priestess_lackey_commonAI::RecalculateThreat(), boss_faction_championsAI::RecalculateThreat(), boss_drakkisath::boss_drakkisathAI::UpdateAI(), and boss_thaddius_summon::boss_thaddius_summonAI::UpdateAI().
|
inline |
| uint32 ThreatManager::GetThreatListPlayerCount | ( | bool | includeOffline = false | ) | const |
References _sortedThreatList.
| size_t ThreatManager::GetThreatListSize | ( | ) | const |
References _sortedThreatList.
Referenced by boss_hazzarah::CanAIAttack(), boss_renataki::boss_renatakiAI::CanAIAttack(), UnitAI::EvadeTimerExpired(), boss_jindo::JustSummoned(), boss_bug_trio::MovementInform(), StoneGripTargetSelector::operator()(), boss_jeklik::PathEndReached(), SmartScript::ProcessAction(), UnitAI::SelectTarget(), UnitAI::SelectTargetList(), boss_hakkar::boss_hakkarAI::UpdateAI(), boss_jindo::UpdateAI(), and NPCStaveQuestAI::ValidThreatlist().
| Acore::IteratorPair< ThreatManager::ThreatListIterator > ThreatManager::GetUnsortedThreatList | ( | ) | const |
References _myThreatListEntries, and Acore::IteratorPair< iterator >::begin().
Referenced by boss_lady_deathwhisper::boss_lady_deathwhisperAI::DamageTaken(), boss_ysondre::boss_ysondreAI::DamageTaken(), UnitAI::DoAddAuraToAllHostilePlayers(), UnitAI::DoCastToAllHostilePlayers(), boss_faction_championsAI::EnemiesInRange(), boss_supremus::FindHatefulStrikeTarget(), SmartScript::GetTargets(), spell_kaelthas_nether_beam::HandleScriptEffect(), boss_thaddius::boss_thaddiusAI::IsAnyPlayerInMeleeRange(), NPCStaveQuestAI::IsFairFight(), boss_hadronox::IsInCombatWithPlayer(), boss_attumen::IsSummonedBy(), boss_blackheart_the_inciter::JustEngagedWith(), spell_malygos_vortex_visual::OnRemove(), SmartScript::ProcessEvent(), boss_priestess_lackey_commonAI::RecalculateThreat(), boss_faction_championsAI::RecalculateThreat(), boss_faction_championsAI::SelectEnemyCaster(), UnitAI::SelectTargetList(), npc_scholomance_occultist::npc_scholomance_occultistAI::SelectUnitCasting(), npc_frostwing_vrykul::npc_frostwing_vrykulAI::SpellHitTarget(), NPCStaveQuestAI::StorePlayerGUID(), boss_nefarian::UpdateAI(), boss_mandokir::boss_mandokirAI::UpdateAI(), boss_renataki::boss_renatakiAI::UpdateAI(), npc_green_dragon_combat_trigger::npc_green_dragon_combat_triggerAI::UpdateAI(), boss_gothik::boss_gothikAI::UpdateAI(), boss_kelthuzad::boss_kelthuzadAI::UpdateAI(), boss_sapphiron::boss_sapphironAI::UpdateAI(), boss_the_lurker_below::UpdateAI(), and instance_eye_of_eternity::VortexHandling().
|
inline |
Referenced by spell_hun_misdirection::CheckProc().
| void ThreatManager::Initialize | ( | ) |
References _owner, _ownerCanHaveThreatList, and CanHaveThreatList().
Referenced by Pet::Create(), Creature::InitEntry(), and TestCreature::InitializeThreatManager().
| bool ThreatManager::IsThreatenedBy | ( | ObjectGuid const & | who, |
| bool | includeOffline = false |
||
| ) | const |
References _myThreatListEntries.
Referenced by UnitAI::EvadeTimerExpired(), Unit::IsThreatenedBy(), and IsThreatenedBy().
| bool ThreatManager::IsThreatenedBy | ( | Unit const * | who, |
| bool | includeOffline = false |
||
| ) | const |
References Object::GetGUID(), and IsThreatenedBy().
| bool ThreatManager::IsThreateningAnyone | ( | bool | includeOffline = false | ) | const |
References _threatenedByMe.
Referenced by WorldSession::HandleMoveWorldportAck().
| bool ThreatManager::IsThreateningTo | ( | ObjectGuid const & | who, |
| bool | includeOffline = false |
||
| ) | const |
References _threatenedByMe.
Referenced by IsThreateningTo().
| bool ThreatManager::IsThreateningTo | ( | Unit const * | who, |
| bool | includeOffline = false |
||
| ) | const |
References Object::GetGUID(), and IsThreateningTo().
| bool ThreatManager::IsThreatListEmpty | ( | bool | includeOffline = false | ) | const |
References _sortedThreatList.
Referenced by ScriptedAI::DoResetThreatList(), Spell::EffectTaunt(), boss_ragnaros::boss_ragnarosAI::EnterEvadeMode(), boss_murmur::EnterEvadeMode(), boss_alar::EnterEvadeMode(), boss_ouro::EnterEvadeMode(), StartMovementEvent::Execute(), debug_commandscript::HandleDebugThreatListCommand(), Unit::IsThreatened(), Creature::SelectVictim(), Update(), and npc_raging_spirit::npc_raging_spiritAI::UpdateAI().
| void ThreatManager::MatchUnitThreatToHighestThreat | ( | Unit * | target | ) |
References _sortedThreatList, AddThreat(), ThreatReference::GetThreat(), GetThreat(), ThreatReference::IsAvailable(), and ThreatReference::IsTaunting().
Referenced by Spell::EffectTaunt().
Referenced by boss_mor_grayhoof::CastRandomSpell(), ScriptedAI::DoModifyThreatByPercent(), Spell::EffectModifyThreatPercent(), TemporaryThreatModifierEvent::Execute(), spell_enveloping_webs::HandleOnHit(), spell_arcane_vacuum::HandleOnHit(), spell_gurtogg_eject::HandleScriptEffect(), Creature::ModifyThreatPercentTemp(), SmartScript::ProcessAction(), boss_ouro::SpellHitTarget(), boss_drakkisath::boss_drakkisathAI::UpdateAI(), boss_hakkar::boss_hakkarAI::UpdateAI(), boss_mandokir::boss_mandokirAI::UpdateAI(), and boss_thaddius_summon::boss_thaddius_summonAI::UpdateAI().
|
delete |
|
private |
References _myThreatListEntries, _needsAIUpdate, _owner, ASSERT_NOTNULL, CreatureAI::JustStartedThreateningMe(), Acore::Containers::MapGetValuePtr(), and Object::ToCreature().
Referenced by AddThreat(), and UpdateVictim().
|
private |
References _threatenedByMe.
Referenced by ThreatReference::UnregisterAndFree().
|
private |
References _currentVictimRef, _fixateRef, _myThreatListEntries, and _sortedThreatList.
Referenced by ThreatReference::UnregisterAndFree().
|
private |
== OTHERS' THREAT LISTS ==
References _owner, _threatenedByMe, ASSERT, Object::GetGUID(), and ObjectGuid::ToString().
Referenced by AddThreat().
|
private |
== MY THREAT LIST ==
References _myThreatListEntries, _needClientUpdate, _owner, _sortedThreatList, ASSERT, Object::GetGUID(), and ObjectGuid::ToString().
Referenced by AddThreat().
|
inlineprivate |
Referenced by ThreatReference::UpdateOffline().
| void ThreatManager::RegisterRedirectThreat | ( | uint32 | spellId, |
| ObjectGuid const & | victim, | ||
| uint32 | pct | ||
| ) |
== REDIRECT SYSTEM ==
References _redirectRegistry, and UpdateRedirectInfo().
Referenced by Spell::EffectRedirectThreat().
| void ThreatManager::RemoveMeFromThreatLists | ( | ) |
References _owner, and _threatenedByMe.
Referenced by PetAI::_stopAttack(), CombatManager::EndAllPvECombat(), misc_commandscript::HandleCombatStopCommand(), WorldSession::HandleMoveWorldportAck(), WorldSession::LogoutPlayer(), and Map::RemovePlayerFromMap().
|
private |
References _currentVictimRef, _fixateRef, _myThreatListEntries, _owner, _sortedThreatList, ThreatReference::_victim, ASSERT, CompareReferencesLT(), ThreatReference::IsAvailable(), ThreatReference::IsOffline(), Unit::IsWithinMeleeRange(), and ThreatReference::UpdateOffline().
Referenced by UpdateVictim().
| void ThreatManager::ResetAllMyThreatOnOthers | ( | ) |
References _threatenedByMe.
|
inline |
| void ThreatManager::ResetAllThreat | ( | ) |
References _myThreatListEntries.
Referenced by npc_vengeful_shade::npc_vengeful_shadeAI::AttackStart(), boss_thorim_start_npcs::DamageTaken(), ScriptedAI::DoResetThreatList(), spell_karazhan_blink::HandleDummy(), spell_tharon_ja_dummy_aura::HandleEffectRemove(), spell_pursue::HandleScript(), spell_leotheras_whirlwind::HandleScriptEffect(), spell_black_knight_ghoul_claw::HandleSpellHit(), npc_pet_mage_mirror_image::MySelectNextTarget(), boss_tharon_ja::boss_tharon_jaAI::Reset(), boss_talon_king_ikiss::Reset(), npc_ulduar_iron_construct::SpellHit(), boss_eck::SpellHitTarget(), boss_sartura::UpdateAI(), npc_sartura_royal_guard::UpdateAI(), npc_toc5_grand_champion_minion::npc_toc5_grand_champion_minionAI::UpdateAI(), boss_grand_champion::boss_grand_championAI::UpdateAI(), npc_molten_golem::UpdateAI(), boss_palehoof::boss_palehoofAI::UpdateAI(), and npc_frozen_orb::npc_frozen_orbAI::UpdateAI().
|
inline |
Referenced by ScriptedAI::DoResetThreat(), spell_kaelthas_mind_control::HandleEffect(), boss_priestess_lackey_commonAI::RecalculateThreat(), and boss_faction_championsAI::RecalculateThreat().
| void ThreatManager::ScaleThreat | ( | Unit * | target, |
| float | factor | ||
| ) |
References _myThreatListEntries, and Object::GetGUID().
|
private |
References _owner, Object::GetPackGUID(), WorldObject::SendMessageToSet(), and SMSG_THREAT_CLEAR.
Referenced by ClearAllThreat().
|
private |
References _owner, Object::GetPackGUID(), WorldObject::SendMessageToSet(), and SMSG_THREAT_REMOVE.
Referenced by ClearThreat(), and ThreatReference::UpdateOffline().
|
private |
References _currentVictimRef, _owner, _sortedThreatList, Object::GetPackGUID(), ThreatReference::GetVictim(), ByteBuffer::put(), WorldObject::SendMessageToSet(), SMSG_HIGHEST_THREAT_UPDATE, SMSG_THREAT_UPDATE, and ByteBuffer::wpos().
Referenced by UpdateVictim().
References _myThreatListEntries, and Object::GetGUID().
| void ThreatManager::TauntUpdate | ( | ) |
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 | ) |
References _redirectRegistry, and UpdateRedirectInfo().
Referenced by spell_rog_tricks_of_the_trade_proc::HandleRemove(), spell_warr_vigilance::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 | ||
| ) |
References _redirectRegistry, and UpdateRedirectInfo().
| void ThreatManager::Update | ( | uint32 | tdiff | ) |
References _updateTimer, CanHaveThreatList(), IsThreatListEmpty(), THREAT_UPDATE_INTERVAL, and UpdateVictim().
Referenced by Creature::Update().
| void ThreatManager::UpdateMySpellSchoolModifiers | ( | ) |
References _multiSchoolModifiers, _owner, _singleSchoolModifiers, Unit::GetTotalAuraMultiplierByMiscMask(), MAX_SPELL_SCHOOL, and SPELL_AURA_MOD_THREAT.
Referenced by AuraEffect::HandleModThreat().
| void ThreatManager::UpdateMyTempModifiers | ( | ) |
References _owner, _threatenedByMe, Unit::GetAuraEffectsByType(), and SPELL_AURA_MOD_TOTAL_THREAT.
Referenced by AuraEffect::HandleAuraModTotalThreat().
|
private |
References _redirectInfo, _redirectRegistry, and ASSERT.
Referenced by RegisterRedirectThreat(), UnregisterRedirectThreat(), and UnregisterRedirectThreat().
|
private |
References _currentVictimRef, _needClientUpdate, ProcessAIUpdates(), ReselectVictim(), and SendThreatListToClients().
Referenced by AddThreat(), ClearThreat(), GetCurrentVictim(), and Update().
|
friend |
|
friend |
|
friend |
|
friend |
Referenced by AddThreat().
|
private |
Referenced by AddThreat(), ClearThreat(), GetCurrentVictim(), GetLastVictim(), PurgeThreatListRef(), ReselectVictim(), SendThreatListToClients(), and UpdateVictim().
|
private |
Referenced by FixateTarget(), GetFixateTarget(), PurgeThreatListRef(), and ReselectVictim().
|
mutableprivate |
|
private |
Referenced by AddThreat(), ClearAllThreat(), ClearThreat(), FixateTarget(), GetModifiableThreatList(), GetThreat(), GetUnsortedThreatList(), IsThreatenedBy(), ProcessAIUpdates(), PurgeThreatListRef(), PutThreatListRef(), ReselectVictim(), ResetAllThreat(), ScaleThreat(), SetTauntStateForTesting(), TauntUpdate(), and ~ThreatManager().
|
private |
|
private |
Referenced by ProcessAIUpdates().
|
private |
Referenced by AddThreat(), Initialize(), ProcessAIUpdates(), PutThreatenedByMeRef(), PutThreatListRef(), RemoveMeFromThreatLists(), ReselectVictim(), SendClearAllThreatToClients(), SendRemoveToClients(), SendThreatListToClients(), TauntUpdate(), ThreatReferenceImpl::ThreatReferenceImpl(), UpdateMySpellSchoolModifiers(), UpdateMyTempModifiers(), and ~ThreatManager().
|
private |
Referenced by Initialize().
|
private |
Referenced by AddThreat(), debug_commandscript::HandleDebugThreatInfoCommand(), and UpdateRedirectInfo().
|
private |
|
private |
|
private |
Referenced by GetAnyTarget(), GetModifiableThreatList(), GetSortedThreatList(), GetThreatListPlayerCount(), GetThreatListSize(), ThreatReference::HeapNotifyDecreased(), ThreatReference::HeapNotifyIncreased(), IsThreatListEmpty(), MatchUnitThreatToHighestThreat(), PurgeThreatListRef(), PutThreatListRef(), ReselectVictim(), SendThreatListToClients(), and ~ThreatManager().
|
private |
|
staticprivate |