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
committerTreeston <treeston.mmoc@gmail.com>2019-07-21 03:59:43 +0200
commit49b04c0fdd03d060d10f91a597857ec9c3d9f4ed (patch)
treeda96e83757f089daddbe00381bd9d1f46f10bfaf /src/server/game/Combat/ThreatManager.cpp
parente5615402cc2dbc8cea6ffada0d759a7feeacb4b7 (diff)
Core/AI: No longer override chase movement with follow movement if the creature engages before JustAppeared has had a chance to fire.
Diffstat (limited to 'src/server/game/Combat/ThreatManager.cpp')
-rw-r--r--src/server/game/Combat/ThreatManager.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp
index c0998b8e33c..42518d33b47 100644
--- a/src/server/game/Combat/ThreatManager.cpp
+++ b/src/server/game/Combat/ThreatManager.cpp
@@ -15,12 +15,13 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "ThreatManager.h"
#include "Creature.h"
#include "CreatureAI.h"
#include "CreatureGroups.h"
#include "MotionMaster.h"
#include "Player.h"
-#include "ThreatManager.h"
+#include "TemporarySummon.h"
#include "Unit.h"
#include "UnitAI.h"
#include "UnitDefines.h"
@@ -160,9 +161,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;
}