aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Northrend
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2019-06-23 23:31:51 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-12 02:09:15 +0100
commit38d7c1530a65a7ff1bd10775c4a35269b2416538 (patch)
treecb35c9ea9e6e26f0d09ce82ddc3bb41a13fc038f /src/server/scripts/Northrend
parenta9946bd580272d85b2f88464a33e4766ba93c10a (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.
(cherry picked from commit 1158f267df22c0782fb5f20f7de31f5643ac0b58)
Diffstat (limited to 'src/server/scripts/Northrend')
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp8
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp2
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 381b3306d5f..8650969584a 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -1155,7 +1155,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 09def58177e..84015ecb287 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;
@@ -877,8 +877,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();
@@ -1141,8 +1141,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 edf2b0895d9..4c51330eec8 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
@@ -931,7 +931,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 2e7fba50cad..f7a1878b6e0 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
@@ -1777,8 +1777,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 0af2b9b6924..3e8dac1693d 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
@@ -291,7 +291,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 b2812209cfc..28c983e3ab6 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 e404794905e..f1638c4e0c3 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
@@ -1313,7 +1313,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 0b7760cf5fa..11aadd48bd0 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -733,7 +733,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);