Scripts/Spells Update Divine Star

Port From (https://github.com/TrinityCore/TrinityCore/commit/0eada1d7086985b759e10684966e3aefdd7eefe7)
This commit is contained in:
hondacrx
2023-05-02 16:59:25 -04:00
parent be0a98f3de
commit a2e5acbaa5
3 changed files with 85 additions and 59 deletions
@@ -754,17 +754,17 @@ namespace Game.Entities
rotatedPoints.Add(new Vector3(x, y, z));
}
InitSplines(rotatedPoints, timeToTarget);
InitSplines(rotatedPoints.ToArray(), timeToTarget);
}
public void InitSplines(List<Vector3> splinePoints, uint timeToTarget)
public void InitSplines(Vector3[] splinePoints, uint timeToTarget)
{
if (splinePoints.Count < 2)
if (splinePoints.Length < 2)
return;
_movementTime = 0;
_spline.InitSpline(splinePoints.ToArray(), splinePoints.Count, EvaluationMode.Linear);
_spline.InitSpline(splinePoints, splinePoints.Length, EvaluationMode.Linear);
_spline.InitLengths();
// should be sent in object create packets only