Ejemplo n.º 1
0
void MoveSplineInit::Move(PathFinder const* pfinder)
{
    MovebyPath(pfinder->getPath());
    if (pfinder->GetTransport())
        SetTransport(pfinder->GetTransport()->GetGUIDLow());
    if (pfinder->getPathType() & PATHFIND_FLYPATH)
        SetFly();
}
Ejemplo n.º 2
0
 void MoveSplineInit::MoveTo(Vector3 const& dest, bool generatePath, bool forceDestination)
 {
     if (generatePath)
     {
         PathFinderMovementGenerator path(&unit);
         path.calculate(dest.x, dest.y, dest.z, forceDestination);
         MovebyPath(path.getPath());
     }
     else
     {
         args.path_Idx_offset = 0;
         args.path.resize(2);
         TransportPathTransform transform(unit, args.TransformForTransport);
         args.path[1] = transform(dest);
     }
 }
Ejemplo n.º 3
0
    void MoveSplineInit::MoveTo(const Vector3& dest, bool generatePath, bool forceDestination)
    {
        if (generatePath)
        {
            PathInfo path(&unit);
            bool result = path.Update(dest.x, dest.y, dest.z, forceDestination);
            if (result && !(path.getPathType() && PATHFIND_NOPATH))
            {
                MovebyPath(path.getFullPath());
                return;
            }
        }

        args.path_Idx_offset = 0;
        args.path.resize(2);
        args.path[1] = dest;
    }
Ejemplo n.º 4
0
    void MoveSplineInit::MoveTo(const Vector3& dest, bool generatePath, bool forceDestination)
    {
        if (generatePath)
        {
            PathGenerator path(unit);
            bool result = path.CalculatePath(dest.x, dest.y, dest.z, forceDestination);
            if (result && !(path.GetPathType() & PATHFIND_NOPATH))
            {
                MovebyPath(path.GetPath());
                return;
            }
        }

        args.path_Idx_offset = 0;
        args.path.resize(2);
        TransportPathTransform transform(unit, args.TransformForTransport);
        args.path[1] = transform(dest);
    }