mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Mobs fleeing and getting assistance feature implementaion.
Signed-off-by: VladimirMangos <vladimir@getmangos.com> Also rename ACTION_T_FLEE to ACTION_T_FLEE_FOR_ASSIST for clear use
This commit is contained in:
parent
f332c000d1
commit
fa03b3663a
21 changed files with 238 additions and 19 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#include "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "DestinationHolderImp.h"
|
||||
#include "World.h"
|
||||
|
||||
//----- Point Movement Generator
|
||||
template<class T>
|
||||
|
|
@ -73,3 +74,11 @@ template void PointMovementGenerator<Player>::MovementInform(Player&);
|
|||
|
||||
template void PointMovementGenerator<Creature>::Initialize(Creature&);
|
||||
template bool PointMovementGenerator<Creature>::Update(Creature&, const uint32 &diff);
|
||||
|
||||
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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue