aboutsummaryrefslogtreecommitdiff
path: root/src/game/PointMovementGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/PointMovementGenerator.cpp')
-rw-r--r--src/game/PointMovementGenerator.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/PointMovementGenerator.cpp b/src/game/PointMovementGenerator.cpp
index dedb4f0829c..c972683ce0b 100644
--- a/src/game/PointMovementGenerator.cpp
+++ b/src/game/PointMovementGenerator.cpp
@@ -23,6 +23,7 @@
#include "Creature.h"
#include "CreatureAI.h"
#include "DestinationHolderImp.h"
+#include "World.h"
//----- Point Movement Generator
template<class T>
@@ -92,3 +93,11 @@ template void PointMovementGenerator<Player>::Finalize(Player&);
template void PointMovementGenerator<Creature>::Initialize(Creature&);
template bool PointMovementGenerator<Creature>::Update(Creature&, const uint32 &diff);
template void PointMovementGenerator<Creature>::Finalize(Creature&);
+
+void AssistanceMovementGenerator::Finalize(Unit &unit)
+{
+ ((Creature*)&unit)->SetNoCallAssistance(false);
+ ((Creature*)&unit)->CallAssistance();
+ if (unit.isAlive())
+ unit.GetMotionMaster()->MoveSeekAssistanceDistract(sWorld.getConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY));
+}