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/EasternKingdoms | |
| 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/EasternKingdoms')
3 files changed, 8 insertions, 9 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp index 5ca04ace1f8..70f8f69379f 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp @@ -398,8 +398,8 @@ public: {//do not call EnterEvadeMode(), it will create infinit loops boss->Respawn(); boss->RemoveAllAuras(); - boss->GetThreatManager().ClearAllThreat(); boss->CombatStop(true); + boss->GetThreatManager().NotifyDisengaged(); boss->LoadCreaturesAddon(); boss->GetMotionMaster()->MoveTargetedHome(); boss->SetLootRecipient(nullptr); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 9db2c7e2042..c46ac193ab6 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -1258,7 +1258,7 @@ public: Julianne->GetMotionMaster()->Clear(); Julianne->setDeathState(JUST_DIED); Julianne->CombatStop(true); - Julianne->GetThreatManager().ClearAllThreat(); + Julianne->GetThreatManager().NotifyDisengaged(); Julianne->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } return; @@ -1528,7 +1528,7 @@ void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32 &dama Romulo->GetMotionMaster()->Clear(); Romulo->setDeathState(JUST_DIED); Romulo->CombatStop(true); - Romulo->GetThreatManager().ClearAllThreat(); + Romulo->GetThreatManager().NotifyDisengaged(); Romulo->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index 3f9b7f814c7..931df7115d0 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -1386,8 +1386,8 @@ public: if (me->HasAura(SPELL_THE_MIGHT_OF_MOGRAINE)) me->RemoveAurasDueToSpell(SPELL_THE_MIGHT_OF_MOGRAINE); me->RemoveAllAuras(); - me->GetThreatManager().ClearAllThreat(); me->CombatStop(true); + me->GetThreatManager().NotifyDisengaged(); me->InterruptNonMeleeSpells(false); me->SetWalk(false); @@ -1407,8 +1407,8 @@ public: if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID)) { temp->RemoveAllAuras(); - temp->GetThreatManager().ClearAllThreat(); temp->CombatStop(true); + temp->GetThreatManager().NotifyDisengaged(); temp->AttackStop(); temp->SetFaction(me->GetFaction()); temp->SetWalk(false); @@ -1418,7 +1418,6 @@ public: if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID)) { temp->RemoveAllAuras(); - temp->GetThreatManager().ClearAllThreat(); temp->CombatStop(true); temp->AttackStop(); temp->SetFaction(me->GetFaction()); @@ -1429,8 +1428,8 @@ public: if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID)) { temp->RemoveAllAuras(); - temp->GetThreatManager().ClearAllThreat(); temp->CombatStop(true); + temp->GetThreatManager().NotifyDisengaged(); temp->AttackStop(); temp->SetFaction(me->GetFaction()); temp->SetWalk(false); @@ -1441,8 +1440,8 @@ public: if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKoltiraGUID)) { temp->RemoveAllAuras(); - temp->GetThreatManager().ClearAllThreat(); temp->CombatStop(true); + temp->GetThreatManager().NotifyDisengaged(); temp->AttackStop(); temp->SetFaction(me->GetFaction()); temp->SetWalk(false); @@ -1456,8 +1455,8 @@ public: if (Creature* temp = ObjectAccessor::GetCreature(*me, uiThassarianGUID)) { temp->RemoveAllAuras(); - temp->GetThreatManager().ClearAllThreat(); temp->CombatStop(true); + temp->GetThreatManager().NotifyDisengaged(); temp->AttackStop(); temp->SetFaction(me->GetFaction()); temp->SetWalk(false); |
