aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Combat/ThreatManager.cpp
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2019-07-21 03:59:17 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-17 00:25:59 +0100
commita4c2c0fb1d1b9fae832ecc52aa68fe3fb8d1ca52 (patch)
treecece7a43e2e8a8a5a8d066669bbfd47c6b8c2486 /src/server/game/Combat/ThreatManager.cpp
parenta2b1b3e2aad4f2ecfbf156d96890c1ecde678c11 (diff)
Core/AI: No longer override chase movement with follow movement if the creature engages before JustAppeared has had a chance to fire.
(cherry picked from commit 49b04c0fdd03d060d10f91a597857ec9c3d9f4ed)
Diffstat (limited to 'src/server/game/Combat/ThreatManager.cpp')
-rw-r--r--src/server/game/Combat/ThreatManager.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp
index 6ad8de0aabb..41f96d2d7c8 100644
--- a/src/server/game/Combat/ThreatManager.cpp
+++ b/src/server/game/Combat/ThreatManager.cpp
@@ -25,6 +25,7 @@
#include "Player.h"
#include "SpellAuraEffects.h"
#include "SpellMgr.h"
+#include "TemporarySummon.h"
#include "Hacks/boost_1_74_fibonacci_heap.h"
BOOST_1_74_FIBONACCI_HEAP_MSVC_COMPILE_FIX(ThreatManager::threat_list_heap::value_type)
@@ -158,9 +159,11 @@ void ThreatReference::UnregisterAndFree()
if (cWho->IsPet() || cWho->IsTotem() || cWho->IsTrigger())
return false;
- // summons cannot have a threat list, unless they are controlled by a creature
- if (cWho->HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_GUARDIAN) && !cWho->GetOwnerGUID().IsCreature())
- return false;
+ // summons cannot have a threat list if they were summoned by a player
+ if (cWho->HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_GUARDIAN))
+ if (TempSummon const* tWho = cWho->ToTempSummon())
+ if (tWho->GetSummonerGUID().IsPlayer())
+ return false;
return true;
}