aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2019-07-21 01:49:58 +0200
committerTreeston <treeston.mmoc@gmail.com>2019-07-21 01:50:52 +0200
commit0e7c66cb4c7ff7d44e232d0b50703a48605ffd24 (patch)
tree4ffe19100d1173ff3641bf6d4be82d826d729924 /src/server/scripts/Outland
parenteba10f309eb541a7246754285bea6b821710d9fd (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.
Diffstat (limited to 'src/server/scripts/Outland')
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp2
-rw-r--r--src/server/scripts/Outland/zone_hellfire_peninsula.cpp4
-rw-r--r--src/server/scripts/Outland/zone_terokkar_forest.cpp2
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 ee12d3f7772..33e1bf0d82b 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
@@ -525,7 +525,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 676e2798d79..68be3572bf9 100644
--- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
@@ -102,7 +102,7 @@ public:
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
me->RemoveAllAuras();
me->CombatStop(true);
- me->GetThreatManager().NotifyDisengaged();
+ EngagementOver();
Talk(SAY_FREE);
return;
}
@@ -974,7 +974,7 @@ public:
me->RestoreFaction();
me->RemoveAllAuras();
me->CombatStop(true);
- me->GetThreatManager().NotifyDisengaged();
+ EngagementOver();
me->SetFlag(UNIT_NPC_FLAGS, 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 9a000906d7c..c9a30cff9af 100644
--- a/src/server/scripts/Outland/zone_terokkar_forest.cpp
+++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp
@@ -92,7 +92,7 @@ public:
me->SetStandState(UNIT_STAND_STATE_SIT);
me->RemoveAllAuras();
me->CombatStop(true);
- me->GetThreatManager().NotifyDisengaged();
+ EngagementOver();
UnkorUnfriendly_Timer = 60000;
}