[9188] Implement MoveGen::Interrupt call.

It can be used in time when need do some tasks before
another movement generator add on top to motion stack.
This just finish pair Interrupt->Reset similar Initilize->Finilize
In general movementgenerator have states:

Initilize=>Interrupt<=>[-some addition movegen->]<=>Reset=>Finalize
This commit is contained in:
VladimirMangos 2010-01-16 06:53:17 +03:00
parent cc062f16ac
commit 132b1cbabd
14 changed files with 61 additions and 24 deletions

View file

@ -82,6 +82,7 @@ public PathMovementBase<Creature, WaypointPath*>
u.StopMoving();
LoadPath(u);
}
void Interrupt(Creature &) {}
void Finalize(Creature &) {}
void Reset(Creature &u)
{
@ -130,6 +131,7 @@ public PathMovementBase<Player>
explicit FlightPathMovementGenerator(uint32 id, uint32 startNode = 0) : i_pathId(id) { i_currentNode = startNode; }
void Initialize(Player &);
void Finalize(Player &);
void Interrupt(Player &) {}
void Reset(Player &) {}
bool Update(Player &, const uint32 &);
MovementGeneratorType GetMovementGeneratorType() { return FLIGHT_MOTION_TYPE; }