mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
[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:
parent
cc062f16ac
commit
132b1cbabd
14 changed files with 61 additions and 24 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue