aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms/ScarletEnclave
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2019-07-21 01:49:58 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-17 00:23:33 +0100
commitc13d83796f7b2111c5dcf8546bdd84eccd232ae3 (patch)
tree03c4220a955113e46b3aa2f9cc270574ba3a79c4 /src/server/scripts/EasternKingdoms/ScarletEnclave
parentf9fe00bf8c4c913bcfedd8df7d8e1001129962a0 (diff)
Core/AI: Finally move the "is creature engaged" flag to be a property of the creature AI, where it honestly always belonged. Fixes #17981 and #23602 for real this time.
(cherry picked from commit 0e7c66cb4c7ff7d44e232d0b50703a48605ffd24)
Diffstat (limited to 'src/server/scripts/EasternKingdoms/ScarletEnclave')
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index 64c8497712c..f62c84c7dc0 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -1388,9 +1388,10 @@ public:
me->RemoveAurasDueToSpell(SPELL_THE_MIGHT_OF_MOGRAINE);
me->RemoveAllAuras();
me->CombatStop(true);
- me->GetThreatManager().NotifyDisengaged();
me->InterruptNonMeleeSpells(false);
me->SetWalk(false);
+
+ EngagementOver();
for (uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i)
DespawnNPC(uiDefenderGUID[i]);
@@ -1407,9 +1408,9 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
{
+ temp->AI()->EnterEvadeMode();
temp->RemoveAllAuras();
temp->CombatStop(true);
- temp->GetThreatManager().NotifyDisengaged();
temp->AttackStop();
temp->SetFaction(me->GetFaction());
temp->SetWalk(false);
@@ -1428,9 +1429,9 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
{
+ temp->AI()->EnterEvadeMode();
temp->RemoveAllAuras();
temp->CombatStop(true);
- temp->GetThreatManager().NotifyDisengaged();
temp->AttackStop();
temp->SetFaction(me->GetFaction());
temp->SetWalk(false);
@@ -1440,9 +1441,9 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKoltiraGUID))
{
+ temp->AI()->EnterEvadeMode();
temp->RemoveAllAuras();
temp->CombatStop(true);
- temp->GetThreatManager().NotifyDisengaged();
temp->AttackStop();
temp->SetFaction(me->GetFaction());
temp->SetWalk(false);
@@ -1455,9 +1456,9 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiThassarianGUID))
{
+ temp->AI()->EnterEvadeMode();
temp->RemoveAllAuras();
temp->CombatStop(true);
- temp->GetThreatManager().NotifyDisengaged();
temp->AttackStop();
temp->SetFaction(me->GetFaction());
temp->SetWalk(false);