NewFunction(Core/Pathing) Path End Reached (#10017)
This commit is contained in:
@@ -132,6 +132,9 @@ public:
|
|||||||
// Called at waypoint reached or point movement finished
|
// Called at waypoint reached or point movement finished
|
||||||
virtual void MovementInform(uint32 /*type*/, uint32 /*id*/) {}
|
virtual void MovementInform(uint32 /*type*/, uint32 /*id*/) {}
|
||||||
|
|
||||||
|
// Called at MovePath End
|
||||||
|
virtual void PathEndReached() {}
|
||||||
|
|
||||||
void OnCharmed(bool apply) override;
|
void OnCharmed(bool apply) override;
|
||||||
|
|
||||||
// Called at reaching home after evade
|
// Called at reaching home after evade
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
|
|||||||
if ((i_currentNode == i_path->size() - 1) && !repeating) // If that's our last waypoint
|
if ((i_currentNode == i_path->size() - 1) && !repeating) // If that's our last waypoint
|
||||||
{
|
{
|
||||||
creature->GetMotionMaster()->Initialize();
|
creature->GetMotionMaster()->Initialize();
|
||||||
|
creature->AI()->PathEndReached();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user