mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
(Scripts/AI) ZG20: Jeklik (Bat Boss) - Implement Bat Riders, other fixes and improvements (#17573)
--------- Co-authored-by: AG <43139552+AGandrup@users.noreply.github.com>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "RandomMovementGenerator.h"
|
||||
#include "TargetedMovementGenerator.h"
|
||||
#include "WaypointMovementGenerator.h"
|
||||
#include "WaypointMgr.h"
|
||||
|
||||
inline MovementGenerator* GetIdleMovementGenerator()
|
||||
{
|
||||
@@ -448,6 +449,21 @@ void MotionMaster::MoveSplinePath(Movement::PointsArray* path)
|
||||
}
|
||||
}
|
||||
|
||||
void MotionMaster::MoveSplinePath(uint32 path_id)
|
||||
{
|
||||
// convert the path id to a Movement::PointsArray*
|
||||
Movement::PointsArray* points = new Movement::PointsArray();
|
||||
WaypointPath const* path = sWaypointMgr->GetPath(path_id);
|
||||
for (uint8 i = 0; i < path->size(); ++i)
|
||||
{
|
||||
WaypointData const* node = path->at(i);
|
||||
points->push_back(G3D::Vector3(node->x, node->y, node->z));
|
||||
}
|
||||
|
||||
// pass the new PointsArray* to the appropriate MoveSplinePath function
|
||||
MoveSplinePath(points);
|
||||
}
|
||||
|
||||
void MotionMaster::MoveLand(uint32 id, Position const& pos, float speed /* = 0.0f*/)
|
||||
{
|
||||
// Xinef: do not allow to move with UNIT_FLAG_DISABLE_MOVE
|
||||
|
||||
Reference in New Issue
Block a user