diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2019-07-21 01:49:58 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-12-17 00:23:33 +0100 |
| commit | c13d83796f7b2111c5dcf8546bdd84eccd232ae3 (patch) | |
| tree | 03c4220a955113e46b3aa2f9cc270574ba3a79c4 /src/server/scripts/Outland | |
| parent | f9fe00bf8c4c913bcfedd8df7d8e1001129962a0 (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/Outland')
3 files changed, 4 insertions, 4 deletions
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index aea89d9ed17..a7d7b2cc303 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -524,7 +524,7 @@ public: { ThreatManager const& mgr = me->GetThreatManager(); std::list<Unit*> TargetList; - Unit* currentVictim = mgr.GetCurrentVictim(); + Unit* currentVictim = mgr.GetLastVictim(); for (ThreatReference const* ref : mgr.GetSortedThreatList()) { if (Player* tempTarget = ref->GetVictim()->ToPlayer()) diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp index df90cedc591..9e9df90c9d6 100644 --- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp @@ -100,7 +100,7 @@ public: me->AddNpcFlag(UNIT_NPC_FLAG_QUESTGIVER); me->RemoveAllAuras(); me->CombatStop(true); - me->GetThreatManager().NotifyDisengaged(); + EngagementOver(); Talk(SAY_FREE); return; } @@ -973,7 +973,7 @@ public: me->RestoreFaction(); me->RemoveAllAuras(); me->CombatStop(true); - me->GetThreatManager().NotifyDisengaged(); + EngagementOver(); me->AddNpcFlag(UNIT_NPC_FLAG_QUESTGIVER); me->SetImmuneToPC(true); Talk(SAY_DEFEATED); diff --git a/src/server/scripts/Outland/zone_terokkar_forest.cpp b/src/server/scripts/Outland/zone_terokkar_forest.cpp index db507e8df63..e1cab1ce464 100644 --- a/src/server/scripts/Outland/zone_terokkar_forest.cpp +++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp @@ -91,7 +91,7 @@ public: me->SetStandState(UNIT_STAND_STATE_SIT); me->RemoveAllAuras(); me->CombatStop(true); - me->GetThreatManager().NotifyDisengaged(); + EngagementOver(); UnkorUnfriendly_Timer = 60000; } |
