diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2019-07-21 01:49:58 +0200 |
|---|---|---|
| committer | Treeston <treeston.mmoc@gmail.com> | 2019-07-21 01:50:52 +0200 |
| commit | 0e7c66cb4c7ff7d44e232d0b50703a48605ffd24 (patch) | |
| tree | 4ffe19100d1173ff3641bf6d4be82d826d729924 /src/server/scripts/Northrend | |
| parent | eba10f309eb541a7246754285bea6b821710d9fd (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/Northrend')
6 files changed, 7 insertions, 9 deletions
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 45b64917dc4..291b5a8b395 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp @@ -580,7 +580,7 @@ struct gunship_npc_AI : public ScriptedAI return; me->CombatStop(true); - me->GetThreatManager().NotifyDisengaged(); + EngagementOver(); me->GetMotionMaster()->MoveTargetedHome(); } @@ -725,7 +725,6 @@ class npc_gunship : public CreatureScript Creature* stalker = *itr; stalker->RemoveAllAuras(); stalker->CombatStop(true); - stalker->GetThreatManager().NotifyDisengaged(); } uint32 explosionSpell = isVictory ? SPELL_EXPLOSION_VICTORY : SPELL_EXPLOSION_WIPE; @@ -884,7 +883,7 @@ class npc_high_overlord_saurfang_igb : public CreatureScript return; me->CombatStop(true); - me->GetThreatManager().NotifyDisengaged(); + EngagementOver(); me->GetMotionMaster()->MoveTargetedHome(); Reset(); @@ -1148,7 +1147,7 @@ class npc_muradin_bronzebeard_igb : public CreatureScript return; me->CombatStop(true); - me->GetThreatManager().NotifyDisengaged(); + EngagementOver(); me->GetMotionMaster()->MoveTargetedHome(); Reset(); 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 086b0eeeca2..e0cfd7c7f67 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -1801,7 +1801,7 @@ class npc_terenas_menethil : public CreatureScript return; me->CombatStop(false); - me->GetThreatManager().NotifyDisengaged(); + EngagementOver(); } void DamageTaken(Unit* /*attacker*/, uint32& damage) override diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp index 76257a25b44..c658e5985e8 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp @@ -122,7 +122,7 @@ public: ThreatReference* secondThreat = nullptr; ThreatReference* thirdThreat = nullptr; - ThreatManager const& mgr = me->GetThreatManager(); + ThreatManager& mgr = me->GetThreatManager(); Unit* currentVictim = mgr.GetCurrentVictim(); auto list = mgr.GetModifiableThreatList(); auto it = list.begin(), end = list.end(); diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp index eebed61e227..2b1a7853139 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp @@ -292,7 +292,7 @@ class boss_urom : public CreatureScript { me->RemoveAllAuras(); me->CombatStop(false); - me->GetThreatManager().NotifyDisengaged(); + EngagementOver(); } 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 b41f7639b90..dd75d8c9906 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().NotifyDisengaged(); + EngagementOver(); Elder->AI()->DoAction(ACTION_ELDER_FREYA_KILLED); } } diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp index 7993913252f..396f5d52c5d 100644 --- a/src/server/scripts/Northrend/zone_borean_tundra.cpp +++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp @@ -753,7 +753,6 @@ public: Creature* owner = GetOwner()->ToCreature(); owner->RemoveAllAurasExceptType(SPELL_AURA_DUMMY); owner->CombatStop(true); - owner->GetThreatManager().NotifyDisengaged(); owner->GetMotionMaster()->Clear(); owner->GetMotionMaster()->MoveFollow(GetCaster(), 4.0f, 0.0f); owner->CastSpell(owner, SPELL_SUBDUED, true); |
