aboutsummaryrefslogtreecommitdiff
path: root/src/game/PointMovementGenerator.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-21 10:48:00 -0500
committermegamage <none@none>2009-05-21 10:48:00 -0500
commit67c84b1f3d74985fd2521feb9e536e56b9c9f2e9 (patch)
tree8bad07c2da1392ecaed20b4f295a78e5e2e90545 /src/game/PointMovementGenerator.cpp
parentb7053ecc0d565ba2f91d56f34a616d1992a91562 (diff)
Mobs fleeing and getting assistance feature implementaion. Author: Neo2003
--HG-- branch : trunk
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));
+}