(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:
KJack
2023-11-12 03:35:35 -05:00
committed by GitHub
parent ca7eb956aa
commit 3c8adc71cd
5 changed files with 423 additions and 191 deletions

View File

@@ -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