diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2019-06-23 23:31:51 +0200 |
|---|---|---|
| committer | Treeston <treeston.mmoc@gmail.com> | 2019-06-23 23:31:51 +0200 |
| commit | 1158f267df22c0782fb5f20f7de31f5643ac0b58 (patch) | |
| tree | 2ca14c1207f30e47c89b66b9c3ee4ca65b519eee /src/server/scripts/Northrend | |
| parent | 00575221e3bfd66a382925d122540b047dcb9e3f (diff) | |
Combat/Threat: Split ThreatManager::NotifyDisengaged off from ThreatManager::ClearAllThreat. NotifyDisengaged signifies intent to clear the engagement flag, and should only be called from AI. Fixes #23490.
Diffstat (limited to 'src/server/scripts/Northrend')
8 files changed, 11 insertions, 11 deletions
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp index c998659c27b..9baa007d72c 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp @@ -1156,7 +1156,7 @@ class npc_dark_nucleus : public CreatureScript if (attacker == me) return; - me->GetThreatManager().ClearAllThreat(); + me->GetThreatManager().ResetAllThreat(); AddThreat(attacker, 500000000.0f); } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp index 18d5135ae66..45b64917dc4 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp @@ -579,8 +579,8 @@ struct gunship_npc_AI : public ScriptedAI if (!me->IsAlive() || !me->IsInCombat()) return; - me->GetThreatManager().ClearAllThreat(); me->CombatStop(true); + me->GetThreatManager().NotifyDisengaged(); me->GetMotionMaster()->MoveTargetedHome(); } @@ -724,8 +724,8 @@ class npc_gunship : public CreatureScript { Creature* stalker = *itr; stalker->RemoveAllAuras(); - stalker->GetThreatManager().ClearAllThreat(); stalker->CombatStop(true); + stalker->GetThreatManager().NotifyDisengaged(); } uint32 explosionSpell = isVictory ? SPELL_EXPLOSION_VICTORY : SPELL_EXPLOSION_WIPE; @@ -883,8 +883,8 @@ class npc_high_overlord_saurfang_igb : public CreatureScript if (!me->IsAlive()) return; - me->GetThreatManager().ClearAllThreat(); me->CombatStop(true); + me->GetThreatManager().NotifyDisengaged(); me->GetMotionMaster()->MoveTargetedHome(); Reset(); @@ -1147,8 +1147,8 @@ class npc_muradin_bronzebeard_igb : public CreatureScript if (!me->IsAlive()) return; - me->GetThreatManager().ClearAllThreat(); me->CombatStop(true); + me->GetThreatManager().NotifyDisengaged(); me->GetMotionMaster()->MoveTargetedHome(); Reset(); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index a6432aa156f..99340630b99 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -933,7 +933,7 @@ class spell_putricide_ooze_channel : public SpellScriptLoader void StartAttack() { GetCaster()->ClearUnitState(UNIT_STATE_CASTING); - GetCaster()->GetThreatManager().ClearAllThreat(); + GetCaster()->GetThreatManager().ResetAllThreat(); GetCaster()->ToCreature()->AI()->AttackStart(GetHitUnit()); GetCaster()->GetThreatManager().AddThreat(GetHitUnit(), 500000000.0f, nullptr, true, true); // value seen in sniff } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index eefbefeac53..086b0eeeca2 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -1800,8 +1800,8 @@ class npc_terenas_menethil : public CreatureScript if (!me->IsAlive()) return; - me->GetThreatManager().ClearAllThreat(); me->CombatStop(false); + me->GetThreatManager().NotifyDisengaged(); } void DamageTaken(Unit* /*attacker*/, uint32& damage) override diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp index 224ee49e769..4187b86cfe8 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp @@ -290,7 +290,7 @@ class boss_urom : public CreatureScript { me->RemoveAllAuras(); me->CombatStop(false); - me->GetThreatManager().ClearAllThreat(); + me->GetThreatManager().NotifyDisengaged(); } void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp index baae21d8268..b41f7639b90 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp @@ -634,7 +634,7 @@ class boss_freya : public CreatureScript Elder->RemoveAllAuras(); Elder->AttackStop(); Elder->CombatStop(true); - Elder->GetThreatManager().ClearAllThreat(); + Elder->GetThreatManager().NotifyDisengaged(); Elder->AI()->DoAction(ACTION_ELDER_FREYA_KILLED); } } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp index 7cd71a8a5b7..6a37225b65f 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp @@ -1310,7 +1310,7 @@ class npc_mimiron_assault_bot : public CreatureScript { if (Unit* newTarget = SelectTarget(SELECT_TARGET_MINDISTANCE, 0, 30.0f, true)) { - me->GetThreatManager().ClearAllThreat(); + me->GetThreatManager().ResetAllThreat(); AttackStart(newTarget); } } diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp index 6f9f5eac349..7033fa74310 100644 --- a/src/server/scripts/Northrend/zone_borean_tundra.cpp +++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp @@ -735,7 +735,7 @@ public: Creature* owner = GetOwner()->ToCreature(); owner->RemoveAllAurasExceptType(SPELL_AURA_DUMMY); owner->CombatStop(true); - owner->GetThreatManager().ClearAllThreat(); + owner->GetThreatManager().NotifyDisengaged(); owner->GetMotionMaster()->Clear(); owner->GetMotionMaster()->MoveFollow(GetCaster(), 4.0f, 0.0f); owner->CastSpell(owner, SPELL_SUBDUED, true); |
