aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/ScriptedAI
diff options
context:
space:
mode:
authorccrs <ccrs@users.noreply.github.com>2019-05-16 00:21:09 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-05 18:37:12 +0100
commitc511fa28037094a591d2ecc34b68c7e361f0d454 (patch)
tree67ed22177f0da52646420afea382253a8df00efc /src/server/game/AI/ScriptedAI
parent0af20f57530bc3b2f66c5a7c9cf514459b6d420a (diff)
Core/Misc: remove incorrect ClearUnitState calls related to movement
these unit states should never be removed outside motionmaster's handlings (cherry picked from commit 79b90f9d3afb3815e265fc59a1e98c92ec788012)
Diffstat (limited to 'src/server/game/AI/ScriptedAI')
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
index f42fbcb1691..fde068bf24c 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
@@ -52,19 +52,7 @@ void FollowerAI::MovementInform(uint32 type, uint32 id)
void FollowerAI::AttackStart(Unit* who)
{
- if (!who)
- return;
-
- if (me->Attack(who, true))
- {
- me->EngageWithTarget(who); // in case it doesn't have threat+combat yet
-
- if (me->HasUnitState(UNIT_STATE_FOLLOW))
- me->ClearUnitState(UNIT_STATE_FOLLOW);
-
- if (IsCombatMovementAllowed())
- me->GetMotionMaster()->MoveChase(who);
- }
+ ScriptedAI::AttackStart(who);
}
void FollowerAI::MoveInLineOfSight(Unit* who)